From 76b50e1038cff331f641725763c1ed4bf0bf60c7 Mon Sep 17 00:00:00 2001 From: Tim Paine <3105306+timkpaine@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:08:03 -0500 Subject: [PATCH] Set macos deployment target, run dependabot, make sure maturin sdist includes rust dir --- .copier-answers.yml | 2 +- .github/dependabot.yml | 9 +++++++++ .github/workflows/build.yml | 2 ++ Makefile | 5 +---- README.md | 2 +- pyproject.toml | 6 +++++- rust/.config/nextest.toml | 2 ++ rust/Makefile | 5 +++-- 8 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 rust/.config/nextest.toml diff --git a/.copier-answers.yml b/.copier-answers.yml index c02a0ec..83678a2 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -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 diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 42cac77..39e4d07 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -14,3 +14,12 @@ updates: labels: - "lang: python" - "part: dependencies" + + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "monthly" + labels: + - "lang: rust" + - "part: dependencies" + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index abb9fbb..53d9103 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/Makefile b/Makefile index a3ddf9e..028bfca 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 # ######### diff --git a/README.md b/README.md index 18b7499..addace7 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/pyproject.toml b/pyproject.toml index 69afb6f..cbb0917 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", @@ -77,6 +76,8 @@ ignore = [ ".copier-answers.yml", "Makefile", "setup.py", + "docs/**/*", + "rust/.config/*", "rust/Cargo.lock", "rust/README.md", ] @@ -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" diff --git a/rust/.config/nextest.toml b/rust/.config/nextest.toml new file mode 100644 index 0000000..88457dc --- /dev/null +++ b/rust/.config/nextest.toml @@ -0,0 +1,2 @@ +[profile.default.junit] +path = "junit.xml" diff --git a/rust/Makefile b/rust/Makefile index 0f691f9..4045115 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -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