Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
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
33 changes: 29 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,32 @@ updates:
schedule:
interval: "weekly"

groups :
python-packages :
patterns :
- " * "
# Define a group for general Python packages
groups:
python-packages:
patterns:
- "*" # This pattern should match all packages by default

# New entry specifically for py-ballisticcalc to track patch versions
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly" # You can adjust this if you want different schedules

# Target only py-ballisticcalc
allow:
- dependency-name: "py-ballisticcalc"

# Specify patch versioning strategy
versioning-strategy: "lockfile-only" # This tells Dependabot to only respect changes in the lockfile (e.g., Poetry.lock, Pipfile.lock) for versioning.
# For strict patch updates without a lockfile, you'd combine with 'ignore' or filter.

# To specifically target patch updates, you'll generally use 'ignore'
# or ensure your project uses a lockfile (like poetry.lock or Pipfile.lock).
# Dependabot's 'versioning-strategy' typically works with the lockfile.
# If not using a lockfile, 'ignore' rules are more explicit for patch-only updates.

ignore:
# Ignore minor and major version updates for py-ballisticcalc
- dependency-name: "py-ballisticcalc"
update-types: ["major", "minor"]
2 changes: 1 addition & 1 deletion .github/workflows/cibuildwheel_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- name: Install dependencies
run: |
uv pip install cibuildwheel
uv sync --dev

- name: Build binary python package
run: |
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/package-test-cython.yml

This file was deleted.

12 changes: 5 additions & 7 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv and set the python version "3.12"
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"

- name: Install dependencies
- name: Install project
run: |
python -m pip install --upgrade pip
python -m pip install build cibuildwheel
uv sync --dev

- name: Build binary Python package
run: |
python -m build --sdist --outdir ./dist
uv build --sdist --out-dir ./dist
cibuildwheel --output-dir ./dist

- name: Upload artifacts
Expand Down Expand Up @@ -78,7 +77,6 @@ jobs:
cp ./dist-macos-13/* dist/ || true
cp ./dist-macos-14/* dist/ || true


- name: List ./dist
run: ls ./dist

Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/pypi-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv and set the python version "3.12"
uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"

- name: Install dependencies
- name: Install project
run: |
python -m pip install --upgrade pip
python -m pip install build cibuildwheel
uv sync --dev

- name: Build binary Python package
run: |
python -m build --sdist --outdir ./dist
uv build --sdist --out-dir ./dist
cibuildwheel --output-dir ./dist

- name: Upload artifacts
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

# Python cythonized package tests (uv)
name: Pytest

on:
pull_request:
branches:
- '*'
workflow_dispatch:


jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-13, macos-14 ]
python-version: ["3.9", "3.10", "3.11", "3.12"]

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

- name: Install uv and set the python version ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install project
run: |
uv sync --dev

- name: Get py-ballisticcalc installed version
id: get_installed_version
run: |
echo "pybc_version=$(python -c 'from importlib.metadata import metadata; print(metadata("py-ballisticcalc")["Version"])')" >> "$GITHUB_OUTPUT"
shell: bash # Explicitly use bash for cross-platform compatibility

- name: Clone from specific tag based on installed version
run: |
# Access the version obtained from the previous step's output
# The 'steps.get_installed_version.outputs.pybc_version' syntax is universal
PYBC_VERSION="${{ steps.get_installed_version.outputs.pybc_version }}"
echo "Cloning py-ballisticcalc with tag: $PYBC_VERSION"
git clone --branch "v$PYBC_VERSION" --single-branch https://github.com/o-murphy/py-ballisticcalc.git py-ballisticcalc
shell: bash # Ensure bash is used for the shell commands

- name: Run py-ballisticcalc tests with --engine CyEulerBallistic
run: |
cd py-ballisticcalc
pytest tests -v --engine CyEulerBallistic
cd ../
shell: bash
if: runner.os != 'Windows'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
**/*.egg-info
**/.venv
.vscode/settings.json

# project specific
**/py-ballisticcalc
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
Loading