From 47cf32cd6f37899198352ecef0f3ca34bf7ef6ee Mon Sep 17 00:00:00 2001 From: Kento Tarui Date: Wed, 2 Jul 2025 21:59:36 +0900 Subject: [PATCH 1/7] ci: fix support versions Signed-off-by: Kento Tarui --- .github/workflows/main.yml | 2 +- .gitignore | 1 + README.md | 7 ++++--- RELEASE.md | 8 +++++++- pyproject.toml | 4 ++++ 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5d6e32c..9ccd488 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: yarn-version: [1.22.22] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup conda uses: conda-incubator/setup-miniconda@v3 diff --git a/.gitignore b/.gitignore index e752dae..ccc72cd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ .idea/ .vscode/ build/ +dist/ *.py[cod] src/* venv/ diff --git a/README.md b/README.md index dd60080..9186c42 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Use [HERE Maps API for JavaScript](https://developer.here.com/develop/javascript Before you can install this package, or use the example notebooks to make sure your system meets the following prerequisities: -- A Python installation, 3.6+ recommended, with the `pip` command available to install dependencies +- A Python installation, 3.9+ recommended, with the `pip` command available to install dependencies - A HERE developer account, free and available under [HERE Developer Portal](https://developer.here.com) - An [API key](https://developer.here.com/documentation/identity-access-management/dev_guide/topics/dev-apikey.html) from the [HERE Developer Portal](https://developer.here.com) @@ -79,12 +79,12 @@ Below extra commands are required only if you are using JupyterLab (version 2 or ### Installation from source repository on GitHub -For a development installation (requires yarn, you can install it with `conda install -c conda-forge yarn`): +For a development installation (requires yarn v1, you can install it with `conda install -c conda-forge yarn@1.22.22`): $ npm config set @here:registry https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript $ git clone https://github.com/heremaps/here-map-widget-for-jupyter.git $ cd here-map-widget-for-jupyter - $ pip install -e . + $ pip install -e .[dev] If you are using the classic Jupyter Notebook you need to install the nbextension: @@ -96,6 +96,7 @@ If you are using the classic Jupyter Notebook you need to install the nbextensio Note for developers: - the ``-e`` pip option allows one to modify the Python code in-place. Restart the kernel in order to see the changes. +- the ``[dev]`` key allows one to install dev dependencies in optional-dependencies as well. - the ``--symlink`` argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows. For developing with JupyterLab: diff --git a/RELEASE.md b/RELEASE.md index d38ae45..b7593b1 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,13 +11,19 @@ The following are mandatory pre-release steps to bring the repository into a pro - Make sure all tests listed in `CONTRIBUTING.md` pass successfully. - Make sure badges appear as expected in the [README.md on GitHub](https://github.com/heremaps/here-map-widget-for-jupyter/blob/master/README.md). +## Packaging +- Install [hatch](https://hatch.pypa.io/1.13/) CLI via an installer, pip, or conda. +- Run `hatch build` +- Make sure sdist and wheel packages are created in [dist](dist/). +- Make sure the wheel package works by `pip install /path/to/dist/directory/here_map_widget_for_jupyter-version-py2.py3-none-any.whl`. +- Create a Merge Request in the GitHub. + ## Release on PyPI - Create a new release in the GitHub UI by clicking on [Draft a new release](https://github.com/heremaps/here-map-widget-for-jupyter/releases/new) button, then update the tag version and release description. - Click on the `Publish release` button to release the [package on PyPI](https://pypi.org/project/here-map-widget-for-jupyter/). - Once released verify that `pip install here-map-widget-for-jupyter` does indeed install the latest release. - ## Release on Anaconda's conda-forge channel - Go to the [here-map-widget-for-jupyter-feedstock](https://github.com/conda-forge/here-map-widget-for-jupyter-feedstock) repository. diff --git a/pyproject.toml b/pyproject.toml index f6dbd13..778abcf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,11 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Software Development :: Libraries", ] dependencies = [ From 1fcd65cbaaa3b7dc9ec8bb2eab1c88cce4c41f3e Mon Sep 17 00:00:00 2001 From: Kento Tarui Date: Thu, 3 Jul 2025 04:21:21 +0900 Subject: [PATCH 2/7] refactor: single sourcing of version info Signed-off-by: Kento Tarui --- here_map_widget/{_version.py => __about__.py} | 6 +- here_map_widget/__init__.py | 2 +- here_map_widget/map.py | 2 +- pyproject.toml | 77 ++++++++++++------- requirements_dev.txt | 2 - 5 files changed, 53 insertions(+), 36 deletions(-) rename here_map_widget/{_version.py => __about__.py} (72%) delete mode 100644 requirements_dev.txt diff --git a/here_map_widget/_version.py b/here_map_widget/__about__.py similarity index 72% rename from here_map_widget/_version.py rename to here_map_widget/__about__.py index 97581e5..c6cfa45 100644 --- a/here_map_widget/_version.py +++ b/here_map_widget/__about__.py @@ -7,10 +7,6 @@ version_info = (2, 0, 0) # Module version accessible using here_map_widget.__version__ -__version__ = "%s.%s.%s" % ( - version_info[0], - version_info[1], - version_info[2], -) +__version__ = "2.0.0" EXTENSION_VERSION = "^2.0.0" diff --git a/here_map_widget/__init__.py b/here_map_widget/__init__.py index a5df340..47879a5 100644 --- a/here_map_widget/__init__.py +++ b/here_map_widget/__init__.py @@ -12,7 +12,7 @@ import xyzservices.providers as basemaps # noqa E501 -from ._version import __version__, version_info +from .__about__ import __version__, version_info from .configs import * from .map import * diff --git a/here_map_widget/map.py b/here_map_widget/map.py index 435cdf5..452e7c0 100644 --- a/here_map_widget/map.py +++ b/here_map_widget/map.py @@ -38,7 +38,7 @@ validate, ) -from ._version import EXTENSION_VERSION +from .__about__ import EXTENSION_VERSION from .configs import DefaultLayerNames def_loc = [20.5937, 78.9629] diff --git a/pyproject.toml b/pyproject.toml index 778abcf..f1609e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,17 @@ [build-system] requires = [ "hatchling", + "hatch-requirements-txt", "jupyterlab>=4.0.0,==4.*", ] build-backend = "hatchling.build" [project] name = "here-map-widget-for-jupyter" +dynamic = ["version", "dependencies", "optional-dependencies"] description = "A widget that enables you to use HERE Maps API for JavaScript in Jupyter Notebook." readme = "README.md" +requires-python = ">=3.9" license-files = ["LICENSE"] authors = [ { name = "HERE Europe B.V." }, @@ -34,17 +37,25 @@ classifiers = [ "Programming Language :: Python :: 3.13", "Topic :: Software Development :: Libraries", ] -dependencies = [ - "branca>=0.7.2,<0.8", - "ipywidgets>=8.0.7,<9", - "xyzservices>=2024.4.0", -] -version = "2.0.0" -[project.optional-dependencies] -dev = [ - "black[jupyter]", - "isort", +[project.urls] +Documentation = "https://here-map-widget-for-jupyter.readthedocs.io/en/latest/" +Issues = "https://github.com/heremaps/here-map-widget-for-jupyter/issues" +Source = "https://github.com/heremaps/here-map-widget-for-jupyter" + +[tool.hatch.version] +path = "here_map_widget/__about__.py" + +[tool.hatch.metadata.hooks.requirements_txt] +files = ["requirements.txt"] + +[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies] +docs = ["docs/requirements.txt"] + + +[tool.hatch.build.targets.sdist] +exclude = [ + ".github", ] [tool.hatch.build.targets.wheel] @@ -55,10 +66,6 @@ packages = ["here_map_widget"] "here_map_widget/labextension" = "share/jupyter/labextensions/@here/map-widget-for-jupyter" "./map-widget-for-jupyter.json" = "etc/jupyter/nbconfig/notebook.d/map-widget-for-jupyter.json" -[tool.hatch.build.targets.sdist] -exclude = [ - ".github", -] [tool.hatch.build.hooks.jupyter-builder] ensured-targets = [ @@ -77,20 +84,36 @@ npm = [ "yarn", ] -[tool.tbump] -field = [ - { name = "channel", default = "" }, - { name = "release", default = "" }, + +[tool.hatch.envs.default] +dependencies = [] + +[tool.hatch.envs.default.scripts] +clean = "" + +[tool.hatch.envs.lint] +detached = true +dependencies = [ + "black[jupyter]", + "isort", ] -[tool.tbump.version] -current = "2.0.0" -regex = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)((?Pa|b|rc|.dev)(?P\\d+))?" +[tool.hatch.envs.lint.scripts] +reformat = [ + "black {args:.}", + "isort --atomic {args:.}", +] +check = [ + "isort --check --diff {args:.}", + "black --diff --check {args:.}", +] -[tool.tbump.git] -message_template = "Bump to {new_version}" -tag_template = "v{new_version}" +[tool.black] +line-length = 99 -[[tool.tbump.file]] -src = "pyproject.toml" -version_template = "version = \"{major}.{minor}.{patch}{channel}{release}\"" +[tool.isort] +line_length = 90 +multi_line_output = 3 +include_trailing_comma = "True" +force_grid_wrap = 0 +use_parentheses = "True" diff --git a/requirements_dev.txt b/requirements_dev.txt deleted file mode 100644 index b94329a..0000000 --- a/requirements_dev.txt +++ /dev/null @@ -1,2 +0,0 @@ -black[jupyter] -isort From 43cbb89bd28688cfec52225c67faf241768256b1 Mon Sep 17 00:00:00 2001 From: Kento Tarui Date: Thu, 3 Jul 2025 04:23:59 +0900 Subject: [PATCH 3/7] ci: update dependencies Signed-off-by: Kento Tarui --- .readthedocs.yml | 8 ++++---- docs/requirements.txt | 2 +- requirements.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index b2cbaf6..6cf0492 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -20,8 +20,8 @@ formats: # Optionally set the version of Python and requirements required to build your docs python: - version: 3.8 + version: 3.12 install: - - requirements: requirements.txt - - requirements: requirements_dev.txt - - requirements: docs/requirements.txt \ No newline at end of file + - requirements: docs/requirements.txt + - method: pip + path: . \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index cb1a54b..2431961 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ +sphinx jupyter-sphinx==0.2.4a1 sphinx_rtd_theme pandas geopandas -here-map-widget-for-jupyter \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 7f56640..917131b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -ipywidgets>=8.1.2,<9 +ipywidgets>=8.0.7,<9 branca>=0.7.2,<0.8 xyzservices>=2024.4.0 \ No newline at end of file From 2d3c63a8a4e21b9113ce9d4e667ddb2d53a9b7f6 Mon Sep 17 00:00:00 2001 From: Kento Tarui Date: Thu, 3 Jul 2025 04:25:10 +0900 Subject: [PATCH 4/7] ci: update build process Signed-off-by: Kento Tarui --- .github/workflows/main.yml | 12 +++++------- .github/workflows/release.yml | 3 +-- CONTRIBUTING.md | 29 ++++++++++++++++++++++------- README.md | 4 ++-- RELEASE.md | 5 ++--- 5 files changed, 32 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ccd488..778b46c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: - name: Install here-map-widget-for-jupyter run: | npm config set @here:registry https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript - pip install .[dev] + pip install .[docs] - name: Check installation files run: | @@ -53,16 +53,16 @@ jobs: test -f $CONDA_PREFIX/share/jupyter/labextensions/@here/map-widget-for-jupyter/package.json - name: Lint check - run: make lint + run: | + pip install hatch + hatch run lint:check - name: Import check run: python -c 'import here_map_widget' - name: Build the package (Only on Linux for saving time) if: matrix.os == 'ubuntu-latest' - run: | - pip install hatch - hatch build + run: hatch build - name: Build docs (Only on Linux for saving time) if: matrix.os == 'ubuntu-latest' @@ -70,7 +70,5 @@ jobs: XYZ_TOKEN: ${{ secrets.XYZ_TOKEN }} LS_API_KEY: ${{ secrets.LS_API_KEY }} run: | - mamba install sphinx sphinx_rtd_theme - pip install -r docs/requirements.txt cd docs make html diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cbf278b..c49d9c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: Install tools run: | python -m pip install --upgrade pip - pip install setuptools wheel twine jupyter-packaging + pip install hatch - name: Build the package run: | node --version @@ -43,7 +43,6 @@ jobs: yarn --version npm config set @here:registry https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript pip install . - pip install hatch hatch build - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@master diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f00fcad..77f3001 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,29 +7,44 @@ These are mostly guidelines, not rules. Use your best judgement and feel free to changes to this document in a pull request. ## Coding Guidelines -1. Lint your code contributions as per [pep8 guidelines](https://www.python.org/dev/peps/pep-0008/). -To help you out, we have included a `Makefile` in the root directory which supports the commands below: +### 1. Lint your code contributions as per [pep8 guidelines](https://www.python.org/dev/peps/pep-0008/). + +To help you out, we have scripts in `pyproject.toml` which supports the commands below: Autoformat code using black: ```bash -make black +hatch run lint:reformat ``` Check for linting errors: ```bash -make lint +hatch run lint:check ``` -2. Sort the imports in each python file as per [pep8 guidelines](https://www.python.org/dev/peps/pep-0008/#imports) - Please execute the isort utility to have the imports sorted auto-magically. +Make sure [hatch](https://hatch.pypa.io/1.13/) CLI is installed via an installer, pip, or conda beforehand. + +### 2. Sort the imports in each python file as per [pep8 guidelines](https://www.python.org/dev/peps/pep-0008/#imports) + +Please execute the isort utility to have the imports sorted auto-magically. -#### Notebooks +## Notebooks Example notebooks are provided in [/examples](./examples). +## Edit documentation + +Source of documentaion is available in [/docs](./docs). + +Following commands build documentation + +```bash +cd docs +make html +``` + ## Signing each Commit When you file a pull request, we ask that you sign off the diff --git a/README.md b/README.md index 9186c42..a151d81 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ For a development installation (requires yarn v1, you can install it with `conda $ npm config set @here:registry https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript $ git clone https://github.com/heremaps/here-map-widget-for-jupyter.git $ cd here-map-widget-for-jupyter - $ pip install -e .[dev] + $ pip install -e . # Or .[docs] If you are using the classic Jupyter Notebook you need to install the nbextension: @@ -96,7 +96,7 @@ If you are using the classic Jupyter Notebook you need to install the nbextensio Note for developers: - the ``-e`` pip option allows one to modify the Python code in-place. Restart the kernel in order to see the changes. -- the ``[dev]`` key allows one to install dev dependencies in optional-dependencies as well. +- the ``[docs]`` key allows one to install optional-dependencies to build docs. - the ``--symlink`` argument on Linux or OS X allows one to modify the JavaScript code in-place. This feature is not available with Windows. For developing with JupyterLab: diff --git a/RELEASE.md b/RELEASE.md index b7593b1..51eaf04 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,14 +5,13 @@ This document describes the release process of here-map-widget-for-jupyter, and The following are mandatory pre-release steps to bring the repository into a proper shape: -- Update versions in [pyproject.toml](pyproject.toml) -- Update versions in [here_map_widget/_version.py](here_map_widget/_version.py) as desired. +- Update versions in [here_map_widget/__about__.py](here_map_widget/__about__.py) as desired. - Update [js/package.json](js/package.json) with new npm package version. - Make sure all tests listed in `CONTRIBUTING.md` pass successfully. - Make sure badges appear as expected in the [README.md on GitHub](https://github.com/heremaps/here-map-widget-for-jupyter/blob/master/README.md). ## Packaging -- Install [hatch](https://hatch.pypa.io/1.13/) CLI via an installer, pip, or conda. +- Make sure [hatch](https://hatch.pypa.io/1.13/) CLI is installed via an installer, pip, or conda. - Run `hatch build` - Make sure sdist and wheel packages are created in [dist](dist/). - Make sure the wheel package works by `pip install /path/to/dist/directory/here_map_widget_for_jupyter-version-py2.py3-none-any.whl`. From d8a11bb1908facca5b03cb3d0f91c3579f8a5b5f Mon Sep 17 00:00:00 2001 From: Kento Tarui Date: Thu, 3 Jul 2025 17:25:06 +0900 Subject: [PATCH 5/7] build: add clean script in pyproject.toml Signed-off-by: Kento Tarui --- .gitignore | 16 +++++++++------- CONTRIBUTING.md | 14 ++++++++++++++ js/package.json | 1 + pyproject.toml | 16 ++++++++++++++-- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index ccc72cd..e1ec293 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,23 @@ -*.egg-info/ -.ipynb_checkpoints/ .idea/ .vscode/ -build/ -dist/ -*.py[cod] -src/* venv/ -# Compiled javascript +# Main module +*.py[cod] here_map_widget/static/ here_map_widget/nbextension/ here_map_widget/labextension/ +# Package +*.egg-info/ +dist/ + # OS X .DS_Store +# Notebooks +.ipynb_checkpoints/ + # Source javascript js/.yarn/ js/dist/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 77f3001..df73923 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,6 +45,20 @@ cd docs make html ``` +## Rebuild + +The following command allows you to delete final and intermediate artifacts from the project directory. + +```bash +hatch run clean-all +``` + +It's possible to try dry-run before executing removal. + +```bash +hatch run clean-all-dry +``` + ## Signing each Commit When you file a pull request, we ask that you sign off the diff --git a/js/package.json b/js/package.json index da231bc..24c6b83 100644 --- a/js/package.json +++ b/js/package.json @@ -34,6 +34,7 @@ ], "scripts": { "clean": "rimraf dist/ && rimraf ../here_map_widget/labextension/ && rimraf ../here_map_widget/nbextension", + "cleanAll": "yarn run clean && rimraf yarn.lock", "prepublish": "webpack --mode=production", "build": "webpack --mode=production", "build:extensions": "webpack --mode=production && jupyter labextension build .", diff --git a/pyproject.toml b/pyproject.toml index f1609e3..243bcf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,11 +85,23 @@ npm = [ ] + [tool.hatch.envs.default] -dependencies = [] +dependencies = ["pyclean"] [tool.hatch.envs.default.scripts] -clean = "" +clean-all = [ + "cd js && yarn run cleanAll", + "pyclean . --erase js/node_modules/**/* js/node_modules/ --yes --verbose", + "pyclean . --debris --verbose", + "pip uninstall -y here-map-widget-for-jupyter", +] +clean-all-dry = [ + "echo \"cd js && yarn run cleanAll\"", + "pyclean . --erase js/node_modules/**/* js/node_modules/ --yes --verbose --dry-run", + "pyclean . --debris --verbose --dry-run", + "echo \"pip uninstall -y here-map-widget-for-jupyter\"" +] [tool.hatch.envs.lint] detached = true From e6287d5f9f668f99b73d92c1b4de2e947a1aba3c Mon Sep 17 00:00:00 2001 From: Kento Tarui Date: Thu, 3 Jul 2025 18:04:14 +0900 Subject: [PATCH 6/7] build: update clean script in pyproject.toml Signed-off-by: Kento Tarui --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 243bcf0..15ae152 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,15 +92,15 @@ dependencies = ["pyclean"] [tool.hatch.envs.default.scripts] clean-all = [ "cd js && yarn run cleanAll", + "pip uninstall -y here-map-widget-for-jupyter", "pyclean . --erase js/node_modules/**/* js/node_modules/ --yes --verbose", "pyclean . --debris --verbose", - "pip uninstall -y here-map-widget-for-jupyter", ] clean-all-dry = [ "echo \"cd js && yarn run cleanAll\"", + "echo \"pip uninstall -y here-map-widget-for-jupyter\"", "pyclean . --erase js/node_modules/**/* js/node_modules/ --yes --verbose --dry-run", "pyclean . --debris --verbose --dry-run", - "echo \"pip uninstall -y here-map-widget-for-jupyter\"" ] [tool.hatch.envs.lint] From 4046e914d291767e21dc4e575bb5038c9c723f0e Mon Sep 17 00:00:00 2001 From: Kento Tarui Date: Thu, 3 Jul 2025 18:20:59 +0900 Subject: [PATCH 7/7] build: remove unnecessary files Signed-off-by: Kento Tarui --- .isort.cfg | 6 ------ Makefile | 38 -------------------------------------- 2 files changed, 44 deletions(-) delete mode 100644 .isort.cfg delete mode 100644 Makefile diff --git a/.isort.cfg b/.isort.cfg deleted file mode 100644 index c6dadbd..0000000 --- a/.isort.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[settings] -line_length=90 -multi_line_output=3 -include_trailing_comma=True -force_grid_wrap=0 -use_parentheses=True \ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 9efd5c8..0000000 --- a/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts - -clean-build: ## remove build artifacts - rm -fr build/ - rm -fr dist/ - rm -fr .eggs/ - find . -name '*.egg-info' -exec rm -fr {} + - find . -name '*.egg' -exec rm -f {} + - rm -rf js/*.tgz - rm -rf here_map_widget/nbextension - rm -rf here_map_widget/labextension - rm -rf js/dist - rm -rf js/node_modules - rm -rf js/package-lock.json - -clean-pyc: ## remove Python file artifacts - find . -name '*.pyc' -exec rm -f {} + - find . -name '*.pyo' -exec rm -f {} + - find . -name '*~' -exec rm -f {} + - find . -name '__pycache__' -exec rm -fr {} + - -clean-test: ## remove test and coverage artifacts - rm -fr .tox/ - rm -f .coverage - rm -fr htmlcov/ - rm -fr .mypy_cache - rm -fr .pytest_cache - find . -name '.ipynb_checkpoints' -exec rm -fr {} + - -black: - black -l 99 . - isort --atomic . - -lint: - isort --check --diff . - black -l 99 --diff --check . - -