Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from copier (2024-10-08T21-19-03) #9

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ updates:
labels:
- "lang: python"
- "part: dependencies"

- package-ecosystem: "npm"
directory: "/js"
schedule:
interval: "monthly"
labels:
- "lang: javascript"
- "part: dependencies"
19 changes: 13 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Build Status

on:
Expand Down Expand Up @@ -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
Expand All @@ -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'

1 change: 0 additions & 1 deletion .github/workflows/copier.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Copier Updates

on:
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"

Expand Down
Loading