diff --git a/.copier-answers.yaml b/.copier-answers.yaml index ed1c6d2..d8dc44d 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: f3ffa74 +_commit: fa27c8d _src_path: https://github.com/python-project-templates/base.git add_docs: true add_extension: rust diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1a47a59..53fb480 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,7 +33,7 @@ jobs: python-version: ["3.9"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions-ext/python/setup@main with: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index a040715..5135f39 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -11,10 +11,10 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions-ext/python/setup@main - uses: actions-ext/rust/setup@main - - run: uv pip install . + - run: uv pip install .[develop] - run: uv pip install yardang - run: yardang build - uses: peaceiris/actions-gh-pages@v4 diff --git a/.github/workflows/wiki.yaml b/.github/workflows/wiki.yaml index 8de232b..e0a4608 100644 --- a/.github/workflows/wiki.yaml +++ b/.github/workflows/wiki.yaml @@ -20,7 +20,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: cp README.md docs/wiki/Home.md - uses: Andrew-Chen-Wang/github-wiki-action@v5 with: diff --git a/.gitignore b/.gitignore index 13aef97..c876350 100644 --- a/.gitignore +++ b/.gitignore @@ -138,6 +138,8 @@ js/coverage js/dist js/lib js/node_modules +js/test-results +js/playwright-report js/*.tgz python_template_rust/extension diff --git a/Makefile b/Makefile index 41a59e3..72cce8b 100644 --- a/Makefile +++ b/Makefile @@ -21,29 +21,19 @@ requirements-rs: ## install prerequisite rust build requirements requirements: requirements-rs requirements-py ## setup project for development -.PHONY: build-py build-rs build dev +.PHONY: build-py build-rs build build-py: python -m build -w -n build-rs: make -C rust build -dev: build ## lightweight in-place build for iterative dev - $(_CP_COMMAND) - build: build-rs build-py ## build the project .PHONY: install install: ## install python library uv pip install . -UNAME := $(shell uname) -ifeq ($(UNAME), Darwin) - _CP_COMMAND := cp target/debug/libpython_template_rust.dylib python_template_rust/python_template_rust.abi3.so -else - _CP_COMMAND := cp target/debug/libpython_template_rust.so python_template_rust/python_template_rust.abi3.so -endif - ######### # LINTS # ######### @@ -146,13 +136,13 @@ major: ## bump a major version ######## .PHONY: dist-py-wheel dist-py-sdist dist-rs dist-check dist publish -dist-py-wheel: # build python wheel +dist-py-wheel: ## build python wheel python -m cibuildwheel --output-dir dist -dist-py-sdist: # build python sdist +dist-py-sdist: ## build python sdist python -m build --sdist -o dist -dist-rs: # build rust dists +dist-rs: ## build rust dists make -C rust dist dist-check: ## run python dist checker with twine @@ -160,7 +150,7 @@ dist-check: ## run python dist checker with twine dist: clean build dist-rs dist-py-wheel dist-py-sdist dist-check ## build all dists -publish: dist # publish python assets +publish: dist ## publish python assets ######### # CLEAN # diff --git a/pyproject.toml b/pyproject.toml index 314e0a6..2e70791 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,24 +91,23 @@ ignore = [ ] [tool.cibuildwheel] -before-build = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y" +before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y" build = "cp39-*" -skip = "*musllinux*" test-command = "pytest -vvv {project}/python_template_rust/tests" test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"] [tool.cibuildwheel.linux] -before-build = """ +before-all = """ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y rustup target add aarch64-unknown-linux-gnu rustup target add x86_64-unknown-linux-gnu rustup show """ environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always"} -skip = "*i686 musllinux*" +skip = "*i686* *musllinux*" [tool.cibuildwheel.macos] -before-build = """ +before-all = """ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y rustup target add aarch64-apple-darwin rustup target add x86_64-apple-darwin @@ -118,7 +117,7 @@ environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", MACOS_D archs = "arm64" [tool.cibuildwheel.windows] -before-build = """ +before-all = """ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y rustup target add x86_64-pc-windows-msvc rustup target add aarch64-pc-windows-msvc diff --git a/rust/Makefile b/rust/Makefile index 9951d42..7d8e168 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -3,8 +3,8 @@ requirements: ## install required dev dependencies rustup component add rustfmt rustup component add clippy - cargo install cargo-nextest - cargo install cargo-llvm-cov + cargo install cargo-nextest --force + cargo install cargo-llvm-cov --force develop: requirements ## install required dev dependencies