Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-hatch-jupyter-builder for openSUSE:Factory checked in at 2023-04-24 22:31:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-hatch-jupyter-builder (Old) and /work/SRC/openSUSE:Factory/.python-hatch-jupyter-builder.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-hatch-jupyter-builder" Mon Apr 24 22:31:16 2023 rev:2 rq:1082335 version:0.8.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-hatch-jupyter-builder/python-hatch-jupyter-builder.changes 2022-12-26 23:28:12.288982964 +0100 +++ /work/SRC/openSUSE:Factory/.python-hatch-jupyter-builder.new.1533/python-hatch-jupyter-builder.changes 2023-04-24 22:31:28.691605132 +0200 @@ -1,0 +2,9 @@ +Sun Apr 23 21:09:46 UTC 2023 - Ben Greiner <c...@bnavigator.de> + +- Update to 0.8.3 + * Use local coverage #114 (@blink1073) + * Add more linting #106 (@blink1073) + * Fix test typing #104 (@blink1073) + * Add more ci checks #102 (@blink1073) + +------------------------------------------------------------------- Old: ---- hatch_jupyter_builder-0.8.2.tar.gz New: ---- hatch_jupyter_builder-0.8.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-hatch-jupyter-builder.spec ++++++ --- /var/tmp/diff_new_pack.vzyo7f/_old 2023-04-24 22:31:29.199608152 +0200 +++ /var/tmp/diff_new_pack.vzyo7f/_new 2023-04-24 22:31:29.203608175 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-hatch-jupyter-builder # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ # This si with alts/libalternatives only and has never been something else %bcond_without libalternatives Name: python-hatch-jupyter-builder -Version: 0.8.2 +Version: 0.8.3 Release: 0 Summary: A hatch plugin to help build Jupyter packages License: BSD-3-Clause @@ -51,6 +51,7 @@ %prep %autosetup -p1 -n hatch_jupyter_builder-%{version} +sed -i '/addopts/ s/--color=yes//' pyproject.toml %build %pyproject_wheel @@ -70,6 +71,7 @@ %python_uninstall_alternative hatch-jupyter-builder %files %{python_files} +%license LICENSE.txt %python_alternative %{_bindir}/hatch-jupyter-builder %{python_sitelib}/hatch_jupyter_builder %{python_sitelib}/hatch_jupyter_builder-%{version}.dist-info ++++++ hatch_jupyter_builder-0.8.2.tar.gz -> hatch_jupyter_builder-0.8.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/.github/workflows/tests.yml new/hatch_jupyter_builder-0.8.3/.github/workflows/tests.yml --- old/hatch_jupyter_builder-0.8.2/.github/workflows/tests.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/.github/workflows/tests.yml 2020-02-02 01:00:00.000000000 +0100 @@ -9,6 +9,10 @@ # * is a special character in YAML so you have to quote this string - cron: "0 0 * * 0" +defaults: + run: + shell: bash -eux {0} + jobs: build: runs-on: ubuntu-latest @@ -36,10 +40,15 @@ hatch-jupyter-builder -h hatch-jupyter-builder migrate -h hatch-jupyter-builder compare-migrated -h - - name: Code coverage - run: | - pip install codecov coverage[html] - codecov + - uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1 + + coverage: + runs-on: ubuntu-latest + needs: + - build + steps: + - uses: actions/checkout@v3 + - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1 check_release: runs-on: ubuntu-latest @@ -68,10 +77,19 @@ run: hatch run migration:test test_docs: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - uses: actions/checkout@v2 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Build API docs + run: | + hatch run docs:api + # If this fails run `hatch run docs:api` locally + # and commit. + git status --porcelain + git status -s | grep "A" && exit 1 + git status -s | grep "M" && exit 1 + echo "API docs done" - run: hatch run docs:build test_lint: @@ -84,7 +102,7 @@ run: | hatch run typing:test hatch run lint:style - pipx run 'validate-pyproject[all]' pyproject.toml + pipx run interrogate -v . pipx run doc8 --max-line-length=200 --ignore-path=docs/source/other/full-config.rst test_minimum_versions: @@ -135,7 +153,7 @@ tests_check: # This job does nothing and is only used for the branch protection if: always() needs: - - build + - coverage - migration - test_lint - test_docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/.pre-commit-config.yaml new/hatch_jupyter_builder-0.8.3/.pre-commit-config.yaml --- old/hatch_jupyter_builder-0.8.2/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/.pre-commit-config.yaml 2020-02-02 01:00:00.000000000 +0100 @@ -5,21 +5,22 @@ - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - - id: end-of-file-fixer - id: check-case-conflict + - id: check-ast + - id: check-docstring-first - id: check-executables-have-shebangs - - id: requirements-txt-fixer - id: check-added-large-files - id: check-case-conflict + - id: check-merge-conflict + - id: check-json - id: check-toml - id: check-yaml - id: debug-statements - - id: forbid-new-submodules - - id: check-builtin-literals + - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.19.2 + rev: 0.22.0 hooks: - id: check-github-workflows @@ -29,12 +30,12 @@ - id: mdformat - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 23.3.0 hooks: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.177 + rev: v0.0.260 hooks: - id: ruff args: ["--fix"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/CHANGELOG.md new/hatch_jupyter_builder-0.8.3/CHANGELOG.md --- old/hatch_jupyter_builder-0.8.2/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/CHANGELOG.md 2020-02-02 01:00:00.000000000 +0100 @@ -2,6 +2,30 @@ <!-- <START NEW CHANGELOG ENTRY> --> +## 0.8.3 + +([Full Changelog](https://github.com/jupyterlab/hatch-jupyter-builder/compare/v0.8.2...110ef7d5cc4b6118d21c130965f6e88ddf31ff22)) + +### Maintenance and upkeep improvements + +- Use local coverage [#114](https://github.com/jupyterlab/hatch-jupyter-builder/pull/114) ([@blink1073](https://github.com/blink1073)) +- Add more linting [#106](https://github.com/jupyterlab/hatch-jupyter-builder/pull/106) ([@blink1073](https://github.com/blink1073)) +- Fix test typing [#104](https://github.com/jupyterlab/hatch-jupyter-builder/pull/104) ([@blink1073](https://github.com/blink1073)) +- Add more ci checks [#102](https://github.com/jupyterlab/hatch-jupyter-builder/pull/102) ([@blink1073](https://github.com/blink1073)) + +### Documentation improvements + +- Add license classifier [#111](https://github.com/jupyterlab/hatch-jupyter-builder/pull/111) ([@fcollonval](https://github.com/fcollonval)) +- Add full api docs [#103](https://github.com/jupyterlab/hatch-jupyter-builder/pull/103) ([@blink1073](https://github.com/blink1073)) + +### Contributors to this release + +([GitHub contributors page for this release](https://github.com/jupyterlab/hatch-jupyter-builder/graphs/contributors?from=2022-12-13&to=2023-04-14&type=c)) + +[@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Ablink1073+updated%3A2022-12-13..2023-04-14&type=Issues) | [@codecov](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Acodecov+updated%3A2022-12-13..2023-04-14&type=Issues) | [@fcollonval](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Afcollonval+updated%3A2022-12-13..2023-04-14&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Apre-commit-ci+updated%3A2022-12-13..2023-04-14&type=Issues) + +<!-- <END NEW CHANGELOG ENTRY> --> + ## 0.8.2 ([Full Changelog](https://github.com/jupyterlab/hatch-jupyter-builder/compare/v0.8.1...dacbd9ba0115b0991870bf2b7d741ada0d1d4ffd)) @@ -31,8 +55,6 @@ [@blink1073](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Ablink1073+updated%3A2022-10-14..2022-12-13&type=Issues) | [@codecov](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Acodecov+updated%3A2022-10-14..2022-12-13&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyterlab%2Fhatch-jupyter-builder+involves%3Apre-commit-ci+updated%3A2022-10-14..2022-12-13&type=Issues) -<!-- <END NEW CHANGELOG ENTRY> --> - ## 0.8.1 ([Full Changelog](https://github.com/jupyterlab/hatch-jupyter-builder/compare/v0.8.0...8257c8561d946def6193ad63afa446e0b261cb39)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/PKG-INFO new/hatch_jupyter_builder-0.8.3/PKG-INFO --- old/hatch_jupyter_builder-0.8.2/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/PKG-INFO 2020-02-02 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hatch-jupyter-builder -Version: 0.8.2 +Version: 0.8.3 Summary: A hatch plugin to help build Jupyter packages Project-URL: Documentation, https://github.com/jupyterlab/hatch-jupyter-builder#readme Project-URL: Issues, https://github.com/jupyterlab/hatch-jupyter-builder/issues @@ -36,6 +36,7 @@ License-File: LICENSE.txt Keywords: hatch,jupyter,jupyterlab Classifier: Development Status :: 4 - Beta +Classifier: License :: OSI Approved :: BSD License Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 @@ -49,6 +50,8 @@ Requires-Dist: hatch-jupyter-builder; extra == 'docs' Requires-Dist: myst-parser; extra == 'docs' Requires-Dist: pydata-sphinx-theme; extra == 'docs' +Requires-Dist: sphinx-autodoc-typehints; extra == 'docs' +Requires-Dist: sphinxcontrib-spelling; extra == 'docs' Provides-Extra: test Requires-Dist: hatch; extra == 'test' Requires-Dist: pytest; extra == 'test' @@ -61,7 +64,6 @@ # hatch-jupyter-builder [](https://pypi.org/project/hatch-jupyter-builder) -[](https://codecov.io/gh/jupyterlab/hatch-jupyter-builder) [](https://github.com/pypa/hatch) ______________________________________________________________________ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/README.md new/hatch_jupyter_builder-0.8.3/README.md --- old/hatch_jupyter_builder-0.8.2/README.md 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/README.md 2020-02-02 01:00:00.000000000 +0100 @@ -1,7 +1,6 @@ # hatch-jupyter-builder [](https://pypi.org/project/hatch-jupyter-builder) -[](https://codecov.io/gh/jupyterlab/hatch-jupyter-builder) [](https://github.com/pypa/hatch) ______________________________________________________________________ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/codecov.yml new/hatch_jupyter_builder-0.8.3/codecov.yml --- old/hatch_jupyter_builder-0.8.2/codecov.yml 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/codecov.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -coverage: - status: - project: - default: - target: auto - threshold: 1 - patch: - default: - target: 0% diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/docs/conf.py new/hatch_jupyter_builder-0.8.3/docs/conf.py --- old/hatch_jupyter_builder-0.8.2/docs/conf.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/docs/conf.py 2020-02-02 01:00:00.000000000 +0100 @@ -33,7 +33,19 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ["sphinx.ext.napoleon", "sphinx.ext.autodoc", "myst_parser"] +extensions = [ + "sphinx.ext.napoleon", + "sphinx.ext.autodoc", + "myst_parser", + "sphinx_autodoc_typehints", +] + +try: + import enchant # type:ignore # noqa + + extensions += ["sphinxcontrib.spelling"] +except ImportError: + pass myst_enable_extensions = ["html_image"] @@ -53,6 +65,9 @@ # html_theme = "pydata_sphinx_theme" +# Example configuration for intersphinx: refer to the Python standard library. +intersphinx_mapping = {"python": {"https://docs.python.org/3/": None}} + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/docs/source/reference/api/hatch_jupyter_builder.compare_migrated.rst new/hatch_jupyter_builder-0.8.3/docs/source/reference/api/hatch_jupyter_builder.compare_migrated.rst --- old/hatch_jupyter_builder-0.8.2/docs/source/reference/api/hatch_jupyter_builder.compare_migrated.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/docs/source/reference/api/hatch_jupyter_builder.compare_migrated.rst 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,19 @@ +hatch\_jupyter\_builder.compare\_migrated package +================================================= + +Submodules +---------- + + +.. automodule:: hatch_jupyter_builder.compare_migrated.cli + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: hatch_jupyter_builder.compare_migrated + :members: + :undoc-members: + :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/docs/source/reference/api/hatch_jupyter_builder.migrate.rst new/hatch_jupyter_builder-0.8.3/docs/source/reference/api/hatch_jupyter_builder.migrate.rst --- old/hatch_jupyter_builder-0.8.2/docs/source/reference/api/hatch_jupyter_builder.migrate.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/docs/source/reference/api/hatch_jupyter_builder.migrate.rst 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,19 @@ +hatch\_jupyter\_builder.migrate package +======================================= + +Submodules +---------- + + +.. automodule:: hatch_jupyter_builder.migrate.cli + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: hatch_jupyter_builder.migrate + :members: + :undoc-members: + :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/docs/source/reference/api/hatch_jupyter_builder.rst new/hatch_jupyter_builder-0.8.3/docs/source/reference/api/hatch_jupyter_builder.rst --- old/hatch_jupyter_builder-0.8.2/docs/source/reference/api/hatch_jupyter_builder.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/docs/source/reference/api/hatch_jupyter_builder.rst 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,46 @@ +hatch\_jupyter\_builder package +=============================== + +Subpackages +----------- + +.. toctree:: + :maxdepth: 4 + + hatch_jupyter_builder.compare_migrated + hatch_jupyter_builder.migrate + +Submodules +---------- + + +.. automodule:: hatch_jupyter_builder.cli + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: hatch_jupyter_builder.hooks + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: hatch_jupyter_builder.plugin + :members: + :undoc-members: + :show-inheritance: + + +.. automodule:: hatch_jupyter_builder.utils + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: hatch_jupyter_builder + :members: + :undoc-members: + :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/docs/source/reference/api/modules.rst new/hatch_jupyter_builder-0.8.3/docs/source/reference/api/modules.rst --- old/hatch_jupyter_builder-0.8.2/docs/source/reference/api/modules.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/docs/source/reference/api/modules.rst 2020-02-02 01:00:00.000000000 +0100 @@ -0,0 +1,7 @@ +hatch_jupyter_builder +===================== + +.. toctree:: + :maxdepth: 4 + + hatch_jupyter_builder diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/docs/source/reference/api_docs.rst new/hatch_jupyter_builder-0.8.3/docs/source/reference/api_docs.rst --- old/hatch_jupyter_builder-0.8.2/docs/source/reference/api_docs.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/docs/source/reference/api_docs.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -API Docs -======== - -.. _npm_builder_function: - -NPM Builder Function --------------------- -.. automodule:: hatch_jupyter_builder.utils - :noindex: - :members: npm_builder - -Utility Functions ------------------ -.. automodule:: hatch_jupyter_builder.utils - :members: - :exclude-members: npm_builder diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/docs/source/reference/index.rst new/hatch_jupyter_builder-0.8.3/docs/source/reference/index.rst --- old/hatch_jupyter_builder-0.8.2/docs/source/reference/index.rst 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/docs/source/reference/index.rst 2020-02-02 01:00:00.000000000 +0100 @@ -6,5 +6,5 @@ :maxdepth: 1 :caption: Contents: - api_docs + API Docs <api/modules> changelog diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/__init__.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/__init__.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/__init__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/__init__.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,3 @@ from .utils import is_stale, npm_builder # noqa F401 -__version__ = "0.8.2" +__version__ = "0.8.3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/__main__.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/__main__.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/__main__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/__main__.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""The cli entry point for hatch_jupyter_builder.""" from .cli import run run() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/cli.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/cli.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/cli.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/cli.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""The cli implementation for hatch_jupyter_builder.""" import argparse import sys from typing import Optional @@ -9,6 +10,7 @@ def make_parser( parser: Optional[argparse.ArgumentParser] = None, prog: Optional[str] = None ) -> argparse.ArgumentParser: + """Make an arg parser.""" if parser is None: parser = argparse.ArgumentParser(prog=prog) parsers = parser.add_subparsers() @@ -25,6 +27,7 @@ def run(args: Optional[argparse.Namespace] = None) -> None: + """Run the main script.""" if args is None: prog = ( f"{sys.executable} -m hatch_jupyter_builder" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/compare_migrated/__main__.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/compare_migrated/__main__.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/compare_migrated/__main__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/compare_migrated/__main__.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""The cli entry point for compare_migrated.""" from .cli import run run() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/compare_migrated/cli.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/compare_migrated/cli.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/compare_migrated/cli.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/compare_migrated/cli.py 2020-02-02 01:00:00.000000000 +0100 @@ -12,6 +12,7 @@ def build_file(dirname, dist_name): + """Build a dist file in a directory.""" orig_dir = os.getcwd() os.chdir(dirname) if os.path.exists("dist"): @@ -21,18 +22,21 @@ def get_tar_names(dirname): + """Get the tarball names in a directory.""" dist_file = glob.glob(f"{dirname}/dist/*.tar.gz")[0] tarf = tarfile.open(dist_file, "r:gz") return set(tarf.getnames()) def get_zip_names(dirname): + """Get the zip (wheel) file names in a directory.""" wheel_file = glob.glob(f"{dirname}/dist/*.whl")[0] with zipfile.ZipFile(wheel_file, "r") as f: return set(f.namelist()) def filter_file(path): + """Filter a file path for interesting files.""" if "egg-info" in path: return True _, ext = os.path.splitext(path) @@ -44,6 +48,7 @@ def main(source_dir, target_dir, dist_name): + """The main script.""" subprocess.check_call([sys.executable, "-m", "pip", "install", "build"]) logger = logging.getLogger(__name__) @@ -79,6 +84,7 @@ def make_parser( parser: Optional[argparse.ArgumentParser] = None, prog: Optional[str] = None ) -> argparse.ArgumentParser: + """Make an arg parser.""" if parser is None: parser = argparse.ArgumentParser(prog=prog) parser.add_argument(dest="source_dir", help="Source Directory") @@ -88,6 +94,7 @@ def run(args: Optional[argparse.Namespace] = None) -> None: + """Run the cli.""" if args is None: parser = make_parser(prog=f"{sys.executable} -m hatch_jupyter_builder.compare_migrated") args = parser.parse_args() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/hooks.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/hooks.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/hooks.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/hooks.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""Register hooks for the plugin.""" from hatchling.plugin import hookimpl from .plugin import JupyterBuildHook @@ -5,4 +6,5 @@ @hookimpl def hatch_register_build_hook(): + """Get the hook implementation.""" return JupyterBuildHook diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/migrate/__main__.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/migrate/__main__.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/migrate/__main__.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/migrate/__main__.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""Entry point for migration cli.""" from .cli import run run() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/migrate/_migrate.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/migrate/_migrate.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/migrate/_migrate.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/migrate/_migrate.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""Handle migration.""" import json import logging import os @@ -33,7 +34,7 @@ data = tomli.loads(pyproject.read_text("utf-8")) requires = data["build-system"]["requires"] # Install the old build reqs into this venv. - subprocess.run([sys.executable, "-m", "pip", "install"] + requires) + subprocess.run([sys.executable, "-m", "pip", "install", *requires]) requires = [ r for r in requires @@ -155,9 +156,8 @@ if build_args_table: builder_table["build-kwargs"] = build_args_table.copy() - if build_args_table.get("npm"): - if "editable-build-kwargs" in builder_table: - builder_table["editable-build-kwargs"]["npm"] = build_args_table["npm"] + if build_args_table.get("npm") and "editable-build-kwargs" in builder_table: + builder_table["editable-build-kwargs"]["npm"] = build_args_table["npm"] # Add artifacts config for package data that would be ignored. project_name = data.get("project", {}).get("name", "") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/migrate/cli.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/migrate/cli.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/migrate/cli.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/migrate/cli.py 2020-02-02 01:00:00.000000000 +0100 @@ -14,13 +14,11 @@ def main(td, target_dir): + """Main script.""" logger = logging.getLogger(__name__) logging.basicConfig() venv.create(td, with_pip=True) - if os.name == "nt": - python = Path(td) / "Scripts/python.exe" - else: - python = Path(td) / "bin/python" + python = Path(td) / "Scripts/python.exe" if os.name == "nt" else Path(td) / "bin/python" logger.info("Installing in temporary virtual environment...") @@ -40,6 +38,7 @@ def make_parser( parser: Optional[argparse.ArgumentParser] = None, prog: Optional[str] = None ) -> argparse.ArgumentParser: + """Make a parser object.""" if parser is None: parser = argparse.ArgumentParser(prog=prog) parser.add_argument(dest="target_dir", help="Target Directory") @@ -47,6 +46,7 @@ def run(args: Optional[argparse.Namespace] = None) -> None: + """Run the migration.""" if args is None: parser = make_parser(prog=f"{sys.executable} -m hatch_jupyter_builder.migrate") args = parser.parse_args() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/migrate/jupyter_packaging.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/migrate/jupyter_packaging.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/migrate/jupyter_packaging.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/migrate/jupyter_packaging.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""Shim for jupyter packaging migration.""" import os import sys from pathlib import Path @@ -57,6 +58,7 @@ def skip_if_exists(paths, *args): + """Shim for skip if exists""" if paths: data = {"skip-if-exists": [_normalize_path(p) for p in paths]} _write_config("tool.hatch.build.hooks.jupyter-builder", data) @@ -64,6 +66,7 @@ def ensure_targets(targets): + """Shim for ensure targets""" if targets: data = {"ensured-targets": [_normalize_path(t) for t in targets]} _write_config("tool.hatch.build.hooks.jupyter-builder", data) @@ -78,6 +81,7 @@ ensured_targets=None, skip_if_exists=None, ): + """Shim for wrap_installers.""" if pre_develop or post_develop: func = pre_develop or post_develop build_kwargs = _get_build_kwargs(**func.__kwargs) @@ -105,11 +109,12 @@ def create_cmdclass( prerelease_cmd=None, package_data_spec=None, data_files_spec=None, exclude=None ): + """Shim for create_cmdclass.""" shared_data = {} if data_files_spec is not None: - for (path, dname, pattern) in data_files_spec: + for path, dname, pattern in data_files_spec: if os.path.isabs(dname): - dname = os.path.relpath(dname, os.getcwd()) + dname = os.path.relpath(dname, os.getcwd()) # noqa if pattern == "**": shared_data[dname] = path else: @@ -128,6 +133,7 @@ def install_npm( path=None, build_dir=None, source_dir=None, build_cmd="build", force=False, npm=None ): + """Shim for install_npm.""" build_kwargs = _get_build_kwargs(**locals()) if build_kwargs: _write_config("tool.hatch.build.hooks.jupyter-builder.build-kwargs", build_kwargs) @@ -145,6 +151,7 @@ def npm_builder( path=None, build_dir=None, source_dir=None, build_cmd="build", force=False, npm=None ): + """Shim for npm_builder.""" func = __real_jupyter_packaging.npm_builder( path=path, build_dir=build_dir, @@ -154,12 +161,13 @@ npm=npm, ) func.__kwargs = {} - for name in _npm_kwargs + ["force"]: + for name in [*_npm_kwargs, "force"]: func.__kwargs[name] = locals()[name] return func def __getattr__(name): + """Defer to the original for all others.""" return getattr(__real_jupyter_packaging, name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/plugin.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/plugin.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/plugin.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/plugin.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""The main plugin for hatch_jupyter_builder.""" import os import typing as t import warnings @@ -29,9 +30,12 @@ class JupyterBuildHook(BuildHookInterface): + """The hatch jupyter builder build hook.""" + PLUGIN_NAME = "jupyter-builder" def initialize(self, version, build_data): + """Initialize the plugin.""" log = _get_log() log.info("Running jupyter-builder") if self.target_name not in ["wheel", "sdist"]: @@ -78,7 +82,7 @@ build_func(self.target_name, version, **build_kwargs) except Exception as e: if version == "editable" and config.optional_editable_build.lower() == "true": - warnings.warn(f"Encountered build error:\n{e}") + warnings.warn(f"Encountered build error:\n{e}") # noqa B028 else: raise e else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/utils.py new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/utils.py --- old/hatch_jupyter_builder-0.8.2/hatch_jupyter_builder/utils.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/hatch_jupyter_builder/utils.py 2020-02-02 01:00:00.000000000 +0100 @@ -1,3 +1,4 @@ +"""Utilities for hatch_jupyter_builder.""" import importlib import logging import os @@ -13,6 +14,7 @@ else: def list2cmdline(cmd_list): + """Implementation of list2cmdline for posix systems.""" return " ".join(map(shlex.quote, cmd_list)) @@ -20,7 +22,7 @@ def _get_log() -> logging.Logger: - global _logger + global _logger # noqa if _logger: return _logger _logger = logging.getLogger(__name__) @@ -97,10 +99,7 @@ log.warning("yarn not found, ignoring yarn.lock file") is_yarn = False - if is_yarn: - npm = ["yarn"] - else: - npm = ["npm"] + npm = ["yarn"] if is_yarn else ["npm"] npm_cmd = normalize_cmd(npm) @@ -111,9 +110,9 @@ if should_build: log.info("Installing build dependencies with npm. This may take a while...") - run(npm_cmd + ["install"], cwd=str(abs_path)) + run([*npm_cmd, "install"], cwd=str(abs_path)) if build_cmd: - run(npm_cmd + ["run", build_cmd], cwd=str(abs_path)) + run([*npm_cmd, "run", build_cmd], cwd=str(abs_path)) else: log.info("No build required") @@ -179,6 +178,7 @@ def get_build_func(build_func_str: str) -> Callable[..., None]: + """Get a build function by name.""" # Get the build function by importing it. mod_name, _, func_name = build_func_str.rpartition(".") @@ -193,17 +193,19 @@ def normalize_cmd(cmd: Union[str, list]) -> List[str]: + """Normalize a subprocess command.""" if not isinstance(cmd, (list, tuple)): cmd = shlex.split(cmd, posix=os.name != "nt") if not Path(cmd[0]).is_absolute(): # If a command is not an absolute path find it first. cmd_path = which(cmd[0]) if not cmd_path: - raise ValueError( + msg = ( f"Aborting. Could not find cmd ({cmd[0]}) in path. " "If command is not expected to be in user's path, " "use an absolute path." ) + raise ValueError(msg) cmd[0] = cmd_path return cmd @@ -213,7 +215,7 @@ result = {} for key, value in kwargs.items(): if isinstance(value, bool): - value = str(value) + value = str(value) # noqa result[key.replace("-", "_")] = value return result @@ -231,7 +233,8 @@ """Ensure that target files are available""" for target in ensured_targets: if not Path(target).exists(): - raise ValueError(f'Ensured target "{target}" does not exist') + msg = f'Ensured target "{target}" does not exist' + raise ValueError(msg) _get_log().info("Ensured target(s) exist!") @@ -243,6 +246,7 @@ def install_pre_commit_hook(): + """Install a pre-commit hook.""" data = f"""#!/usr/bin/env bash INSTALL_PYTHON={sys.executable} ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-commit) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/pyproject.toml new/hatch_jupyter_builder-0.8.3/pyproject.toml --- old/hatch_jupyter_builder-0.8.2/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/pyproject.toml 2020-02-02 01:00:00.000000000 +0100 @@ -15,6 +15,7 @@ ] classifiers = [ "Development Status :: 4 - Beta", + "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -32,7 +33,7 @@ [project.optional-dependencies] test = ["pytest", "pytest-mock", "hatch", "pytest-cov", "tomli", "twine"] -docs = ["pydata-sphinx-theme", "myst-parser", "hatch_jupyter_builder"] +docs = ["pydata-sphinx-theme", "myst-parser", "hatch_jupyter_builder", "sphinxcontrib-spelling", "sphinx-autodoc-typehints"] [project.scripts] hatch-jupyter-builder = 'hatch_jupyter_builder.cli:run' @@ -45,8 +46,11 @@ [tool.hatch.envs.docs] features = ["docs"] +[tool.hatch.envs.docs.env-vars] +SPHINXOPTS = "-W" [tool.hatch.envs.docs.scripts] -build = "make -C docs html SPHINXOPTS='-W'" +build = "make -C docs html" +api = "sphinx-apidoc -o docs/source/reference/api -f -E hatch_jupyter_builder hatch_jupyter_builder/migrate/jupyter_packaging.py" [tool.hatch.envs.test] features = ["test"] @@ -74,9 +78,9 @@ [tool.hatch.envs.lint] dependencies = [ - "black>=22.6.0", + "black[jupyter]==23.3.0", "mdformat>0.7", - "ruff==0.0.177", + "ruff==0.0.260", ] [tool.hatch.envs.lint.scripts] style = [ @@ -106,6 +110,8 @@ "hatch_jupyter_builder/migrate/*", "hatch_jupyter_builder/compare_migrated/*" ] +relative_files = true +source = ["hatch_jupyter_builder"] [tool.mypy] check_untyped_defs = true @@ -128,8 +134,9 @@ target-version = "py38" line-length = 100 select = [ - "A", "B", "C", "E", "F", "FBT", "I", "N", "Q", "RUF", "S", "T", - "UP", "W", "YTT", + "A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N", + "PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "SIM", "T", "TID", "UP", + "W", "YTT", ] ignore = [ # Allow non-abstract empty methods in abstract base classes @@ -160,6 +167,12 @@ "N806", # Exception name `KernelSessionRecordConflict` should be named with an Error suffix "N818", + # SIM105 Use `contextlib.suppress(...)` + "SIM105", + # PLR0913 Too many arguments to function call + "PLR0913", + # PLR0912 Too many branches + "PLR0912", ] unfixable = [ # Don't touch print statements @@ -176,4 +189,16 @@ # C408 Unnecessary `dict` call # E402 Module level import not at top of file # T201 `print` found -"tests/*" = ["B011", "F841", "C408", "E402", "T201"] +# EM101 Exception must not use a string literal +# PLR2004 Magic value used in comparison +"tests/*" = ["B011", "F841", "C408", "E402", "T201", "EM101", "EM102", "EM103", "PLR2004"] + +[tool.interrogate] +ignore-init-module=true +ignore-private=true +ignore-semiprivate=true +ignore-property-decorators=true +ignore-nested-functions=true +ignore-nested-classes=true +fail-under=100 +exclude = ["docs", "tests"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/tests/conftest.py new/hatch_jupyter_builder-0.8.3/tests/conftest.py --- old/hatch_jupyter_builder-0.8.2/tests/conftest.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/tests/conftest.py 2020-02-02 01:00:00.000000000 +0100 @@ -21,8 +21,7 @@ if item.config.getoption("--migration-tests") is True: if not is_migration_test: pytest.skip("Only running tests marked as 'migration_test'.") - else: - if is_migration_test: - pytest.skip( - "Skipping this test because it's marked 'migration_test'. Run integration tests using the `--migration-tests` flag." - ) + elif is_migration_test: + pytest.skip( + "Skipping this test because it's marked 'migration_test'. Run integration tests using the `--migration-tests` flag." + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/tests/data/create_cmdclass/myproject/examples/introduction.ipynb new/hatch_jupyter_builder-0.8.3/tests/data/create_cmdclass/myproject/examples/introduction.ipynb --- old/hatch_jupyter_builder-0.8.2/tests/data/create_cmdclass/myproject/examples/introduction.ipynb 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/tests/data/create_cmdclass/myproject/examples/introduction.ipynb 2020-02-02 01:00:00.000000000 +0100 @@ -32,7 +32,7 @@ "metadata": {}, "outputs": [], "source": [ - "assert w.value == 'Hello World'" + "assert w.value == \"Hello World\"" ] } ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/tests/data/create_cmdclass/myproject/tsconfig.json new/hatch_jupyter_builder-0.8.3/tests/data/create_cmdclass/myproject/tsconfig.json --- old/hatch_jupyter_builder-0.8.2/tests/data/create_cmdclass/myproject/tsconfig.json 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/tests/data/create_cmdclass/myproject/tsconfig.json 2020-02-02 01:00:00.000000000 +0100 @@ -14,7 +14,7 @@ "sourceMap": true, "strict": true, "strictPropertyInitialization": false, - "target": "es2015", + "target": "es2018", "types": ["jest"] }, "include": ["src/**/*.ts", "src/**/*.tsx"], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/tests/data/npm_builder/myextension/tsconfig.json new/hatch_jupyter_builder-0.8.3/tests/data/npm_builder/myextension/tsconfig.json --- old/hatch_jupyter_builder-0.8.2/tests/data/npm_builder/myextension/tsconfig.json 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/tests/data/npm_builder/myextension/tsconfig.json 2020-02-02 01:00:00.000000000 +0100 @@ -17,7 +17,7 @@ "rootDir": "src", "strict": true, "strictNullChecks": true, - "target": "es2017", + "target": "es2018", "types": [] }, "include": ["src/*"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/tests/test_npm_builder.py new/hatch_jupyter_builder-0.8.3/tests/test_npm_builder.py --- old/hatch_jupyter_builder-0.8.2/tests/test_npm_builder.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/tests/test_npm_builder.py 2020-02-02 01:00:00.000000000 +0100 @@ -36,7 +36,7 @@ run.assert_not_called() del os.environ["HATCH_JUPYTER_BUILDER_SKIP_NPM"] - sys.argv = sys.argv + ["--skip-npm"] + sys.argv = [*sys.argv, "--skip-npm"] npm_builder("wheel", "standard", path=repo) run.assert_not_called() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hatch_jupyter_builder-0.8.2/tests/test_plugin.py new/hatch_jupyter_builder-0.8.3/tests/test_plugin.py --- old/hatch_jupyter_builder-0.8.2/tests/test_plugin.py 2020-02-02 01:00:00.000000000 +0100 +++ new/hatch_jupyter_builder-0.8.3/tests/test_plugin.py 2020-02-02 01:00:00.000000000 +0100 @@ -7,11 +7,16 @@ from pathlib import Path import pytest +from hatchling.metadata.core import ProjectMetadata +from hatchling.plugin.manager import PluginManager from hatch_jupyter_builder.plugin import JupyterBuildHook def test_build_hook(tmp_path): + manager = PluginManager() + meta = ProjectMetadata(".", manager, {}) + if "SKIP_JUPYTER_BUILD" in os.environ: del os.environ["SKIP_JUPYTER_BUILD"] @@ -30,14 +35,14 @@ test.write_text(text, encoding="utf-8") os.makedirs(".git/hooks") - hook = JupyterBuildHook(tmp_path, config, {}, {}, tmp_path, "wheel") + hook = JupyterBuildHook(tmp_path, config, {}, meta, tmp_path, "wheel") assert hook.initialize("standard", {}) assert hook.initialize("editable", {}) - hook = JupyterBuildHook(tmp_path, config, {}, {}, tmp_path, "sdist") + hook = JupyterBuildHook(tmp_path, config, {}, meta, tmp_path, "sdist") assert hook.initialize("standard", {}) - hook = JupyterBuildHook(tmp_path, {}, {}, {}, tmp_path, "wheel") + hook = JupyterBuildHook(tmp_path, {}, {}, meta, tmp_path, "wheel") assert hook.initialize("standard", {}) assert hook.initialize("editable", {}) @@ -48,7 +53,7 @@ config["editable-build-kwargs"] = {"foo-bar": "2", "fizz_buzz": "3"} assert hook.initialize("editable", {}) - hook = JupyterBuildHook(tmp_path, config, {}, {}, tmp_path, "foo") + hook = JupyterBuildHook(tmp_path, config, {}, meta, tmp_path, "foo") assert not hook.initialize("standard", {}) text = """ @@ -59,7 +64,7 @@ # Force a re-import del sys.modules["test"] - hook = JupyterBuildHook(tmp_path, config, {}, {}, tmp_path, "wheel") + hook = JupyterBuildHook(tmp_path, config, {}, meta, tmp_path, "wheel") with pytest.raises(RuntimeError): hook.initialize("editable", {}) @@ -68,13 +73,13 @@ del os.environ["SKIP_JUPYTER_BUILDER"] config["optional-editable-build"] = "true" - hook = JupyterBuildHook(tmp_path, config, {}, {}, tmp_path, "wheel") + hook = JupyterBuildHook(tmp_path, config, {}, meta, tmp_path, "wheel") with warnings.catch_warnings(): warnings.simplefilter("ignore") assert hook.initialize("editable", {}) config["optional-editable-build"] = True - hook = JupyterBuildHook(tmp_path, config, {}, {}, tmp_path, "wheel") + hook = JupyterBuildHook(tmp_path, config, {}, meta, tmp_path, "wheel") with warnings.catch_warnings(): warnings.simplefilter("ignore") assert hook.initialize("editable", {})