Skip to content

Commit

Permalink
pinning numpy<2 (#230)
Browse files Browse the repository at this point in the history
* pinning numpy<2
* added recent pythons to build matrix
* going with ruff for linting/formatting etc
  • Loading branch information
vineetbansal authored Oct 15, 2024
1 parent 7830580 commit 7115c38
Show file tree
Hide file tree
Showing 46 changed files with 6,072 additions and 4,641 deletions.
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

32 changes: 19 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,25 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.7, 3.8, 3.9]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
- name: Install system depedencies
run: |
sudo apt-get update
sudo apt-get install libbz2-dev liblzma-dev
if: ${{ runner.os == 'Linux' }}

- uses: actions/checkout@v2
with:
lfs: true

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Upgrade setuptools
run: |
pip3 install wheel --upgrade
Expand All @@ -39,11 +50,6 @@ jobs:
echo "GRB_LICENSE_FILE=${GUROBI_HOME}/gurobi.lic" >> $GITHUB_ENV
continue-on-error: true

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install HATCHet with dev dependencies
run: |
python -m pip install .[dev]
Expand Down Expand Up @@ -147,9 +153,9 @@ jobs:
find tests/out -name "*:*" -exec rename 's|:|-|g' {} \;
- name: Save Pytest Output Data
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test-results
name: test-results-${{ matrix.python }}
path: tests/out

- name: Convert coverage
Expand All @@ -174,6 +180,11 @@ jobs:
with:
lfs: true

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Upgrade setuptools
run: |
pip3 install wheel --upgrade
Expand All @@ -187,11 +198,6 @@ jobs:
(cd gurobi902/linux64/lib && ln -f -s ../src/build/libgurobi_c++.a libgurobi_c++.a)
echo "GUROBI_HOME=$(realpath gurobi902)" >> $GITHUB_ENV
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install package
run: |
CXXFLAGS=-pthread pip install .[dev]
Expand Down
26 changes: 5 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

- repo: https://github.com/pycqa/flake8
rev: '4.0.1'
hooks:
- id: flake8

- repo: https://github.com/grantjenks/blue.git
rev: v0.9.1
hooks:
- id: blue
args: [--line-length=120]

- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
- id: absolufy-imports
- id: ruff
args: [ --fix ]
- id: ruff-format
Loading

0 comments on commit 7115c38

Please sign in to comment.