Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2b70922
update workflows (except release) to use pixi. remove [dev] from user…
kylecarow Jun 29, 2026
9b246a9
remove Python 3.14 from testing matrix
kylecarow Jun 29, 2026
59df334
point build_and_test to test env
kylecarow Jun 29, 2026
107e7c9
move memory_profiler into test deps
kylecarow Jun 29, 2026
dfc6e89
unlink pyo3 version req between fastsim-2 and fastsim-3, update to py…
kylecarow Jun 29, 2026
79478f2
removed spurious whitespace
kylecarow Jun 29, 2026
c9471d1
dev section fillout & cleanup
kylecarow Jun 30, 2026
8097329
bump to 3.1.0 for all crates/projects, add version matching enforceme…
kylecarow Jun 30, 2026
6ab525f
removed speedup test
kylecarow Jun 30, 2026
07a21fc
remove outdated methods in fastsim.pyi
kylecarow Jun 30, 2026
1828bc4
consolidate workflows, add cargo release step and create release pixi…
kylecarow Jun 30, 2026
909fd8d
apply cargo fmt, add cargo fmt to linting, consolidate linting and te…
kylecarow Jun 30, 2026
13ced3c
test matrix needs to run lint step first
kylecarow Jun 30, 2026
12669ec
add more commented linting steps, clippy
kylecarow Jun 30, 2026
c41776a
use pixi run shell command prefix to simplify shell commands
kylecarow Jun 30, 2026
6bcb6ed
consolidate linting to reduce workflow runtime
kylecarow Jun 30, 2026
55779bc
microscopic tweak to clean up step
kylecarow Jun 30, 2026
e941efe
Clarify Anaconda environment setup instructions
kylecarow Jul 2, 2026
9b0904a
added note about conda install from pixi.lock
kylecarow Jul 3, 2026
5c67cd5
update and clean build/test workflow, single source of truth for pyth…
kylecarow Jul 6, 2026
5c687a4
release workflow points to proper shared workflow now
kylecarow Jul 6, 2026
6af65d1
add openssl back, test deps in cibw
kylecarow Jul 7, 2026
0d95e17
greatly simplified test workflow to avoid redundancy
kylecarow Jul 7, 2026
9a8b55e
update pixi lockfile
kylecarow Jul 7, 2026
8fb3db1
add zlib to deps
kylecarow Jul 7, 2026
dca8b1b
cherry-pick `pixi run docs` command
kylecarow Jul 7, 2026
160a554
restructure docs, add some tag ability to demos_to_notebooks, fill ou…
kylecarow Jul 9, 2026
60096d2
frame up vehicle hierarchy
kylecarow Jul 9, 2026
f711150
updated getting started demo with mines demo content, updated getting…
Jul 9, 2026
a1e5e19
vehicle docs progress
kylecarow Jul 10, 2026
4e58758
add nbformat dep to tests
kylecarow Jul 10, 2026
87742ec
Merge branch 'f3/docs/demos' into f3/getting-started
kylecarow Jul 10, 2026
667aa68
replace accidentally removed line in plot_utils
kylecarow Jul 10, 2026
87e351a
Merge branch 'f3/docs/demos' into f3/getting-started
kylecarow Jul 10, 2026
cb61f14
Merge branch 'f3/docs/dev' into f3/docs/demos
kylecarow Jul 10, 2026
da73a00
describe release process
kylecarow Jul 10, 2026
13a5f8d
polish installation and developer sections
kylecarow Jul 10, 2026
f6695a1
Merge pull request #268 from NatLabRockies/f3/getting-started
kylecarow Jul 10, 2026
28faaf2
link to DriveCAT
kylecarow Jul 10, 2026
9713160
delete old dev instructions
kylecarow Jul 10, 2026
0141702
finish vehicle hierarchy page
kylecarow Jul 14, 2026
cb34c0b
label_fe to ipynb
kylecarow Jul 14, 2026
933eb15
remove demo scripts, refactor as jupyter notebooks instead. we can te…
kylecarow Jul 14, 2026
950ffba
update demos to not expect old directory
kylecarow Jul 14, 2026
b192e11
Merge branch 'fastsim-3' into f3/docs/demos
kylecarow Jul 14, 2026
af46a91
reorganize docs directory to reflect toc structure
kylecarow Jul 14, 2026
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
115 changes: 54 additions & 61 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: Build and Test
name: Build wheels and run tests

on: [push]
on: [push, workflow_call]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
name: build py3.${{ matrix.python-version }} on ${{ matrix.platform || matrix.os.base }}-${{ matrix.os.version }}
build-and-test-wheels:
name: Build and test wheels on ${{ matrix.platform || matrix.os.base }}-${{ matrix.os.version }}
strategy:
fail-fast: false
# NOTE: In the matrix below, we call out macos 15 and latest (> 15) explicitly. This is to enable running on both Intel and Apple Silicon for Mac.
matrix:
os:
- base: ubuntu
Expand All @@ -25,10 +24,6 @@ jobs:
- base: windows
version: latest
arch: "amd64"
python-version:
- "10"
- "11"
- "12"
include:
- os:
base: ubuntu
Expand All @@ -39,80 +34,78 @@ jobs:
version: latest
ls: dir
runs-on: ${{ format('{0}-{1}', matrix.os.base, matrix.os.version) }}
defaults:
run:
shell: pixi run -e wheels bash -e {0}
env:
CARGO_HTTP_MULTIPLEXING: "false"
steps:
- uses: actions/checkout@v4

- name: set up rust
uses: dtolnay/rust-toolchain@stable

- name: install rust target for MacOS 14+ (Apple Silicon)
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
if: matrix.os.base == 'macos' && matrix.os.version == 'latest'

- name: install rust target for MacOS 15-intel (Intel Mac)
run: rustup target add x86_64-apple-darwin aarch64-apple-darwin
if: matrix.os.base == 'macos' && matrix.os.version == '15-intel'

- name: Update minimum supported MacOS for Wheels for MacOS 15-intel (Intel Mac)
run: echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> $GITHUB_ENV
if: matrix.os.base == 'macos' && matrix.os.version == '15-intel'

- name: set up python
uses: actions/setup-python@v4
# uses: actions/setup-python@v5
- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.8.14
with:
python-version: "3.${{ matrix.python-version }}"

- name: run cargo tests
run: cargo test

- name: install python dependencies
run: python -m pip install --upgrade pip setuptools wheel twine cibuildwheel pytest

- name: build source distribution
if: matrix.os.base == 'ubuntu' && matrix.python-version == '10'
environments: wheels

- name: Check version consistency
if: matrix.os.base == 'ubuntu'
run: python python/fastsim/check_versions.py

# - name: Check Python formatting & linting
# if: matrix.os.base == 'ubuntu'
# run: ruff check .

- name: Check Rust formatting
if: matrix.os.base == 'ubuntu'
run: cargo fmt --check

# - name: Check Rust linting
# if: matrix.os.base == 'ubuntu'
# run: cargo clippy -- -D warnings

- name: Run Rust tests
if: matrix.os.base == 'ubuntu'
run: cargo test --release

- name: Build source distribution
if: matrix.os.base == 'ubuntu'
run: |
python -m pip install -U setuptools-rust
python -c "import setuptools; setuptools.setup()" sdist

- name: install FASTSim python
run: python -m pip install -e .[dev]
python -m build --sdist --outdir dist

- name: run pytest
timeout-minutes: 20
run: pytest -v
# Widens wheel compatibility on the Intel Mac runner, which otherwise
# defaults to a higher minimum macOS version than we want to require.
- name: Update minimum supported MacOS for Wheels for MacOS 15-intel (Intel Mac)
if: matrix.os.base == 'macos' && matrix.os.version == '15-intel'
run: echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> $GITHUB_ENV

- name: build ${{ matrix.platform || matrix.os.base }} binaries
# NOTE: parts inspired by https://cibuildwheel.pypa.io/en/stable/setup/
# One invocation per platform builds every target Python version --
# cibuildwheel manages fetching/using each target interpreter internally.
- name: Build ${{ matrix.platform || matrix.os.base }} binaries
run: cibuildwheel --output-dir dist
env:
CIBW_BUILD: "cp3${{ matrix.python-version }}-*"
# Python version targets
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-*"
CIBW_SKIP: "*-win32 *-musllinux* *i686 *ppc64le *s390x *aarch64"
CIBW_PLATFORM: ${{ matrix.platform || matrix.os.base }}
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/python/fastsim/tests"
CIBW_BEFORE_TEST: python -m pip install --group test
CIBW_TEST_COMMAND: "pytest -v {project}"
CIBW_ARCHS_MACOS: "${{ matrix.os.arch }}"
# see https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2
CIBW_TEST_SKIP: "*_universal2:arm64"
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"'
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"'
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
CIBW_MANYLINUX_I686_IMAGE: "manylinux2014"
CIBW_BEFORE_BUILD: >
pip install -U setuptools-rust &&
rustup default stable &&
rustup show
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28"
CIBW_BEFORE_BUILD: rustup show
# Linux builds run in an isolated container with no Rust preinstalled,
# so it needs its own toolchain install.
CIBW_BEFORE_BUILD_LINUX: >
yum -y install openssl openssl-devel &&
pip install -U setuptools-rust &&
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y &&
curl https://sh.rustup.rs -sSf | sh -s -- --profile=minimal -y &&
rustup show

- name: list dist files
- name: List dist files
run: ${{ matrix.ls || 'ls -lh' }} dist/

- uses: actions/upload-artifact@v4
with:
name: fastsim-${{ matrix.platform || matrix.os.base }}-${{ matrix.os.version }}-py3.${{ matrix.python }}-${{ strategy.job-index }}
name: fastsim-${{ matrix.platform || matrix.os.base }}-${{ matrix.os.version }}-${{ strategy.job-index }}
path: ./dist/*
28 changes: 7 additions & 21 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,19 @@ jobs:
# Build job
build:
runs-on: ubuntu-latest
defaults:
run:
shell: pixi run -e docs bash -e {0}
env:
# Disable HTTP/2 multiplexing to avoid intermittent crates.io download
# failures
# Disable HTTP/2 multiplexing to avoid intermittent crates.io download failures
CARGO_HTTP_MULTIPLEXING: "false"
steps:
- uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

# Cache the cargo registry and compiled Rust artifacts so docs deploys
# don't recompile the core from scratch every run.
- name: Cache Rust build
uses: Swatinem/rust-cache@v2

- name: Set up Python
uses: actions/setup-python@v5
- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.8.14
with:
python-version: "3.11"

# FASTSim must be importable so the demo notebooks can be executed during
# the build. This compiles the Rust core, so it is the slow step.
- name: Install FASTSim and doc dependencies
run: |
pip install -U pip
pip install .
pip install -r docs/requirements.txt
environments: docs

# Register the python3 kernel that the generated notebooks request.
- name: Register Jupyter kernel
Expand Down
153 changes: 29 additions & 124 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,160 +1,65 @@
name: release
name: Release

on:
release:
types: [published]
workflow_dispatch:

# NOTE: parts inspired by https://cibuildwheel.pypa.io/en/stable/setup/

jobs:
build:
name: build py3.${{ matrix.python-version }} on ${{ matrix.platform || matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
- macos-15-intel # Intel runner
- macos-latest # Apple Silicon runner
- windows-latest
python-version:
- "10"
- "11"
- "12"
include:
- os: ubuntu-latest
platform: linux
- os: windows-latest
ls: dir

env:
FASTSIM_DISABLE_NETWORK_TESTS: 1

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: set up rust
uses: dtolnay/rust-toolchain@stable

- name: install rust target for MacOS 14+ (Apple Silicon)
run: rustup target add aarch64-apple-darwin
if: matrix.os == 'macos-latest'

- name: install rust target for MacOS 15-intel (Intl Mac)
run: rustup target add x86_64-apple-darwin aarch64-apple-darwin
if: matrix.os == 'macos-15-intel'

- name: set up Python
uses: actions/setup-python@v4
# uses: actions/setup-python@v5
with:
python-version: "3.${{ matrix.python-version }}"

- name: run cargo tests
run: cargo test

- name: Upgrade to latest pip
run: python -m pip install --upgrade pip

- name: install Python dependencies
run: python -m pip install --upgrade setuptools wheel twine cibuildwheel pytest

- name: build source distribution
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '10'
run: |
pip install -U setuptools-rust
python -c "import setuptools; setuptools.setup()" sdist

- name: Update minimum supported MacOS for Wheels for MacOS 15-intel (Intel Mac)
run: echo "MACOSX_DEPLOYMENT_TARGET=10.12" >> $GITHUB_ENV
if: matrix.os == 'macos-15-intel'

- name: build ${{ matrix.platform || matrix.os }} binaries
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BUILD: "cp3${{ matrix.python-version }}-*"
CIBW_SKIP: "*-win32 *-musllinux* *i686 *ppc64le *s390x *aarch64"
# CIBW_PLATFORM: ${{ matrix.platform || matrix.os }}
# TODO: why doesn't pytest work with cibuildwheel?
# CIBW_TEST_COMMAND: "pytest -v {project}/python/fastsim/tests"
CIBW_TEST_COMMAND: "python -m unittest discover {project}/python/fastsim/tests"
# CIBW_ARCHS_MACOS: "universal2"
# see https://cibuildwheel.readthedocs.io/en/stable/faq/#universal2
CIBW_TEST_SKIP: "*_universal2:arm64"
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH"'
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"'
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
CIBW_MANYLINUX_I686_IMAGE: "manylinux2014"
CIBW_BEFORE_BUILD: >
pip install -U setuptools-rust &&
rustup default stable &&
rustup show
CIBW_BEFORE_BUILD_LINUX: >
yum -y install openssl openssl-devel &&
pip install -U setuptools-rust &&
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=nightly --profile=minimal -y &&
rustup show
CIBW_BEFORE_BUILD_MACOS: >
rustup target add x86_64-apple-darwin
# - name: build windows 32bit binaries
# if: matrix.os == 'windows'
# run: cibuildwheel --output-dir dist
# env:
# CIBW_BUILD: 'cp3${{ matrix.python-version }}-win32'
# CIBW_PLATFORM: windows
# CIBW_TEST_REQUIRES: 'pytest'
# CIBW_TEST_COMMAND: 'pytest {project}/tests -s'
# CIBW_ENVIRONMENT: 'PATH="$UserProfile\.cargo\bin;$PATH"'
# CIBW_BEFORE_BUILD: >
# pip install -U setuptools-rust &&
# rustup toolchain install nightly-i686-pc-windows-msvc &&
# rustup default nightly-i686-pc-windows-msvc &&
# rustup override set nightly-i686-pc-windows-msvc &&
# rustup show

- name: list wheelhouse files
run: ${{ matrix.ls || 'ls -lh' }} ./wheelhouse/

- uses: actions/upload-artifact@v4
with:
name: artifact-py3.${{ matrix.python-version }}-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
uses: ./.github/workflows/build_and_test.yaml

release:
needs: build
name: release files to PyPI
name: Publish release artifacts
runs-on: ubuntu-latest
defaults:
run:
shell: pixi run -e release bash -e {0}
# Protection Strategies -- use ONE of the following two lines:
# publish on via explicit publish
if: github.event_name == 'release' && github.event.action == 'published'
# publish on tag starting w/ 'v'
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: download files
- uses: actions/checkout@v4

- name: Download files
uses: actions/download-artifact@v4
with:
merge-multiple: true
path: artifact

- name: set up Python 3.11
uses: actions/setup-python@v4
- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.8.14
with:
python-version: "3.11"
environments: release

- run: pip install twine
- name: Check distribution with Twine
run: python -m twine check ./artifact/*

- run: twine check ./artifact/*
- name: Dry-run Rust crate publish
run: |
cargo publish --manifest-path fastsim-core/fastsim-proc-macros/Cargo.toml --locked --dry-run
cargo publish --manifest-path fastsim-core/Cargo.toml --locked --dry-run
# cargo publish --manifest-path fastsim-cli/Cargo.toml --locked --dry-run

- name: Publish distribution to Test PyPI
run: twine upload -r testpypi ./artifact/*
run: python -m twine upload -r testpypi ./artifact/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.FASTSIM_TEST_PYPI_TOKEN }}

- name: Publish Rust crates to crates.io
run: |
cargo publish --manifest-path fastsim-core/fastsim-proc-macros/Cargo.toml --locked
cargo publish --manifest-path fastsim-core/Cargo.toml --locked
# cargo publish --manifest-path fastsim-cli/Cargo.toml --locked
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Upload files to PyPI
run: twine upload ./artifact/*
run: python -m twine upload ./artifact/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.fastsim_pypi_token }}
Loading
Loading