Skip to content

Commit

Permalink
Set macos deployment target, run dependabot, make sure maturin sdist …
Browse files Browse the repository at this point in the history
…includes rust dir
  • Loading branch information
timkpaine committed Dec 6, 2024
1 parent 1cb4012 commit 76b50e1
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 9 deletions.
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: 679102d
_commit: 018cb61
_src_path: https://github.com/python-project-templates/base.git
add_extension: rust
email: 3105306+timkpaine@users.noreply.github.com
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,12 @@ updates:
labels:
- "lang: python"
- "part: dependencies"

- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "monthly"
labels:
- "lang: rust"
- "part: dependencies"

2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ jobs:
run: |
make dist-py-wheel
make dist-check
env:
MACOS_DEPLOYMENT_TARGET: 10.12
if: matrix.os != 'ubuntu-latest'

- uses: actions/upload-artifact@v4
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ format: fix
################
# Other Checks #
################
.PHONY: check-manifest checks check annotate
.PHONY: check-manifest checks check

check-manifest: ## check python sdist manifest with check-manifest
check-manifest -v
Expand All @@ -75,9 +75,6 @@ checks: check-manifest
# alias
check: checks

annotate: ## run python type annotation checks with mypy
python -m mypy ./python_template_rust

#########
# TESTS #
#########
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ A Rust-Python project template
## Overview


> \[!NOTE\]
> [!NOTE]
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -77,6 +76,8 @@ ignore = [
".copier-answers.yml",
"Makefile",
"setup.py",
"docs/**/*",
"rust/.config/*",
"rust/Cargo.lock",
"rust/README.md",
]
Expand Down Expand Up @@ -114,6 +115,9 @@ exclude_also = [
ignore_errors = true
fail_under = 50

[tool.maturin]
include = [{ path = "rust/**/*", format = "sdist" }]

[tool.pytest.ini_options]
addopts = ["-vvv", "--junitxml=junit.xml"]
asyncio_mode = "strict"
Expand Down
2 changes: 2 additions & 0 deletions rust/.config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[profile.default.junit]
path = "junit.xml"
5 changes: 3 additions & 2 deletions rust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ checks: check

.PHONY: test tests test-ci tests-ci
test: ## run the tests
cargo llvm-cov nextest
cargo llvm-cov nextest --cobertura --output-path junit.xml

# alias
tests: test

coverage:
cargo llvm-cov --lcov --output-path coverage nextest
cargo llvm-cov nextest --lcov --output-path coverage

.PHONY: dist publish
dist: ## create dist
Expand Down

0 comments on commit 76b50e1

Please sign in to comment.