Skip to content

Commit

Permalink
move to copier
Browse files Browse the repository at this point in the history
  • Loading branch information
timkpaine committed Jul 21, 2024
1 parent 77c1e00 commit 72dc8e5
Show file tree
Hide file tree
Showing 19 changed files with 627 additions and 327 deletions.
20 changes: 0 additions & 20 deletions .bumpversion.cfg

This file was deleted.

10 changes: 10 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changes here will be overwritten by Copier
_commit: a84eb20
_src_path: .
add_extension: rust
email: t.paine154@gmail.com
github: python-project-templates
project_description: A Rust-Python project template
project_name: rust template
python_version_primary: '3.11'
team: Python Project Template Authors
7 changes: 6 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ docs/* linguist-documentation
*.ipynb linguist-documentation
Makefile linguist-documentation

* text=auto eol=lf
*.md text=auto eol=lf
*.py text=auto eol=lf
*.rs text=auto eol=lf
*.toml text=auto eol=lf
*.yml text=auto eol=lf

55 changes: 34 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

name: Build Status

on:
Expand All @@ -7,10 +8,11 @@ on:
tags:
- v*
paths-ignore:
- CONTRIBUTING.md
- LICENSE
- README.md
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
Expand All @@ -29,49 +31,60 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: pyproject.toml
cache: 'pip'
cache-dependency-path: 'pyproject.toml'

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy, rustfmt

- name: Install dependencies
run: make develop

- name: Build
run: make build

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

- name: Checks
run: make checks
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Build
run: make build

- name: Test
run: make tests-ci
run: make coverage
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Upload test results
- name: Upload test results (Python)
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
path: junit.xml
if: ${{ always() }}

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Test Results
github_token: ${{ secrets.GITHUB_TOKEN }}
files: |
rust/junit.xml
junit.xml
**/junit.xml
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Upload coverage
uses: codecov/codecov-action@v4

- name: Make dist
run: make dist
if: ${{ matrix.os == 'ubuntu-latest' }}

139 changes: 0 additions & 139 deletions .github/workflows/publish.yml

This file was deleted.

46 changes: 15 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
##########
# PYTHON #
##########
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
*.dylib
*.dll

# Distribution / packaging
_skbuild
.Python
build/
develop-eggs/
Expand All @@ -26,7 +21,6 @@ parts/
sdist/
var/
wheels/
wheelhouse/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
Expand All @@ -52,9 +46,8 @@ htmlcov/
.coverage.*
.cache
nosetests.xml
python_junit.xml
junit.xml
coverage.xml
junit.xml
*.cover
*.py,cover
.hypothesis/
Expand All @@ -77,15 +70,9 @@ instance/
# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py
Expand Down Expand Up @@ -137,23 +124,20 @@ dmypy.json
# Pyre type checker
.pyre/

########
# RUST #
########
# Generated by Cargo
# will have compiled files and executables
target/
pkg/
# Documentation
docs/_build/
/site
docs/api
docs/index.md
_template/labextension

# Jupyter
.ipynb_checkpoints
.autoversion

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

# These are backup files generated by rustfmt
**/*.rs.bk
# Rust
target

#########
# OTHER #
#########
mics_oprt.csv
tmp.py
Loading

0 comments on commit 72dc8e5

Please sign in to comment.