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

Bringing Modopt to 2024's standards. #340

Merged
merged 34 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7534999
use a pyproject.toml file.
paquiteau Feb 14, 2024
02a16d4
feat: add a style checking CI.
paquiteau Feb 14, 2024
d9aa964
fix: missing bracket.
paquiteau Feb 16, 2024
4d37bef
run black.
paquiteau Feb 16, 2024
067c40c
run ruff --fix --unsafe-fixes .
paquiteau Feb 16, 2024
29833bc
move to a src layout.
paquiteau Feb 16, 2024
536366d
fix: make majority of tests passing.
paquiteau Feb 16, 2024
0c3b13c
typo
paquiteau Feb 16, 2024
a79113b
fix tests setup
paquiteau Feb 16, 2024
bcbe1f3
slim down the CI.
paquiteau Feb 16, 2024
5fb4cb2
black 24
paquiteau Feb 18, 2024
44e7cf4
update ruff config.
paquiteau Feb 19, 2024
67342e7
fix: F403
paquiteau Feb 19, 2024
14542cc
fix: D1** errors.
paquiteau Feb 19, 2024
99208cd
fix: E501
paquiteau Feb 19, 2024
fdd6d1e
fix: NPY002
paquiteau Feb 19, 2024
22c016f
fix: RUF012
paquiteau Feb 19, 2024
59f58dd
fix: B026
paquiteau Feb 19, 2024
b9827ee
fix: B028
paquiteau Feb 19, 2024
0811b7a
fix: ruff format
paquiteau Feb 19, 2024
067e29f
fix: NPY002
paquiteau Feb 19, 2024
0040d1a
proj: add pytest-xdist for parallel testing.
paquiteau Feb 19, 2024
4189da6
remove type annotations.
paquiteau Feb 19, 2024
8195351
proj: use importlib_metada for python 3.8 compat.
paquiteau Feb 19, 2024
51ffef3
fix: update sssim values
paquiteau Feb 19, 2024
4956803
adapt doc to new format.
paquiteau Feb 19, 2024
defd0e7
delete wrappers.
paquiteau Feb 22, 2024
34018ad
feat: args kwargs update.
paquiteau Feb 22, 2024
f323401
update authors
paquiteau Feb 22, 2024
e7dfda3
missing empty line.
paquiteau Feb 22, 2024
fc9799e
install ipykernel as well.
paquiteau Feb 22, 2024
b4c7f52
update ci
paquiteau Feb 22, 2024
1c87b73
use pandoc ?
paquiteau Feb 22, 2024
8e277aa
docs: correct naming for intersphinx.
paquiteau Mar 13, 2024
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
25 changes: 8 additions & 17 deletions .github/workflows/cd-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,28 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Conda with Python 3.8
uses: conda-incubator/setup-miniconda@v2
- uses: actions/setup-python@v4
with:
auto-update-conda: true
python-version: 3.8
auto-activate-base: false
python-version: "3.10"
cache: pip

- name: Install dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
python -m pip install -r develop.txt
python -m pip install twine
python -m pip install .
python -m pip install .[doc,test]

- name: Run Tests
shell: bash -l {0}
run: |
python setup.py test
pytest

- name: Check distribution
shell: bash -l {0}
run: |
python setup.py sdist
twine check dist/*

- name: Upload coverage to Codecov
Expand All @@ -57,20 +53,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Conda with Python 3.8
uses: conda-incubator/setup-miniconda@v2
with:
python-version: "3.8"

- name: Install dependencies
shell: bash -l {0}
run: |
conda install -c conda-forge pandoc
python -m pip install --upgrade pip
python -m pip install -r docs/requirements.txt
python -m pip install .
python -m pip install .[doc]

- name: Build API documentation
shell: bash -l {0}
Expand Down
77 changes: 11 additions & 66 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,61 +16,41 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10"]
python-version: ["3.8", "3.9", "3.10"]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Conda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: Check Conda
shell: bash -l {0}
run: |
conda info
conda list
python --version
cache: pip

- name: Install Dependencies
shell: bash -l {0}
run: |
python --version
python -m pip install --upgrade pip
python -m pip install -r develop.txt
python -m pip install -r docs/requirements.txt
python -m pip install astropy "scikit-image<0.20" scikit-learn matplotlib
python -m pip install tensorflow>=2.4.1
python -m pip install twine
python -m pip install .
python -m pip install .[test]
python -m pip install astropy scikit-image scikit-learn matplotlib
python -m pip install tensorflow>=2.4.1 torch

- name: Run Tests
shell: bash -l {0}
run: |
export PATH=/usr/share/miniconda/bin:$PATH
pytest -n 2

- name: Save Test Results
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: unit-test-results-${{ matrix.os }}-${{ matrix.python-version }}
path: pytest.xml

- name: Check Distribution
shell: bash -l {0}
run: |
python setup.py sdist
twine check dist/*
path: coverage.xml

- name: Check API Documentation build
shell: bash -l {0}
run: |
conda install -c conda-forge pandoc
apt install pandoc
pip install .[doc] ipykernel
sphinx-apidoc -t docs/_templates -feTMo docs/source modopt
sphinx-build -b doctest -E docs/source docs/_build

Expand All @@ -81,38 +61,3 @@ jobs:
file: coverage.xml
flags: unittests

test-basic:
name: Basic Test Suite
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9"]

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Conda with Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
auto-activate-base: false

- name: Install Dependencies
shell: bash -l {0}
run: |
python --version
python -m pip install --upgrade pip
python -m pip install -r develop.txt
python -m pip install astropy "scikit-image<0.20" scikit-learn matplotlib
python -m pip install .

- name: Run Tests
shell: bash -l {0}
run: |
export PATH=/usr/share/miniconda/bin:$PATH
pytest -n 2
38 changes: 38 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Style checking

on:
push:
branches: [ "master", "main", "develop" ]
pull_request:
branches: [ "master", "main", "develop" ]

workflow_dispatch:

env:
PYTHON_VERSION: "3.10"

jobs:
linter-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pip

- name: Install Python deps
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test,dev]

- name: Black Check
shell: bash
run: black . --diff --color --check

- name: ruff Check
shell: bash
run: ruff check
2 changes: 0 additions & 2 deletions .pylintrc

This file was deleted.

14 changes: 0 additions & 14 deletions .pyup.yml

This file was deleted.

5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

12 changes: 0 additions & 12 deletions develop.txt

This file was deleted.

Loading
Loading