Skip to content

Commit 72dc8e5

Browse files
committed
move to copier
1 parent 77c1e00 commit 72dc8e5

19 files changed

+627
-327
lines changed

.bumpversion.cfg

-20
This file was deleted.

.copier-answers.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changes here will be overwritten by Copier
2+
_commit: a84eb20
3+
_src_path: .
4+
add_extension: rust
5+
6+
github: python-project-templates
7+
project_description: A Rust-Python project template
8+
project_name: rust template
9+
python_version_primary: '3.11'
10+
team: Python Project Template Authors

.gitattributes

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ docs/* linguist-documentation
33
*.ipynb linguist-documentation
44
Makefile linguist-documentation
55

6-
* text=auto eol=lf
6+
*.md text=auto eol=lf
7+
*.py text=auto eol=lf
8+
*.rs text=auto eol=lf
9+
*.toml text=auto eol=lf
10+
*.yml text=auto eol=lf
11+

.github/workflows/build.yml

+34-21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: Build Status
23

34
on:
@@ -7,10 +8,11 @@ on:
78
tags:
89
- v*
910
paths-ignore:
10-
- CONTRIBUTING.md
1111
- LICENSE
1212
- README.md
1313
pull_request:
14+
branches:
15+
- main
1416
workflow_dispatch:
1517

1618
concurrency:
@@ -29,49 +31,60 @@ jobs:
2931
strategy:
3032
matrix:
3133
os: [ubuntu-latest, macos-latest, windows-latest]
32-
python-version: [3.9]
34+
python-version: ["3.11"]
3335

3436
steps:
3537
- uses: actions/checkout@v4
3638

37-
- name: Set up Rust
38-
uses: actions-rs/toolchain@v1
39-
with:
40-
profile: minimal
41-
toolchain: stable
42-
components: clippy
43-
override: true
44-
4539
- name: Set up Python ${{ matrix.python-version }}
4640
uses: actions/setup-python@v5
4741
with:
4842
python-version: ${{ matrix.python-version }}
49-
cache: "pip"
50-
cache-dependency-path: pyproject.toml
43+
cache: 'pip'
44+
cache-dependency-path: 'pyproject.toml'
45+
46+
- name: Set up Rust
47+
uses: dtolnay/rust-toolchain@stable
48+
with:
49+
toolchain: stable
50+
components: clippy, rustfmt
5151

5252
- name: Install dependencies
5353
run: make develop
5454

55-
- name: Build
56-
run: make build
57-
5855
- name: Lint
5956
run: make lint
57+
if: ${{ matrix.os == 'ubuntu-latest' }}
58+
59+
- name: Checks
60+
run: make checks
61+
if: ${{ matrix.os == 'ubuntu-latest' }}
62+
63+
- name: Build
64+
run: make build
6065

6166
- name: Test
62-
run: make tests-ci
67+
run: make coverage
6368
if: ${{ matrix.os == 'ubuntu-latest' }}
6469

65-
- name: Upload test results
70+
- name: Upload test results (Python)
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
74+
path: junit.xml
75+
if: ${{ always() }}
76+
77+
- name: Publish Unit Test Results
6678
uses: EnricoMi/publish-unit-test-result-action@v2
6779
with:
68-
check_name: Test Results
69-
github_token: ${{ secrets.GITHUB_TOKEN }}
7080
files: |
71-
rust/junit.xml
72-
junit.xml
81+
**/junit.xml
7382
if: ${{ matrix.os == 'ubuntu-latest' }}
7483

7584
- name: Upload coverage
7685
uses: codecov/codecov-action@v4
86+
87+
- name: Make dist
88+
run: make dist
7789
if: ${{ matrix.os == 'ubuntu-latest' }}
90+

.github/workflows/publish.yml

-139
This file was deleted.

.gitignore

+15-31
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
##########
2-
# PYTHON #
3-
##########
41
# Byte-compiled / optimized / DLL files
52
__pycache__/
63
*.py[cod]
74
*$py.class
85

96
# C extensions
107
*.so
11-
*.dylib
128
*.dll
139

1410
# Distribution / packaging
15-
_skbuild
1611
.Python
1712
build/
1813
develop-eggs/
@@ -26,7 +21,6 @@ parts/
2621
sdist/
2722
var/
2823
wheels/
29-
wheelhouse/
3024
pip-wheel-metadata/
3125
share/python-wheels/
3226
*.egg-info/
@@ -52,9 +46,8 @@ htmlcov/
5246
.coverage.*
5347
.cache
5448
nosetests.xml
55-
python_junit.xml
56-
junit.xml
5749
coverage.xml
50+
junit.xml
5851
*.cover
5952
*.py,cover
6053
.hypothesis/
@@ -77,15 +70,9 @@ instance/
7770
# Scrapy stuff:
7871
.scrapy
7972

80-
# Sphinx documentation
81-
docs/_build/
82-
8373
# PyBuilder
8474
target/
8575

86-
# Jupyter Notebook
87-
.ipynb_checkpoints
88-
8976
# IPython
9077
profile_default/
9178
ipython_config.py
@@ -137,23 +124,20 @@ dmypy.json
137124
# Pyre type checker
138125
.pyre/
139126

140-
########
141-
# RUST #
142-
########
143-
# Generated by Cargo
144-
# will have compiled files and executables
145-
target/
146-
pkg/
127+
# Documentation
128+
docs/_build/
129+
/site
130+
docs/api
131+
docs/index.md
132+
_template/labextension
133+
134+
# Jupyter
135+
.ipynb_checkpoints
136+
.autoversion
147137

148-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
149-
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
150-
Cargo.lock
138+
# Mac
139+
.DS_Store
151140

152-
# These are backup files generated by rustfmt
153-
**/*.rs.bk
141+
# Rust
142+
target
154143

155-
#########
156-
# OTHER #
157-
#########
158-
mics_oprt.csv
159-
tmp.py

0 commit comments

Comments
 (0)