diff --git a/.copier-answers.yml b/.copier-answers.yml index d283cfd..d038c54 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: 42e01c1 +_commit: 33cc159 _src_path: https://github.com/python-project-templates/base.git add_extension: jupyter email: 3105306+timkpaine@users.noreply.github.com diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 42cac77..b032cb3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,3 +14,11 @@ updates: labels: - "lang: python" - "part: dependencies" + + - package-ecosystem: "npm" + directory: "/js" + schedule: + interval: "monthly" + labels: + - "lang: javascript" + - "part: dependencies" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9fc08f..093bd34 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,3 @@ - name: Build Status on: @@ -60,18 +59,18 @@ jobs: - name: Lint run: make lint - if: ${{ matrix.os == 'ubuntu-latest' }} + if: matrix.os == 'ubuntu-latest' - name: Checks run: make checks - if: ${{ matrix.os == 'ubuntu-latest' }} + if: matrix.os == 'ubuntu-latest' - name: Build run: make build - name: Test run: make coverage - if: ${{ matrix.os == 'ubuntu-latest' }} + if: matrix.os == 'ubuntu-latest' - name: Upload test results (Python) uses: actions/upload-artifact@v4 @@ -86,12 +85,20 @@ jobs: with: files: | **/junit.xml - if: ${{ matrix.os == 'ubuntu-latest' }} + if: matrix.os == 'ubuntu-latest' - name: Upload coverage uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} - name: Make dist run: make dist - if: ${{ matrix.os == 'ubuntu-latest' }} + if: matrix.os == 'ubuntu-latest' + + - uses: actions/upload-artifact@v4 + with: + name: dist-${{matrix.os}} + path: dist + if: matrix.os == 'ubuntu-latest' diff --git a/.github/workflows/copier.yml b/.github/workflows/copier.yml index 2825075..871b414 100644 --- a/.github/workflows/copier.yml +++ b/.github/workflows/copier.yml @@ -1,4 +1,3 @@ - name: Copier Updates on: diff --git a/Makefile b/Makefile index 24c9e27..32d89ec 100644 --- a/Makefile +++ b/Makefile @@ -73,13 +73,13 @@ annotate: ## run python type annotation checks with mypy ######### .PHONY: test-py tests-py coverage-py test-py: ## run python tests - python -m pytest -v jupyter_template/tests --junitxml=junit.xml + python -m pytest -v jupyter_template/tests # alias tests-py: test-py coverage-py: ## run python tests and collect test coverage - python -m pytest -v jupyter_template/tests --junitxml=junit.xml --cov=jupyter_template --cov-branch --cov-fail-under=50 --cov-report term-missing --cov-report xml + python -m pytest -v jupyter_template/tests --cov=jupyter_template --cov-report term-missing --cov-report xml .PHONY: test-js tests-js coverage-js test-js: ## run js tests @@ -117,18 +117,18 @@ major: ## bump a major version ######## # DIST # ######## -.PHONY: dist dist-build dist-sdist dist-local-wheel publish +.PHONY: dist dist-py dist-js dist-check publish -dist-build-py: # build python dists +dist-py: # build python dists python -m build -w -s -dist-build-js: # build js dists +dist-js: # build js dists cd js; pnpm pack dist-check: ## run python dist checker with twine python -m twine check dist/* -dist: clean build dist-build-js dist-build-py dist-check ## build all dists +dist: clean build dist-js dist-py dist-check ## build all dists publish: dist # publish python assets diff --git a/pyproject.toml b/pyproject.toml index 34a775d..cbbbefa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,6 +81,20 @@ ignore = [ "jupyter_template/nbextension/**", ] +[tool.coverage.run] +branch = true +omit = [ + "jupyter_template/tests/integration/", +] +[tool.coverage.report] +exclude_also = [ + "raise NotImplementedError", + "if __name__ == .__main__.:", + "@(abc\\.)?abstractmethod", +] +ignore_errors = true +fail_under = 50 + [tool.hatch.build] artifacts = [ "jupyter_template/nbextension", @@ -139,6 +153,7 @@ build_cmd = "build" npm = "pnpm" [tool.pytest.ini_options] +addopts = ["-vvv", "--junitxml=junit.xml"] asyncio_mode = "strict" testpaths = "jupyter_template/tests"