-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from bmatthieu3/fix-model-aladin
Fix undefined ModelAladin issue
- Loading branch information
Showing
34 changed files
with
14,764 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,22 @@ | ||
recursive-include ipyaladin/static *.* | ||
graft ipyaladin/nbextension | ||
graft ipyaladin/labextension | ||
|
||
graft js | ||
graft tests | ||
prune **/node_modules | ||
|
||
include ipyaladin.json | ||
|
||
include LICENSE | ||
include setup.py | ||
include setup.cfg | ||
include pyproject.toml | ||
include install.json | ||
|
||
# Patterns to exclude from any directory | ||
global-exclude *~ | ||
global-exclude *.pyc | ||
global-exclude *.pyo | ||
global-exclude .git | ||
global-exclude .ipynb_checkpoints | ||
global-exclude *.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,53 @@ | ||
- To release a new version of ipyaladin on PyPI: | ||
|
||
Update _version.py (set release version, remove 'dev') | ||
git add and git commit | ||
python setup.py sdist upload | ||
python setup.py bdist_wheel upload | ||
git tag -a X.X.X -m 'comment' | ||
Update _version.py (add 'dev' and increment minor) | ||
git add and git commit | ||
git push | ||
git push --tags | ||
|
||
- To release a new version of ipyaladin on NPM: | ||
|
||
# nuke the `dist` and `node_modules` | ||
git clean -fdx | ||
npm install | ||
npm publish | ||
# Release | ||
|
||
Before doing a release, check to see if there are any outstanding changes or untracked files: | ||
|
||
``` | ||
git status | ||
git clean -fdxn | ||
``` | ||
|
||
Commit changes, and make sure that any untracked files can be deleted. Then clean the repository: | ||
|
||
``` | ||
git clean -fdx # actually delete untracked files | ||
``` | ||
|
||
## Javascript release | ||
|
||
To release a new version of ipyaladin on NPM, first register for an NPM account [here](https://www.npmjs.com/), then log in with `yarn login`. Then: | ||
|
||
1. Update `js/package.json` with the new npm package version | ||
2. Build and publish the npm package inside the `js/` directory: | ||
|
||
``` | ||
cd js/ | ||
yarn install | ||
yarn publish | ||
cd .. | ||
``` | ||
|
||
## Python release | ||
|
||
To release a new version of ipyaladin on PyPI, first make sure that the `build` package is installed: `pip install build`. | ||
|
||
1. Update `ipyaladin/_version.py`: | ||
- Update `__version__` | ||
- Update `NPM_PACKAGE_RANGE` if necessary | ||
2. Commit changes to `_version.py` and tag the release | ||
``` | ||
git add ipyaladin/_version.py | ||
git tag -a X.X.X -m 'comment' | ||
``` | ||
3. Generate Python packages and upload to PyPI: | ||
``` | ||
python -m build | ||
twine check dist/* | ||
twine upload dist/* | ||
``` | ||
4. Update `_version.py` (add 'dev' and increment minor) | ||
``` | ||
git commit -a -m 'Back to dev' | ||
git push | ||
git push --tags | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
npm install --global yarn | ||
pip install -e . | ||
jupyter nbextension install --py --symlink --overwrite --sys-prefix ipyaladin | ||
jupyter nbextension enable --py --sys-prefix ipyaladin | ||
jupyter labextension develop ipyaladin --overwrite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
astropy | ||
astroquery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-3.8.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
#!/bin/sh | ||
|
||
cd js | ||
npm install | ||
cd .. | ||
npm install yarn | ||
pip install -e . | ||
jupyter nbextension install --py --symlink --sys-prefix ipyaladin | ||
jupyter nbextension install --py --symlink --overwrite --sys-prefix ipyaladin | ||
jupyter nbextension enable --py --sys-prefix ipyaladin | ||
|
||
jupyter labextension develop ipyaladin --overwrite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
@echo off | ||
|
||
Rem Activate ipyaladin for simple notebooks | ||
"%PREFIX%\Scripts\jupyter-nbextension.exe" --py --symlink --overwrite --sys-prefix ipyaladin > NUL 2>&1 && if errorlevel 1 exit 1 | ||
"%PREFIX%\Scripts\jupyter-nbextension.exe" enable ipyaladin --py --sys-prefix > NUL 2>&1 && if errorlevel 1 exit 1 | ||
Rem Activate ipyaladin extension for jupyter lab | ||
"%PREFIX%\Scripts\jupyter-labextension.exe" develop ipyaladin --overwrite > NUL 2>&1 && if errorlevel 1 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
"${PREFIX}/bin/jupyter-nbextension" enable ipyaladin --py --sys-prefix | ||
|
||
# Activate ipyaladin for simple notebooks | ||
"${PREFIX}/bin/jupyter-nbextension" --py --symlink --overwrite --sys-prefix ipyaladin | ||
"${PREFIX}/bin/jupyter-nbextension" enable --py --sys-prefix ipyaladin | ||
# Activate ipyaladin extension for jupyter lab | ||
"${PREFIX}/bin/jupyter-labextension" develop ipyaladin --overwrite |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"packageManager": "python", | ||
"packageName": "ipyaladin", | ||
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package ipyaladin" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"load_extensions": { | ||
"ipyaladin/extension": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,46 @@ | ||
from ._version import version_info, __version__ | ||
from ._version import __version__ | ||
|
||
from .aladin_widget import * | ||
|
||
|
||
def _jupyter_labextension_paths(): | ||
"""Called by Jupyter Lab Server to detect if it is a valid labextension and | ||
to install the widget | ||
Returns | ||
======= | ||
src: Source directory name to copy files from. Webpack outputs generated files | ||
into this directory and Jupyter Lab copies from this directory during | ||
widget installation | ||
dest: Destination directory name to install widget files to. Jupyter Lab copies | ||
from `src` directory into <jupyter path>/labextensions/<dest> directory | ||
during widget installation | ||
""" | ||
return [{ | ||
'src': 'labextension', | ||
'dest': 'ipyaladin', | ||
}] | ||
|
||
|
||
def _jupyter_nbextension_paths(): | ||
"""Called by Jupyter Notebook Server to detect if it is a valid nbextension and | ||
to install the widget | ||
Returns | ||
======= | ||
section: The section of the Jupyter Notebook Server to change. | ||
Must be 'notebook' for widget extensions | ||
src: Source directory name to copy files from. Webpack outputs generated files | ||
into this directory and Jupyter Notebook copies from this directory during | ||
widget installation | ||
dest: Destination directory name to install widget files to. Jupyter Notebook copies | ||
from `src` directory into <jupyter path>/nbextensions/<dest> directory | ||
during widget installation | ||
require: Path to importable AMD Javascript module inside the | ||
<jupyter path>/nbextensions/<dest> directory | ||
""" | ||
return [{ | ||
'section': 'notebook', | ||
'src': 'static', | ||
'src': 'nbextension', | ||
'dest': 'ipyaladin', | ||
'require': 'ipyaladin/extension' | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#version_info = (0, 1, 0, 'dev') | ||
version_info = (0, 1, 9) | ||
__version__ = '.'.join(map(str, version_info)) | ||
|
||
# Module version | ||
__version__ = '0.1.10' | ||
|
||
NPM_PACKAGE_RANGE='^0.1.10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ipyaladin | ||
|
||
Package Install | ||
--------------- | ||
|
||
**Prerequisites** | ||
- [node](http://nodejs.org/) | ||
|
||
```bash | ||
npm install --save ipyaladin2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// In an AMD module, we set the public path using the magic requirejs 'module' dependency | ||
// See https://github.com/requirejs/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define#module | ||
// Since 'module' is a requirejs magic module, we must include 'module' in the webpack externals configuration. | ||
import * as module from 'module'; | ||
const url = new URL(module.uri, document.location) | ||
// Using lastIndexOf('/')+1 gives us the empty string if there is no '/', so pathname becomes '/' | ||
url.pathname = url.pathname.slice(0,url.pathname.lastIndexOf('/')+1); | ||
__webpack_public_path__ = `${url.origin}${url.pathname}`; |
Oops, something went wrong.