Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre commit #31

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 30 additions & 18 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is autogenerated by maturin v1.7.0
# This file is autogenerated by maturin v1.7.8
# To update, run
#
# maturin generate-ci github
Expand All @@ -11,7 +11,7 @@ on:
- main
- master
tags:
- '*'
- "*"
pull_request:
workflow_dispatch:

Expand All @@ -24,17 +24,17 @@ jobs:
strategy:
matrix:
platform:
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: armv7
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: s390x
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: ppc64le
steps:
- uses: actions/checkout@v4
Expand All @@ -46,7 +46,7 @@ jobs:
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
sccache: "true"
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand All @@ -59,13 +59,13 @@ jobs:
strategy:
matrix:
platform:
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: aarch64
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: armv7
steps:
- uses: actions/checkout@v4
Expand All @@ -77,7 +77,7 @@ jobs:
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
sccache: "true"
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -117,7 +117,7 @@ jobs:
strategy:
matrix:
platform:
- runner: macos-12
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
Expand All @@ -131,7 +131,7 @@ jobs:
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -156,11 +156,23 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, musllinux, windows, macos, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: "wheels-*/*"
- name: Publish to PyPI
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: pre-commit

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

env:
CARGO_TERM_COLOR: always
Expand All @@ -15,8 +15,8 @@ jobs:
env:
SKIP: no-commit-to-branch
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: # run pre-commit on our oldest supported python version
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: # run pre-commit on our oldest supported python version
python-version: "3.10"
- uses: pre-commit/action@v3.0.1
- uses: pre-commit/action@v3.0.1
15 changes: 7 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Rust

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -15,12 +15,11 @@ env:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-ast
- id: check-merge-conflict
Expand All @@ -18,12 +18,12 @@ repos:
rev: 054bda51dbe278b3e86f27c890e3f3ac877d616c
hooks:
- id: validate-cff
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.4.2"
hooks:
- id: mdformat
- id: prettier
- repo: https://github.com/crate-ci/typos
rev: v1.24.6
rev: v1.28.3
hooks:
- id: typos
- repo: https://github.com/doublify/pre-commit-rust
Expand All @@ -32,13 +32,13 @@ repos:
- id: fmt
- id: cargo-check
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
rev: v0.8.3
hooks:
- id: ruff-format
- id: ruff
args: [ --fix, --show-fixes ]
args: [--fix, --show-fixes]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy

Expand Down
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Patch release to fix distribution to PyPI.

## \[0.6.1\] -- 2023-10-05

Patch release to fix distribution to PyPI. The release is now happening
Patch release to fix distribution to PyPI. The release is now happening
automatically from GitHub CI.

## \[0.6.0\] -- 2023-10-05
Expand Down Expand Up @@ -84,7 +84,7 @@ API.
## \[0.5.0\] -- 2022-02-10

The major change of this release is a change in the macro DSL to write
reactions even more naturally, with `+` instead of `,`. Example:
reactions even more naturally, with `+` instead of `,`. Example:
`translation: mRNA => mRNA + GFP @ trans_rate`.

It comes also with some performance improvements, mostly on the API side (~5%).
Expand All @@ -93,7 +93,7 @@ It comes also with some performance improvements, mostly on the API side (~5%).

- The Rngs can now be seeded.
- `SRate::LMA2` was reintroduced, along with `SRate::LMAn`, implementing
2nd and nth-order LMA. They cannot be implemented in terms of
2nd and nth-order LMA. They cannot be implemented in terms of
`SRate::LMA`.
- Added nth-order reactants and products to the macro DSL.
- The libraries `rand` and `rand_distr` are now reexported to be more
Expand All @@ -115,7 +115,7 @@ as more performance improvements for the function-based API (20-35%).

### Changed

- `Gillespie` no longer has a const parameter. This breaking change
- `Gillespie` no longer has a const parameter. This breaking change
was necessary for the definition of a system at run-time (for
Python bindings).

Expand Down Expand Up @@ -163,6 +163,6 @@ First release.
time, and with several possible rate functions (Law of Mass Action
but also Hill functions or Michaelis--Menten dynamics);
- `define_system!` which requires that the system is defined at
compilation. It only supports rate functions based on the Law
of Mass Action. It runs typically three times as fast as the
compilation. It only supports rate functions based on the Law
of Mass Action. It runs typically three times as fast as the
programmatic API.
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ type: software
authors:
- given-names: Virgile
family-names: Andreani
orcid: 'https://orcid.org/0000-0002-2383-1478'
repository-code: 'https://github.com/Armavica/rebop'
url: 'https://armavica.github.io/rebop/'
orcid: "https://orcid.org/0000-0002-2383-1478"
repository-code: "https://github.com/Armavica/rebop"
url: "https://armavica.github.io/rebop/"
abstract: Fast stochastic simulator for chemical reaction networks
license: MIT
version: 0.8.3
Loading
Loading