Skip to content

Commit c8b72fe

Browse files
committed
Reinit
1 parent 39c89f2 commit c8b72fe

File tree

9 files changed

+72
-69
lines changed

9 files changed

+72
-69
lines changed

.copier-answers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: ca3e4a0
2+
_commit: a8585ff
33
_src_path: https://github.com/python-project-templates/base.git
44
add_docs: true
55
add_extension: rustjswasm

.github/workflows/build.yaml

Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
matrix:
3232
os: [ubuntu-latest, macos-latest, windows-latest]
3333
python-version: ["3.9"]
34+
cibuildwheel: ["cp39"]
3435
node-version: [20.x]
3536

3637
steps:
@@ -44,41 +45,42 @@ jobs:
4445

4546
- uses: actions-ext/node/setup@main
4647
with:
47-
version: 20.x
48+
version: 22.x
4849

4950
- name: Install dependencies
5051
run: make develop
5152

52-
- name: Lint
53-
run: make lint
53+
# - name: Lint
54+
# run: make lint
55+
# if: matrix.os == 'ubuntu-latest'
5456

55-
- name: Checks
56-
run: make checks
57-
if: matrix.os == 'ubuntu-latest'
57+
# - name: Checks
58+
# run: make checks
59+
# if: matrix.os == 'ubuntu-latest'
5860

59-
- name: Build
60-
run: make build
61+
# - name: Build
62+
# run: make build
6163

62-
- name: Test
63-
run: make coverage
64+
# - name: Test
65+
# run: make coverage
6466

65-
- name: Upload test results (Python)
66-
uses: actions/upload-artifact@v4
67-
with:
68-
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
69-
path: '**/junit.xml'
70-
if: ${{ always() }}
67+
# - name: Upload test results (Python)
68+
# uses: actions/upload-artifact@v4
69+
# with:
70+
# name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
71+
# path: '**/junit.xml'
72+
# if: matrix.os == 'ubuntu-latest'
7173

72-
- name: Publish Unit Test Results
73-
uses: EnricoMi/publish-unit-test-result-action@v2
74-
with:
75-
files: '**/junit.xml'
76-
if: matrix.os == 'ubuntu-latest'
74+
# - name: Publish Unit Test Results
75+
# uses: EnricoMi/publish-unit-test-result-action@v2
76+
# with:
77+
# files: '**/junit.xml'
78+
# if: matrix.os == 'ubuntu-latest'
7779

78-
- name: Upload coverage
79-
uses: codecov/codecov-action@v5
80-
with:
81-
token: ${{ secrets.CODECOV_TOKEN }}
80+
# - name: Upload coverage
81+
# uses: codecov/codecov-action@v5
82+
# with:
83+
# token: ${{ secrets.CODECOV_TOKEN }}
8284

8385
- name: Set up QEMU
8486
uses: docker/setup-qemu-action@v3
@@ -88,21 +90,23 @@ jobs:
8890

8991
- name: Make dist
9092
run: |
91-
make dist-rs
92-
make dist-py-sdist
93-
make dist-py-wheel
94-
make dist-check
95-
if: matrix.os == 'ubuntu-latest'
96-
97-
- name: Make dist
98-
run: |
93+
# make dist-rs
94+
# make dist-py-sdist
9995
make dist-py-wheel
10096
make dist-check
10197
env:
102-
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
103-
if: matrix.os != 'ubuntu-latest'
98+
CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*"
99+
if: matrix.os == 'ubuntu-latest'
104100

105-
- uses: actions/upload-artifact@v4
106-
with:
107-
name: dist-${{matrix.os}}
108-
path: dist
101+
# - name: Make dist
102+
# run: |
103+
# make dist-py-wheel
104+
# make dist-check
105+
# env:
106+
# CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
107+
# if: matrix.os != 'ubuntu-latest'
108+
109+
# - uses: actions/upload-artifact@v4
110+
# with:
111+
# name: dist-${{matrix.os}}
112+
# path: dist

.github/workflows/docs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- uses: actions-ext/python/setup@main
1616
- uses: actions-ext/rust/setup@main
1717
- uses: actions-ext/node/setup@main
18+
- run: make develop
1819
- run: uv pip install .
1920
- run: uv pip install yardang
2021
- run: yardang build

.prettierignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,24 +159,24 @@ major: ## bump a major version
159159
########
160160
.PHONY: dist-py-wheel dist-py-sdist dist-rs dist-check dist publish
161161

162-
dist-py-wheel: # build python wheel
162+
dist-py-wheel: ## build python wheel
163163
python -m cibuildwheel --output-dir dist
164164

165-
dist-py-sdist: # build python sdist
165+
dist-py-sdist: ## build python sdist
166166
python -m build --sdist -o dist
167167

168168
dist-js: # build js dists
169169
cd js; pnpm pack
170170

171-
dist-rs: # build rust dists
171+
dist-rs: ## build rust dists
172172
make -C rust dist
173173

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

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

179-
publish: dist # publish python assets
179+
publish: dist ## publish python assets
180180

181181
#########
182182
# CLEAN #

js/.prettierignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

js/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@
3434
"build": "npm-run-all build:rust build:wasm-bindgen build:prod",
3535
"clean": "rm -rf dist lib playwright-report ../python_template_rust/extension",
3636
"dev": "npm-run-all -p start watch",
37-
"lint:js": "prettier --check \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*\" \"*.mjs\" \"*.json\"",
37+
"lint:js": "prettier --check \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
3838
"lint:rust": "cargo clippy --all-features && cargo fmt --all -- --check",
3939
"lint": "npm-run-all lint:*",
40-
"fix:js": "prettier --write \"src/**/*.{js,ts,jsx,tsx}\" \"tests/**/*\" \"*.mjs\" \"*.json\"",
40+
"fix:js": "prettier --write \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
4141
"fix:rust": "cargo fmt --all",
4242
"fix": "npm-run-all fix:*",
4343
"preinstall": "npx only-allow pnpm",
4444
"prepack": "pnpm run build",
4545
"start": "http-server -p 3000 -o examples/",
4646
"start:tests": "http-server -p 3000 ",
47-
"test:js": "TZ=UTC playwright test",
47+
"test:js": "playwright test",
4848
"test:rust": "cargo test -- --show-output",
4949
"test": "npm-run-all test:rust test:js",
5050
"watch": "nodemon --watch src -e ts,less,html --exec \"pnpm build:debug\""

pyproject.toml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ develop = [
3535
"check-manifest",
3636
"cibuildwheel",
3737
"codespell>=2.4,<2.5",
38-
"hatch-jupyter-builder",
38+
"hatch-js",
39+
"hatch-rs",
3940
"hatchling",
4041
"mdformat>=0.7.22,<0.8",
4142
"mdformat-tables>=1",
@@ -105,7 +106,6 @@ ignore = [
105106
]
106107

107108
[tool.cibuildwheel]
108-
before-build = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y"
109109
build = "cp39-*"
110110
test-command = "pytest -vvv {project}/python_template_rust/tests"
111111
test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"]
@@ -115,28 +115,30 @@ before-build = """
115115
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
116116
rustup target add aarch64-unknown-linux-gnu
117117
rustup target add x86_64-unknown-linux-gnu
118+
rustup target add wasm32-unknown-unknown
119+
cargo install -f wasm-bindgen-cli
118120
rustup show
121+
122+
curl -sL https://rpm.nodesource.com/setup_22.x | bash -
123+
yum install nodejs -y
124+
echo "installing pnpm"
125+
curl -fsSL https://get.pnpm.io/install.sh | sh -
126+
echo "installing deps"
127+
export PATH=/root/.local/share/pnpm/:$PATH
128+
export PNPM_HOME="/root/.local/share/pnpm"
129+
cd js && pnpm install --verbose --prefer-frozen-lockfile --prefer-offline
130+
echo "running build"
131+
cd js && pnpm run build
119132
"""
120-
environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always"}
121-
skip = "*i686 musllinux*"
133+
environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", SKIP_HATCH_JS="1" }
134+
skip = "*i686* *musllinux*"
135+
manylinux-x86_64-image = "manylinux_2_28"
122136

123137
[tool.cibuildwheel.macos]
124-
before-build = """
125-
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
126-
rustup target add aarch64-apple-darwin
127-
rustup target add x86_64-apple-darwin
128-
rustup show
129-
"""
130138
environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", MACOS_DEPLOYMENT_TARGET=11.0}
131139
archs = "arm64"
132140

133141
[tool.cibuildwheel.windows]
134-
before-build = """
135-
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
136-
rustup target add x86_64-pc-windows-msvc
137-
rustup target add aarch64-pc-windows-msvc
138-
rustup show
139-
"""
140142
environment = {PATH="$UserProfile\\.cargo\bin;$PATH", CARGO_TERM_COLOR="always"}
141143
skip = "*win32 *arm_64"
142144

0 commit comments

Comments
 (0)