-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pydeck] Create a prebuilt extension for JupyterLab #7030
base: master
Are you sure you want to change the base?
Changes from all commits
90d724c
e1b18d4
a246e84
27f3c2b
954598d
cddac6e
b49b646
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Making a new release of pydeck | ||
|
||
The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser). | ||
|
||
## Manual release | ||
|
||
### Python package | ||
|
||
This extension can be distributed as Python | ||
packages. All of the Python | ||
packaging instructions in the `pyproject.toml` file to wrap your extension in a | ||
Python package. Before generating a package, we first need to install `build`. | ||
|
||
```bash | ||
pip install build twine | ||
``` | ||
|
||
To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do: | ||
|
||
```bash | ||
python -m build | ||
``` | ||
|
||
> `python setup.py sdist bdist_wheel` is deprecated and will not work for this package. | ||
|
||
Then to upload the package to PyPI, do: | ||
|
||
```bash | ||
twine upload dist/* | ||
``` | ||
|
||
### NPM package | ||
|
||
To publish the frontend part of the extension as a NPM package, do: | ||
|
||
```bash | ||
npm login | ||
npm publish --access public | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: we should be able to put |
||
``` | ||
|
||
## Automated releases with the Jupyter Releaser | ||
|
||
The extension repository should already be compatible with the Jupyter Releaser. | ||
|
||
Check out the [workflow documentation](https://github.com/jupyter-server/jupyter_releaser#typical-workflow) for more information. | ||
|
||
Here is a summary of the steps to cut a new release: | ||
|
||
- Fork the [`jupyter-releaser` repo](https://github.com/jupyter-server/jupyter_releaser) | ||
- Add `ADMIN_GITHUB_TOKEN`, `PYPI_TOKEN` and `NPM_TOKEN` to the Github Secrets in the fork | ||
- Go to the Actions panel | ||
- Run the "Draft Changelog" workflow | ||
- Merge the Changelog PR | ||
- Run the "Draft Release" workflow | ||
- Run the "Publish Release" workflow | ||
|
||
## Publishing to `conda-forge` | ||
|
||
If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html | ||
|
||
Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../modules/jupyter-widget/package.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.7.1" | ||
__version__ = "0.8.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: I'd bump the version in a follow-up PR |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
DECKGL_SEMVER = "~8.5.*" | ||
DECKGL_SEMVER = "8.7.*" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,24 @@ | ||
[project] | ||
name = "pydeck" | ||
version = "0.7.1" | ||
version = "0.8.0" | ||
requires-python = ">=3.7" | ||
|
||
[build-system] | ||
requires = [ | ||
"setuptools", | ||
"wheel", | ||
] | ||
requires = ["jupyter_packaging~=0.10,<2", "jupyterlab~=3.1"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you include |
||
build-backend = "jupyter_packaging.build_api" | ||
|
||
[tool.black] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why delete the black config section? |
||
line-length = 120 | ||
target-version = ['py34'] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
[tool.jupyter-packaging.options] | ||
skip-if-exists = ["pydeck/labextension/static/style.js"] | ||
ensured-targets = ["pydeck/labextension/static/style.js", "pydeck/labextension/package.json"] | ||
|
||
( | ||
/( | ||
\.eggs # exclude a few common directories in the | ||
| \.git # root of the project | ||
| \.hg | ||
| \.mypy_cache | ||
| \.tox | ||
| \.venv | ||
| _build | ||
| buck-out | ||
| build | ||
| dist | ||
)/ | ||
| foo.py # also separately exclude a file named foo.py in | ||
# the root of the project | ||
) | ||
''' | ||
[tool.jupyter-packaging.builder] | ||
factory = "jupyter_packaging.npm_builder" | ||
|
||
[tool.jupyter-packaging.build-args] | ||
build_cmd = "build:labextension" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only builds the labextension? |
||
path = "../../modules/jupyter-widget" | ||
build_dir = "pydeck/labextension" | ||
npm = ["jlpm"] | ||
|
||
[tool.check-manifest] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
ignore = ["pydeck/labextension/**", "yarn.lock", ".*", "package-lock.json"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the
Makefile
with the new commands as well?