Skip to content

Commit 44fcd4f

Browse files
authored
Merge pull request #118 from python-project-templates/tkp/cd
Move rust template to check-dist
2 parents a446d93 + 241132f commit 44fcd4f

26 files changed

Lines changed: 68 additions & 110 deletions

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,15 @@ test-cpp:
7272
test-js:
7373
cd ../python-template-js && git config --global user.name "github-actions" && git config --global user.email "41898282+github-actions[bot]@users.noreply.github.c@example.com" && git init && git add . && git commit -m "initial commit"
7474
cd ../python-template-js && make develop
75+
cd ../python-template-js && git add js/pnpm-lock.yaml && git commit -m "lockfile"
7576
cd ../python-template-js && make lint
7677
cd ../python-template-js && make checks
7778
cd ../python-template-js && make test
7879

7980
test-jupyter:
8081
cd ../python-template-jupyter && git config --global user.name "github-actions" && git config --global user.email "41898282+github-actions[bot]@users.noreply.github.c@example.com" && git init && git add . && git commit -m "initial commit"
8182
cd ../python-template-jupyter && make develop
83+
cd ../python-template-jupyter && git add js/pnpm-lock.yaml && git commit -m "lockfile"
8284
cd ../python-template-jupyter && make lint
8385
cd ../python-template-jupyter && make checks
8486
cd ../python-template-jupyter && make test
@@ -95,13 +97,15 @@ test-rustjswasm:
9597
cd ../python-template-rustjswasm && git config --global user.name "github-actions" && git config --global user.email "41898282+github-actions[bot]@users.noreply.github.c@example.com" && git init && git add . && git commit -m "initial commit"
9698
cd ../python-template-rustjswasm && make develop
9799
cd ../python-template-rustjswasm && git add Cargo.lock && git commit -m "lockfile"
100+
cd ../python-template-rustjswasm && git add js/pnpm-lock.yaml && git commit -m "lockfile"
98101
cd ../python-template-rustjswasm && make lint
99102
cd ../python-template-rustjswasm && make checks
100103
cd ../python-template-rustjswasm && make test
101104

102105
test-cppjswasm:
103106
cd ../python-template-cppjswasm && git config --global user.name "github-actions" && git config --global user.email "41898282+github-actions[bot]@users.noreply.github.c@example.com" && git init && git add . && git commit -m "initial commit"
104107
cd ../python-template-cppjswasm && make develop
108+
cd ../python-template-cppjswasm && git add js/pnpm-lock.yaml && git commit -m "lockfile"
105109
cd ../python-template-cppjswasm && make lint
106110
cd ../python-template-cppjswasm && make checks
107111
cd ../python-template-cppjswasm && make test

cpp/.gitignore.jinja

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,12 @@ js/node_modules
141141
js/test-results
142142
js/playwright-report
143143
js/*.tgz
144-
{{module}}/extension
145144

146145
# Jupyter
147146
.ipynb_checkpoints
148147
.autoversion
149148
Untitled*.ipynb
150-
!{{module}}/extension/{{module}}.json
151-
!{{module}}/extension/install.json
149+
{{module}}/extension
152150
{{module}}/nbextension
153151
{{module}}/labextension
154152

@@ -157,3 +155,7 @@ Untitled*.ipynb
157155

158156
# Rust
159157
target
158+
159+
# Hydra
160+
outputs/
161+
multirun/

cppjswasm/.gitignore.jinja

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,12 @@ js/node_modules
141141
js/test-results
142142
js/playwright-report
143143
js/*.tgz
144-
{{module}}/extension
145144

146145
# Jupyter
147146
.ipynb_checkpoints
148147
.autoversion
149148
Untitled*.ipynb
150-
!{{module}}/extension/{{module}}.json
151-
!{{module}}/extension/install.json
149+
{{module}}/extension
152150
{{module}}/nbextension
153151
{{module}}/labextension
154152

examples/rustjswasm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ add_wiki: true
44
add_extension: rustjswasm
55
email: 3105306+timkpaine@users.noreply.github.com
66
github: python-project-templates
7-
project_description: A Rust-Python project template
7+
project_description: A Rust-JavaScript-Python project template
88
project_name: python template rustjswasm
99
python_version_primary: '3.11'
1010
team: Python Project Template Authors

js/.gitignore.jinja

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,12 @@ js/node_modules
141141
js/test-results
142142
js/playwright-report
143143
js/*.tgz
144-
{{module}}/extension
145144

146145
# Jupyter
147146
.ipynb_checkpoints
148147
.autoversion
149148
Untitled*.ipynb
150-
!{{module}}/extension/{{module}}.json
151-
!{{module}}/extension/install.json
149+
{{module}}/extension
152150
{{module}}/nbextension
153151
{{module}}/labextension
154152

@@ -157,3 +155,7 @@ Untitled*.ipynb
157155

158156
# Rust
159157
target
158+
159+
# Hydra
160+
outputs/
161+
multirun/

js/Makefile.jinja

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ format: fix
7373
################
7474
# Other Checks #
7575
################
76-
.PHONY: check-manifest check-dist checks check
77-
78-
check-manifest: ## check python sdist manifest with check-manifest
79-
check-manifest -v
76+
.PHONY: check-dist check-types checks check
8077

8178
check-dist: ## check python sdist and wheel with check-dist
8279
check-dist -v
8380

84-
checks: check-manifest
81+
check-types: ## check python types with ty
82+
ty check --python $$(which python)
83+
84+
checks: check-dist
8585

8686
# alias
8787
check: checks

js/pyproject.toml.jinja

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ develop = [
3737
"build",
3838
"bump-my-version",
3939
"check-dist",
40-
"check-manifest",
4140
"codespell",
4241
"hatch-js",
4342
"hatchling",
@@ -79,17 +78,6 @@ filename = "js/package.json"
7978
search = '"version": "{current_version}"'
8079
replace = '"version": "{new_version}"'
8180

82-
[tool.check-manifest]
83-
ignore = [
84-
".copier-answers.yaml",
85-
"js/pnpm-lock.yaml",
86-
"Makefile",
87-
".vscode/*",
88-
"{{module}}/extension/**/*",
89-
"docs/**/*",
90-
"js/dist/**/*",
91-
]
92-
9381
[tool.coverage.run]
9482
branch = true
9583
omit = [
@@ -118,16 +106,16 @@ packages = [
118106
"js",
119107
]
120108
exclude = [
121-
"/js/dist",
122-
"/js/node_modules",
109+
"js/dist",
110+
"js/node_modules",
123111
]
124112

125113
[tool.hatch.build.targets.wheel]
126114
packages = [
127115
"{{module}}",
128116
]
129117
exclude = [
130-
"/js",
118+
"js",
131119
]
132120

133121
[tool.hatch.build.hooks.hatch-js]

jupyter/.gitignore.jinja

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,12 @@ js/node_modules
141141
js/test-results
142142
js/playwright-report
143143
js/*.tgz
144-
{{module}}/extension
145144

146145
# Jupyter
147146
.ipynb_checkpoints
148147
.autoversion
149148
Untitled*.ipynb
150-
!{{module}}/extension/{{module}}.json
151-
!{{module}}/extension/install.json
149+
{{module}}/extension
152150
{{module}}/nbextension
153151
{{module}}/labextension
154152

@@ -157,3 +155,7 @@ Untitled*.ipynb
157155

158156
# Rust
159157
target
158+
159+
# Hydra
160+
outputs/
161+
multirun/

jupyter/Makefile.jinja

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ format: fix
7373
################
7474
# Other Checks #
7575
################
76-
.PHONY: check-manifest check-dist checks check
77-
78-
check-manifest: ## check python sdist manifest with check-manifest
79-
check-manifest -v
76+
.PHONY: check-dist check-types checks check
8077

8178
check-dist: ## check python sdist and wheel with check-dist
8279
check-dist -v
8380

84-
checks: check-manifest
81+
check-types: ## check python types with ty
82+
ty check --python $$(which python)
83+
84+
checks: check-dist
8585

8686
# alias
8787
check: checks

jupyter/js/package.json.jinja

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@
3131
},
3232
"scripts": {
3333
"build:babel": "babel src/ --source-maps --out-dir lib/",
34+
"build:extension": "mkdirp ../{{module}}/extension/ && cpy --flat 'src/extension/*' '../{{module}}/extension/'",
3435
"build:nbextension": "mkdirp ../{{module}}/nbextension/static/ && cpy --flat 'src/notebook.js' '../{{module}}/nbextension/static/'",
3536
"build:labextension": "rimraf ../{{module}}/labextension && jupyter labextension build .",
36-
"build": "pnpm clean && pnpm build:babel && pnpm build:labextension && pnpm build:nbextension",
37+
"build": "pnpm clean && pnpm build:babel && pnpm build:extension && pnpm build:labextension && pnpm build:nbextension",
3738
"clean": "rimraf lib",
3839
"fix": "pnpm lint --fix",
3940
"lint": "eslint -c .eslintrc.js --ext .js src/ tests/",

0 commit comments

Comments
 (0)