Skip to content

Commit b7ad7c6

Browse files
authored
Merge pull request #31 from cvxgrp/updatePyVersions
Update py versions
2 parents 3c15e2b + 894fcbd commit b7ad7c6

22 files changed

+163
-320
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# GitHub Actions workflow for version bumping and package publishing
2+
# This workflow creates a new version tag, builds the package, and publishes it to PyPI
3+
4+
name: Build and publish
5+
6+
on:
7+
workflow_dispatch: # Manual trigger only
8+
inputs:
9+
tag:
10+
description: 'Release tag (e.g. v1.2.3)'
11+
required: true
12+
type: string
13+
14+
jobs:
15+
build:
16+
#needs: tagging
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write # Permission to write to repository contents (for creating releases)
20+
steps:
21+
# Step 1: Checkout the repository code
22+
- name: Checkout ${{ github.repository }}
23+
uses: actions/checkout@v4
24+
25+
- name: build
26+
run: |
27+
pip install --upgrade build
28+
python -m build
29+
30+
31+
# Job to publish the built package to PyPI
32+
publish:
33+
needs: build # This job depends on the tag job
34+
runs-on: ubuntu-latest
35+
environment: release # Use the release environment
36+
37+
permissions:
38+
contents: read # Read-only access to repository contents
39+
40+
steps:
41+
# Step 1: Download the built package artifact
42+
- uses: actions/download-artifact@v4
43+
with:
44+
name: dist # Name of the artifact
45+
path: dist # Path to download the artifact to
46+
47+
# todo: change to id-token
48+
- name: publish
49+
uses: pypa/gh-action-pypi-publish@release/v1
50+
with:
51+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: test
2+
3+
on:
4+
push
5+
6+
jobs:
7+
pre-commit:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Set up Python 3.12
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.12'
16+
17+
# do better with 'uvx pre-commit run --all-files'
18+
- name: Install pre-commit
19+
run: |
20+
pip install pre-commit
21+
22+
- name: Setup pre-commit hooks
23+
run: |
24+
pre-commit install
25+
26+
- name: Run pre-commit hooks
27+
run: |
28+
pre-commit run --all-files
29+
30+
test:
31+
#runs-on: ubuntu-latest
32+
#test:
33+
# The type of runner that the job will run on
34+
runs-on: ${{ matrix.os }}
35+
36+
strategy:
37+
matrix:
38+
os: [ ubuntu-latest, windows-latest, macos-latest ]
39+
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
40+
41+
# Steps represent a sequence of tasks that will be executed as part of the job
42+
steps:
43+
- uses: actions/setup-python@v5
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
47+
- uses: actions/checkout@v4
48+
with:
49+
fetch-depth: 0
50+
51+
- name: Install dependencies
52+
run: pip install tox
53+
54+
- name: Run tests
55+
run: tox
56+

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
# basic pre-commit hooks
33
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
4-
rev: v4.3.0
4+
rev: v5.0.0
55
hooks:
66
- id: trailing-whitespace
77
args:
@@ -12,9 +12,10 @@ repos:
1212

1313
- repo: https://github.com/astral-sh/ruff-pre-commit
1414
# Ruff version.
15-
rev: v0.4.4
15+
rev: v0.12.2
1616
hooks:
1717
# Run the linter.
1818
- id: ruff
19+
args: [ --fix, --exit-non-zero-on-fix ]
1920
# Run the formatter.
20-
- id: ruff-format
21+
- id: ruff-format

docs/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/api_reference/dsp.problem.rst

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/api_reference/dsp.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/api_reference/dsp.saddle_atoms.rst

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/api_reference/dsp.saddle_extremum.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)