From d207444e4011eefeee6ebc010f33854c08f4bd41 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 12:07:01 -0500 Subject: [PATCH 01/13] migrate docs environment from nox to hatch --- .github/workflows/docs.yml | 11 ++----- noxfile.py | 29 ------------------ pyproject.toml | 63 +++++++++++++++++++++++--------------- 3 files changed, 42 insertions(+), 61 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7e7283e2..8457d6a4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -26,11 +26,8 @@ jobs: with: python-version: "3.x" - - name: Build Docs - run: pipx run nox -s docs - - name: Check documentation - run: pipx run linkchecker --config .linkcheckerrc site + run: hatch run docs:build-check dev publish: runs-on: ubuntu-latest @@ -52,8 +49,7 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'scipp-atlas/mario-mapyde' - run: | - pipx run nox -s mike -- --push dev + run: hatch run docs:deploy dev - name: Get MAJOR.MINOR version if: github.event_name == 'release' && github.event.action == 'published' @@ -65,5 +61,4 @@ jobs: - name: Deploy documentation (${{ steps.label.outputs.version }}) with mike 🚀 if: github.event_name == 'release' && github.event.action == 'published' - run: | - pipx run nox -s mike -- --push --update-aliases ${{ steps.label.outputs.version }} latest + run: hatch run docs:deploy ${{ steps.label.outputs.version }} latest diff --git a/noxfile.py b/noxfile.py index 9a9c1f54..fd456b51 100644 --- a/noxfile.py +++ b/noxfile.py @@ -39,35 +39,6 @@ def tests(session: nox.Session) -> None: session.run("pytest", *session.posargs) -@nox.session -def docs(session: nox.Session) -> None: - """ - Build the docs. Pass "serve" to serve. - """ - - session.install(".[docs]") - session.run("mkdocs", "build") - - if session.posargs: - if "serve" in session.posargs: - print("Launching docs at http://localhost:8000/ - use Ctrl-C to quit") - session.run("python", "-m", "http.server", "8000", "-d", "site") - else: - session.warn("Unsupported argument to docs") - - -@nox.session -def mike(session: nox.Session) -> None: - """ - Build and deploy docs using mike. - """ - - session.install(".[docs]") - - args = session.posargs or ["dev"] - session.run("mike", "deploy", "--branch", "gh-pages", *args) - - @nox.session def build(session: nox.Session) -> None: """ diff --git a/pyproject.toml b/pyproject.toml index f4d288f3..be16ce77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,30 +51,6 @@ dev = [ "pytest >=6", "tbump>=6.7.0" ] -docs = [ - "mkdocs>=1.4.0", - "mkdocs-material>=8.5.6", - # Plugins - "mkdocs-minify-plugin>=0.5.0", - "mkdocs-git-revision-date-localized-plugin>=1.1.0", - "mkdocstrings[python]>=0.18", - "mkdocs-redirects>=1.1.0", - "mkdocs-glightbox>=0.3.0", - # https://github.com/jimporter/mike/issues/82#issuecomment-1172913929 - "mike @ https://github.com/jimporter/mike/archive/392d57b8bb9d14bcedf2451a0dc302709f8055eb.zip", - # Extensions - "mkdocs-click>=0.8.0", - "pymdown-extensions>=9.7.0", - # Necessary for syntax highlighting in code blocks - "pygments>=2.13.0", - # Validation - # https://github.com/linkchecker/linkchecker/pull/669#issuecomment-1267236287 - "linkchecker @ git+https://github.com/linkchecker/linkchecker.git@d9265bb71c2054bf57b8c5734a4825d62505c779", - # auto-generation of docs - "mkdocs-gen-files>=0.4", - "mkdocs-literate-nav>=0.5.0", - "mkdocs-section-index>=0.3.4", -] # see https://github.com/pypi/warehouse/blob/main/warehouse/templates/packaging/detail.html [project.urls] @@ -123,6 +99,45 @@ dependencies = [ "pytest", ] +[tool.hatch.envs.docs] +dependencies = [ + "mkdocs>=1.4.0", + "mkdocs-material>=8.5.6", + # Plugins + "mkdocs-minify-plugin>=0.5.0", + "mkdocs-git-revision-date-localized-plugin>=1.1.0", + "mkdocstrings[python]>=0.18", + "mkdocs-redirects>=1.1.0", + "mkdocs-glightbox>=0.3.0", + # https://github.com/jimporter/mike/issues/82#issuecomment-1172913929 + "mike @ https://github.com/jimporter/mike/archive/392d57b8bb9d14bcedf2451a0dc302709f8055eb.zip", + # Extensions + "mkdocs-click>=0.8.0", + "pymdown-extensions>=9.7.0", + # Necessary for syntax highlighting in code blocks + "pygments>=2.13.0", + # Validation + # https://github.com/linkchecker/linkchecker/pull/669#issuecomment-1267236287 + "linkchecker @ git+https://github.com/linkchecker/linkchecker.git@d9265bb71c2054bf57b8c5734a4825d62505c779", + # auto-generation of docs + "mkdocs-gen-files>=0.4", + "mkdocs-literate-nav>=0.5.0", + "mkdocs-section-index>=0.3.4", +] +[tool.hatch.envs.docs.env-vars] +MKDOCS_CONFIG = "mkdocs.yml" +MKDOCS_BRANCH = "gh-pages" +[tool.hatch.envs.docs.scripts] +build = "mkdocs build --config-file {env:MKDOCS_CONFIG} --clean --strict {args}" +serve = "mkdocs serve --config-file {env:MKDOCS_CONFIG} --dev-addr localhost:8000 {args}" +ci-build = "mike deploy --config-file {env:MKDOCS_CONFIG} --branch {env:MKDOCS_BRANCH} --update-aliases {args}" +deploy = "ci-build --push" +validate = "linkchecker --config .linkcheckerrc site" +# https://github.com/linkchecker/linkchecker/issues/678 +build-check = [ + "build --no-directory-urls", + "validate", +] [tool.pytest.ini_options] minversion = "6.0" From 01415c6e6e6de9e15ccaa39ba45228257acf967a Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 12:28:48 -0500 Subject: [PATCH 02/13] migrate lint from nox to hatch --- .github/workflows/ci.yml | 7 +++---- noxfile.py | 22 +--------------------- pyproject.toml | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f69fe589..18a41c87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,13 +27,12 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.x" - - uses: pre-commit/action@v3.0.0 - with: - extra_args: --hook-stage manual --all-files + - name: Run pre-commit + run: hatch run lint:pre-commit - name: Run PyLint run: | echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" - pipx run nox -s pylint + hatch run lint:pylint checks: name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} diff --git a/noxfile.py b/noxfile.py index fd456b51..db65d49d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -7,27 +7,7 @@ DIR = Path(__file__).parent.resolve() -nox.options.sessions = ["lint", "pylint", "tests"] - - -@nox.session -def lint(session: nox.Session) -> None: - """ - Run the linter. - """ - session.install("pre-commit") - session.run("pre-commit", "run", "--all-files", *session.posargs) - - -@nox.session -def pylint(session: nox.Session) -> None: - """ - Run PyLint. - """ - # This needs to be installed into the package environment, and is slower - # than a pre-commit check - session.install(".", "pylint") - session.run("pylint", "src", *session.posargs) +nox.options.sessions = ["tests"] @nox.session diff --git a/pyproject.toml b/pyproject.toml index be16ce77..f8452bca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,6 +99,21 @@ dependencies = [ "pytest", ] +[tool.hatch.envs.lint] +# pylint needs to be installed into package environment +detached = false +dependencies = [ + "pre-commit", + "pylint", +] +post-install-commands = [ + "pre-commit install-hooks" +] +[tool.hatch.envs.lint.scripts] +pre-commmit = "pre-commit run --all-files --hook-stage manual" +typing = "pre-commit mypy" +lint = "pylint src" + [tool.hatch.envs.docs] dependencies = [ "mkdocs>=1.4.0", From 8f23dbf1253ce18989d6042a9ddd91c025360d62 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 13:00:50 -0500 Subject: [PATCH 03/13] use pipx run since hatch isn't there --- .github/workflows/ci.yml | 4 ++-- .github/workflows/docs.yml | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18a41c87..2a9a771a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,11 +28,11 @@ jobs: with: python-version: "3.x" - name: Run pre-commit - run: hatch run lint:pre-commit + run: pipx run hatch run lint:pre-commit - name: Run PyLint run: | echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" - hatch run lint:pylint + pipx run hatch run lint:pylint checks: name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8457d6a4..842016e5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,7 +27,7 @@ jobs: python-version: "3.x" - name: Check documentation - run: hatch run docs:build-check dev + run: pipx run hatch run docs:build-check dev publish: runs-on: ubuntu-latest @@ -49,7 +49,7 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'scipp-atlas/mario-mapyde' - run: hatch run docs:deploy dev + run: pipx run hatch run docs:deploy dev - name: Get MAJOR.MINOR version if: github.event_name == 'release' && github.event.action == 'published' @@ -61,4 +61,6 @@ jobs: - name: Deploy documentation (${{ steps.label.outputs.version }}) with mike 🚀 if: github.event_name == 'release' && github.event.action == 'published' - run: hatch run docs:deploy ${{ steps.label.outputs.version }} latest + run: + pipx run hatch run docs:deploy ${{ steps.label.outputs.version }} + latest From 1e53a3a37e931f9ccbc2e16e46d22eb169df18a1 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 13:04:04 -0500 Subject: [PATCH 04/13] drop post-install, since that's for post-install project, not env --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f8452bca..0849ee2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,9 +106,6 @@ dependencies = [ "pre-commit", "pylint", ] -post-install-commands = [ - "pre-commit install-hooks" -] [tool.hatch.envs.lint.scripts] pre-commmit = "pre-commit run --all-files --hook-stage manual" typing = "pre-commit mypy" From 178c8d9576d72fe09c3aa6d796c854af1c1216cd Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 13:24:31 -0500 Subject: [PATCH 05/13] typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a9a771a..178f64c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: Run PyLint run: | echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" - pipx run hatch run lint:pylint + pipx run hatch run lint:lint checks: name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} From b6328fb7f5c9735679cb8a5e7f1bc464c2b6e026 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 13:25:27 -0500 Subject: [PATCH 06/13] drop dev --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 842016e5..8d801652 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -27,7 +27,7 @@ jobs: python-version: "3.x" - name: Check documentation - run: pipx run hatch run docs:build-check dev + run: pipx run hatch run docs:build-check publish: runs-on: ubuntu-latest From e63784b5654507d3ce5f538734f1211364f4c38d Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 13:40:08 -0500 Subject: [PATCH 07/13] remove strictness for now --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0849ee2d..182fdf24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,7 +140,9 @@ dependencies = [ MKDOCS_CONFIG = "mkdocs.yml" MKDOCS_BRANCH = "gh-pages" [tool.hatch.envs.docs.scripts] -build = "mkdocs build --config-file {env:MKDOCS_CONFIG} --clean --strict {args}" +# --strict disabled for now, see https://github.com/timvink/mkdocs-git-revision-date-localized-plugin/issues/101 +build = "mkdocs build --config-file {env:MKDOCS_CONFIG} --clean {args}" +#build = "mkdocs build --config-file {env:MKDOCS_CONFIG} --clean --strict {args}" serve = "mkdocs serve --config-file {env:MKDOCS_CONFIG} --dev-addr localhost:8000 {args}" ci-build = "mike deploy --config-file {env:MKDOCS_CONFIG} --branch {env:MKDOCS_BRANCH} --update-aliases {args}" deploy = "ci-build --push" From 5fa61b82fe3287e1f064d564f6e63ea6fc1baa24 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 13:41:48 -0500 Subject: [PATCH 08/13] drop allow-direct-references --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 182fdf24..ab5eba41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,9 +71,6 @@ local_scheme = "no-local-version" [tool.hatch.build.hooks.vcs] version-file = "src/mapyde/_version.py" -[tool.hatch.metadata] -allow-direct-references = true - [tool.hatch.build] exclude = [ "/ci", From 161ff7815522056e4955582e4075fd503a561821 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 23:51:11 -0500 Subject: [PATCH 09/13] drop noxfile entirely --- .flake8 | 1 - .github/CONTRIBUTING.md | 37 ++++++++++++++++---------------- .github/workflows/ci.yml | 18 ++++++---------- noxfile.py | 33 ---------------------------- pyproject.toml | 46 +++++++++++++++++++++++----------------- 5 files changed, 52 insertions(+), 83 deletions(-) delete mode 100644 noxfile.py diff --git a/.flake8 b/.flake8 index bc8020ea..8e8325fd 100644 --- a/.flake8 +++ b/.flake8 @@ -3,6 +3,5 @@ extend-ignore = E203, E501, E722, B950, W503 select = C,E,F,W,T,B,B9,I per-file-ignores = tests/*: T - noxfile.py: T scripts/*: T20 src/mapyde/cli/*: B008 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 03ac123e..809a8e4f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -5,25 +5,26 @@ description of best practices for developing Scikit-HEP packages. # Quick development -The fastest way to start with development is to use nox. If you don't have nox, -you can use `pipx run nox` to run it without installing, or `pipx install nox`. -If you don't have pipx (pip for applications), then you can install with with -`pip install pipx` (the only case were installing an application with regular -pip is reasonable). If you use macOS, then pipx and nox are both in brew, use -`brew install pipx nox`. - -To use, run `nox`. This will lint and test using every installed version of -Python on your system, skipping ones that are not installed. You can also run +The fastest way to start with development is to use pipx and hatch. If you don't +have pipx, you can use `pipx run hatch` to run it without installing, or +`pipx install hatch`. If you don't have pipx (pip for applications), then you +can install with with `pip install pipx` (the only case were installing an +application with regular pip is reasonable). If you use macOS, then pipx and +hatch are both in brew, use `brew install pipx hatch`. + +To use, run `hatch run dev:test`. This will test using every installed version +of Python on your system, skipping ones that are not installed. You can also run specific jobs: ```console -$ nox -s lint # Lint only -$ nox -s tests-3.9 # Python 3.9 tests only -$ nox -s docs -- serve # Build and serve the docs -$ nox -s build # Make an SDist and wheel +$ hatch run lint # Lint only +$ hatch run +py=3.9 dev:test # Python 3.9 tests only +$ hatch run dev:py3.9:test # Python 3.9 tests only +$ hatch run docs:serve # Build and serve the docs +$ hatch run build # Make an SDist and wheel ``` -Nox handles everything for you, including setting up an temporary virtual +hatch handles everything for you, including setting up an temporary virtual environment for each run. # Setting up a development environment manually @@ -71,20 +72,20 @@ pytest You can build the docs using: ```bash -nox -s docs +hatch run docs:build ``` You can see a preview with: ```bash -nox -s docs -- serve +hatch run docs:serve ``` # Pre-commit This project uses pre-commit for all style checking. While you can run it with -nox, this is such an important tool that it deserves to be installed on its own. -Install pre-commit and run: +hatch, this is such an important tool that it deserves to be installed on its +own. Install pre-commit and run: ```bash pre-commit run -a diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 178f64c3..80f3e2c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,11 +28,11 @@ jobs: with: python-version: "3.x" - name: Run pre-commit - run: pipx run hatch run lint:pre-commit + run: pipx run hatch run pre-commit - name: Run PyLint run: | echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" - pipx run hatch run lint:lint + pipx run hatch run lint checks: name: Check Python ${{ matrix.python-version }} on ${{ matrix.runs-on }} @@ -45,7 +45,7 @@ jobs: runs-on: [ubuntu-latest, macos-latest, windows-latest] include: - - python-version: pypy-3.8 + - python-version: pypy3.8 runs-on: ubuntu-latest steps: @@ -57,11 +57,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install package - run: python -m pip install .[test] - - name: Test package - run: python -m pytest -ra + run: pipx run hatch run +py=${{ matrix.python-version}} dev:test dist: name: Distribution build @@ -73,16 +70,13 @@ jobs: with: fetch-depth: 0 - - name: Build sdist and wheel - run: pipx run build + - name: Build sdist and wheel; and check products + run: pipx run hatch run build-check - uses: actions/upload-artifact@v3 with: path: dist - - name: Check products - run: pipx run twine check dist/* - - uses: pypa/gh-action-pypi-publish@v1.5.1 if: github.event_name == 'release' && github.event.action == 'published' with: diff --git a/noxfile.py b/noxfile.py deleted file mode 100644 index db65d49d..00000000 --- a/noxfile.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -import shutil -from pathlib import Path - -import nox - -DIR = Path(__file__).parent.resolve() - -nox.options.sessions = ["tests"] - - -@nox.session -def tests(session: nox.Session) -> None: - """ - Run the unit and regular tests. - """ - session.install(".[test]") - session.run("pytest", *session.posargs) - - -@nox.session -def build(session: nox.Session) -> None: - """ - Build an SDist and wheel. - """ - - build_p = DIR.joinpath("build") - if build_p.exists(): - shutil.rmtree(build_p) - - session.install("build") - session.run("python", "-m", "build") diff --git a/pyproject.toml b/pyproject.toml index ab5eba41..03ef5f8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,15 +43,6 @@ dependencies = [ "importlib_resources>=1.3.0; python_version<'3.9'", # for resources in schema ] -[project.optional-dependencies] -test = [ - "pytest >=6", -] -dev = [ - "pytest >=6", - "tbump>=6.7.0" -] - # see https://github.com/pypi/warehouse/blob/main/warehouse/templates/packaging/detail.html [project.urls] Homepage = "https://scipp-atlas.github.io/mario-mapyde/latest/" @@ -77,7 +68,6 @@ exclude = [ "/Dockerfiles", "/stats/", "/test/", - "/noxfile.py", "/.*", "/*.sh", "/*.toml", # note: does not remove pyproject.toml @@ -93,22 +83,40 @@ exclude = [ [tool.hatch.envs.default] dependencies = [ - "pytest", + "tbump>=6.7.0", + "pre-commit", + "pylint", + "build", ] -[tool.hatch.envs.lint] -# pylint needs to be installed into package environment +[tool.hatch.envs.default.scripts] +tag = "tbump {args}" +pre-commmit = "pre-commit run --all-files --hook-stage manual" +lint = "pylint src" +build = "python -m build" +validate = "twine check dist/*" +# https://github.com/linkchecker/linkchecker/issues/678 +build-check = [ + "build", + "validate", +] + +[tool.hatch.envs.dev] +template = "dev" +# pylint and pytest needs to be installed into package environment detached = false dependencies = [ - "pre-commit", - "pylint", + "pytest >=6", ] -[tool.hatch.envs.lint.scripts] -pre-commmit = "pre-commit run --all-files --hook-stage manual" -typing = "pre-commit mypy" -lint = "pylint src" + +[tool.hatch.envs.dev.scripts] +test = "pytest -ra" + +[[tool.hatch.envs.dev.matrix]] +python = ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.8"] [tool.hatch.envs.docs] +template = "docs" dependencies = [ "mkdocs>=1.4.0", "mkdocs-material>=8.5.6", From 294b06f2ed534289e4aaddacaa75b6ecf7891ae5 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 23:51:47 -0500 Subject: [PATCH 10/13] use pre-commit github action --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80f3e2c0..37502a0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,8 +27,9 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.x" - - name: Run pre-commit - run: pipx run hatch run pre-commit + - uses: pre-commit/action@v3.0.0 + with: + extra_args: --hook-stage manual --all-files - name: Run PyLint run: | echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" From 94f36e00f0032b8e5105eb0d2e873797a86f71f8 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 23:52:37 -0500 Subject: [PATCH 11/13] drop pre-commit from pyproject --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 03ef5f8e..354f668b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,14 +84,12 @@ exclude = [ [tool.hatch.envs.default] dependencies = [ "tbump>=6.7.0", - "pre-commit", "pylint", "build", ] [tool.hatch.envs.default.scripts] tag = "tbump {args}" -pre-commmit = "pre-commit run --all-files --hook-stage manual" lint = "pylint src" build = "python -m build" validate = "twine check dist/*" From e94b6cafc431947b0aba471bd824534173502af5 Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Tue, 29 Nov 2022 23:54:15 -0500 Subject: [PATCH 12/13] minor changes --- .github/CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 809a8e4f..b4c0a694 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -61,10 +61,10 @@ You can also/alternatively run `pre-commit run` (changes only) or # Testing -Use pytest to run the unit checks: +Use pytest to run the unit checks (via `hatch`): ```bash -pytest +hatch run dev:test ``` # Building docs From 5741ebc4ae5b07f5c4ae8b835a94c71d2b01b5ea Mon Sep 17 00:00:00 2001 From: Giordon Stark Date: Wed, 30 Nov 2022 00:01:31 -0500 Subject: [PATCH 13/13] add twine dep --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 354f668b..3382340f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,6 +86,7 @@ dependencies = [ "tbump>=6.7.0", "pylint", "build", + "twine", ] [tool.hatch.envs.default.scripts]