Skip to content

Commit ddb5e0b

Browse files
authored
Merge pull request #23 from python-project-templates/copier-update-2026-04-02T23-46-16
Update from copier (2026-04-02T23:46:16)
2 parents 0384eae + 6531afd commit ddb5e0b

File tree

9 files changed

+223
-242
lines changed

9 files changed

+223
-242
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: 08a244d
2+
_commit: fead162
33
_src_path: https://github.com/python-project-templates/base.git
44
add_docs: true
55
add_extension: cppjswasm

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Makefile linguist-documentation
99
*.html text=auto eol=lf
1010
*.js text=auto eol=lf
1111
*.json text=auto eol=lf
12-
*.less text=auto eol=lf
1312
*.md text=auto eol=lf
1413
*.py text=auto eol=lf
1514
*.toml text=auto eol=lf

.github/workflows/build.yaml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,54 +66,59 @@ jobs:
6666
run: make checks
6767
if: matrix.os == 'ubuntu-latest'
6868

69-
- name: Build
70-
run: make build
71-
7269
- name: Test
7370
run: make coverage
7471

7572
- name: Upload test results (Python)
7673
uses: actions/upload-artifact@v7
7774
with:
7875
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
79-
path: '**/junit.xml'
80-
if: matrix.os == 'ubuntu-latest'
76+
path: junit.xml
77+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
8178

8279
- name: Publish Unit Test Results
8380
uses: EnricoMi/publish-unit-test-result-action@v2
8481
with:
8582
files: '**/junit.xml'
86-
if: matrix.os == 'ubuntu-latest'
83+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
8784

8885
- name: Upload coverage
89-
uses: codecov/codecov-action@v5
86+
uses: codecov/codecov-action@v6
9087
with:
9188
token: ${{ secrets.CODECOV_TOKEN }}
9289

93-
- name: Set up QEMU
94-
uses: docker/setup-qemu-action@v3
95-
with:
96-
platforms: all
97-
if: runner.os == 'Linux' && runner.arch == 'X64'
90+
- name: Install build dependencies
91+
run: pip install cibuildwheel
9892

99-
- name: Make dist
93+
- name: Make dist (Linux)
10094
run: |
10195
make dist-py-sdist
10296
make dist-py-wheel
10397
make dist-check
10498
env:
10599
CIBW_BUILD: "${{ matrix.cibuildwheel }}-manylinux*"
100+
CIBW_BUILD_VERBOSITY: 3
106101
if: matrix.os == 'ubuntu-latest'
107102

108-
- name: Make dist
103+
- name: Make dist (Macos)
109104
run: |
110105
make dist-py-wheel
111-
make dist-check
112106
env:
113-
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0
114-
if: matrix.os != 'ubuntu-latest'
107+
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*"
108+
CIBW_BUILD_VERBOSITY: 3
109+
if: matrix.os == 'macos-latest'
110+
111+
- name: Make dist (Windows)
112+
run: |
113+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
114+
make dist-py-wheel
115+
shell: cmd
116+
env:
117+
CIBW_BUILD: "${{ matrix.cibuildwheel }}-win_amd64"
118+
CIBW_BEFORE_ALL: call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
119+
if: matrix.os == 'windows-latest'
115120

116121
- uses: actions/upload-artifact@v7
117122
with:
118-
name: dist-${{matrix.os}}
123+
name: dist-${{matrix.os}}-${{matrix.python-version}}
119124
path: dist

.gitignore

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ __pycache__/
1111
*.exp
1212
*.lib
1313

14+
# Rust
15+
target
16+
1417
# Distribution / packaging
1518
.Python
1619
build/
@@ -55,26 +58,12 @@ junit.xml
5558
.hypothesis/
5659
.pytest_cache/
5760

58-
# Translations
59-
*.mo
60-
*.pot
61-
62-
# Django stuff:
61+
# Django
6362
*.log
6463
local_settings.py
6564
db.sqlite3
6665
db.sqlite3-journal
6766

68-
# Flask stuff:
69-
instance/
70-
.webassets-cache
71-
72-
# Scrapy stuff:
73-
.scrapy
74-
75-
# PyBuilder
76-
target/
77-
7867
# IPython
7968
profile_default/
8069
ipython_config.py
@@ -85,15 +74,12 @@ ipython_config.py
8574
# pipenv
8675
Pipfile.lock
8776

88-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
89-
__pypackages__/
90-
91-
# Celery stuff
77+
# Celery
9278
celerybeat-schedule
9379
celerybeat.pid
9480

95-
# SageMath parsed files
96-
*.sage.py
81+
# Airspeed Velocity
82+
.asv
9783

9884
# Environments
9985
.env

js/build.mjs

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { NodeModulesExternal } from "@finos/perspective-esbuild-plugin/external.js";
22
import { build } from "@finos/perspective-esbuild-plugin/build.js";
3-
import { BuildCss } from "@prospective.co/procss/target/cjs/procss.js";
3+
import { transform } from "lightningcss";
44
import { getarg } from "./tools/getarg.mjs";
55
import fs from "fs";
66
import cpy from "cpy";
7-
import path_mod from "path";
87

98
const DEBUG = getarg("--debug");
109

@@ -40,31 +39,29 @@ const BUILD = [
4039

4140
async function compile_css() {
4241
const process_path = (path) => {
43-
const outpath = path.replace("src/less", "dist/css");
42+
const outpath = path.replace("src/css", "dist/css");
4443
fs.mkdirSync(outpath, { recursive: true });
4544

46-
fs.readdirSync(path).forEach((file_or_folder) => {
47-
if (file_or_folder.endsWith(".less")) {
48-
const outfile = file_or_folder.replace(".less", ".css");
49-
const builder = new BuildCss("");
50-
builder.add(
51-
`${path}/${file_or_folder}`,
52-
fs
53-
.readFileSync(path_mod.join(`${path}/${file_or_folder}`))
54-
.toString(),
55-
);
56-
fs.writeFileSync(
57-
`${path.replace("src/less", "dist/css")}/${outfile}`,
58-
builder.compile().get(outfile),
59-
);
60-
} else {
61-
process_path(`${path}/${file_or_folder}`);
45+
fs.readdirSync(path, { withFileTypes: true }).forEach((entry) => {
46+
const input = `${path}/${entry.name}`;
47+
const output = `${outpath}/${entry.name}`;
48+
49+
if (entry.isDirectory()) {
50+
process_path(input);
51+
} else if (entry.isFile() && entry.name.endsWith(".css")) {
52+
const source = fs.readFileSync(input);
53+
const { code } = transform({
54+
filename: entry.name,
55+
code: source,
56+
minify: !DEBUG,
57+
sourceMap: false,
58+
});
59+
fs.writeFileSync(output, code);
6260
}
6361
});
6462
};
65-
// recursively process all less files in src/less
66-
process_path("src/less");
67-
cpy("src/css/*", "dist/css/");
63+
64+
process_path("src/css");
6865
}
6966

7067
async function copy_html() {

js/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
"build": "npm-run-all build:cpp build:prod",
3333
"clean": "rm -rf dist lib playwright-report ../python_template_cppjswasm/extension",
3434
"dev": "npm-run-all -p start watch",
35-
"lint:js": "prettier --check \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
35+
"lint:js": "prettier --check \"src/**/*.{js,ts,jsx,tsx,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
3636
"lint:cpp": "clang-format --dry-run -Werror -style=file:../.clang-format src/cpp/*.cpp",
3737
"lint": "npm-run-all lint:*",
38-
"fix:js": "prettier --write \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
38+
"fix:js": "prettier --write \"src/**/*.{js,ts,jsx,tsx,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
3939
"fix:cpp": "clang-format -i -style=file:../.clang-format src/cpp/*.cpp",
4040
"fix": "npm-run-all fix:*",
4141
"preinstall": "npx only-allow pnpm",
@@ -44,20 +44,19 @@
4444
"start:tests": "http-server -p 3000 ",
4545
"test:js": "playwright test",
4646
"test": "npm-run-all test:*",
47-
"watch": "nodemon --watch src -e ts,less,html,cpp,hpp --exec \"pnpm build:debug\""
47+
"watch": "nodemon --watch src -e ts,css,html,cpp,hpp --exec \"pnpm build:debug\""
4848
},
4949
"dependencies": {},
5050
"devDependencies": {
5151
"@finos/perspective-esbuild-plugin": "^3.2.1",
52-
"@playwright/test": "^1.56.1",
53-
"@prospective.co/procss": "^0.1.17",
54-
"cpy": "^12.1.0",
52+
"@playwright/test": "^1.59.0",
53+
"cpy": "^13.2.1",
5554
"esbuild": "^0.27.2",
56-
"esbuild-plugin-less": "^1.3.35",
55+
"lightningcss": "^1.29.3",
5756
"http-server": "^14.1.1",
5857
"nodemon": "^3.1.10",
5958
"npm-run-all": "^4.1.5",
6059
"prettier": "^3.8.1",
61-
"typescript": "^5.9.3"
60+
"typescript": "^6.0.2"
6261
}
6362
}

0 commit comments

Comments
 (0)