Skip to content
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.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: ca3e4a0
_commit: 4a9f82b
_src_path: https://github.com/python-project-templates/base.git
add_docs: true
add_extension: rustjswasm
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9"]
cibuildwheel: ["cp39"]
node-version: [20.x]

steps:
Expand All @@ -44,13 +45,14 @@ jobs:

- uses: actions-ext/node/setup@main
with:
version: 20.x
version: 22.x

- name: Install dependencies
run: make develop

- name: Lint
run: make lint
if: matrix.os == 'ubuntu-latest'

- name: Checks
run: make checks
Expand All @@ -67,7 +69,7 @@ jobs:
with:
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
path: '**/junit.xml'
if: ${{ always() }}
if: matrix.os == 'ubuntu-latest'

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand All @@ -92,6 +94,8 @@ jobs:
make dist-py-sdist
make dist-py-wheel
make dist-check
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*"
if: matrix.os == 'ubuntu-latest'

- name: Make dist
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions-ext/python/setup@main
- uses: actions-ext/rust/setup@main
- uses: actions-ext/node/setup@main
- run: make develop
- run: uv pip install .
- run: uv pip install yardang
- run: yardang build
Expand Down
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,24 +159,24 @@ 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-js: # build js dists
cd js; pnpm pack

dist-rs: # build rust dists
dist-rs: ## build rust dists
make -C rust dist

dist-check: ## run python dist checker with twine
python -m twine check dist/*

dist: clean build dist-rs dist-js dist-py-wheel dist-py-sdist dist-check ## build all dists

publish: dist # publish python assets
publish: dist ## publish python assets

#########
# CLEAN #
Expand Down
2 changes: 0 additions & 2 deletions js/.prettierignore

This file was deleted.

6 changes: 3 additions & 3 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
"build": "npm-run-all build:rust build:wasm-bindgen build:prod",
"clean": "rm -rf dist lib playwright-report ../python_template_rust/extension",
"dev": "npm-run-all -p start watch",
"lint:js": "prettier --check \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*\" \"*.mjs\" \"*.json\"",
"lint:js": "prettier --check \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
"lint:rust": "cargo clippy --all-features && cargo fmt --all -- --check",
"lint": "npm-run-all lint:*",
"fix:js": "prettier --write \"src/**/*.{js,ts,jsx,tsx}\" \"tests/**/*\" \"*.mjs\" \"*.json\"",
"fix:js": "prettier --write \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
"fix:rust": "cargo fmt --all",
"fix": "npm-run-all fix:*",
"preinstall": "npx only-allow pnpm",
"prepack": "pnpm run build",
"start": "http-server -p 3000 -o examples/",
"start:tests": "http-server -p 3000 ",
"test:js": "TZ=UTC playwright test",
"test:js": "playwright test",
"test:rust": "cargo test -- --show-output",
"test": "npm-run-all test:rust test:js",
"watch": "nodemon --watch src -e ts,less,html --exec \"pnpm build:debug\""
Expand Down
21 changes: 4 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ develop = [
"check-manifest",
"cibuildwheel",
"codespell>=2.4,<2.5",
"hatch-jupyter-builder",
"hatch-js",
"hatch-rs",
"hatchling",
"mdformat>=0.7.22,<0.8",
"mdformat-tables>=1",
Expand Down Expand Up @@ -105,7 +106,6 @@ ignore = [
]

[tool.cibuildwheel]
before-build = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y"
build = "cp39-*"
test-command = "pytest -vvv {project}/python_template_rust/tests"
test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"]
Expand All @@ -115,28 +115,15 @@ before-build = """
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*"
environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", SKIP_HATCH_JS="1" }
skip = "*i686* *musllinux*"

[tool.cibuildwheel.macos]
before-build = """
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
rustup show
"""
environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", MACOS_DEPLOYMENT_TARGET=11.0}
archs = "arm64"

[tool.cibuildwheel.windows]
before-build = """
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
rustup show
"""
environment = {PATH="$UserProfile\\.cargo\bin;$PATH", CARGO_TERM_COLOR="always"}
skip = "*win32 *arm_64"

Expand Down
18 changes: 9 additions & 9 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading