Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
chaithyagr committed Apr 12, 2024
2 parents f992221 + 2040f73 commit aec0999
Show file tree
Hide file tree
Showing 73 changed files with 3,850 additions and 4,016 deletions.
27 changes: 8 additions & 19 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,22 +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:
auto-update-conda: true
python-version: 3.8
auto-activate-base: false

- 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
88 changes: 12 additions & 76 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,70 +16,41 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8]
python-version: ["3.8", "3.9", "3.10"]

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

- name: Report WPS Errors
uses: wemake-services/wemake-python-styleguide@0.14.1
continue-on-error: true
with:
reporter: 'github-pr-review'
path: './modopt'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- 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 scikit-learn
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
python setup.py test
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 @@ -90,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.6, 3.7, 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 scikit-learn
python -m pip install .
- name: Run Tests
shell: bash -l {0}
run: |
export PATH=/usr/share/miniconda/bin:$PATH
python setup.py test
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ instance/
docs/_build/
docs/source/fortuna.*
docs/source/scripts.*
docs/source/auto_examples/
docs/source/*.nblink

# PyBuilder
Expand Down
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.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ All packages required by ModOpt should be installed automatically. Optional pack
In order to run the code in this repository the following packages must be
installed:

* [Python](https://www.python.org/) [> 3.6]
* [Python](https://www.python.org/) [> 3.7]
* [importlib_metadata](https://importlib-metadata.readthedocs.io/en/latest/) [==3.7.0]
* [Numpy](http://www.numpy.org/) [==1.19.5]
* [Scipy](http://www.scipy.org/) [==1.5.4]
* [Progressbar 2](https://progressbar-2.readthedocs.io/) [==3.53.1]
* [tqdm](https://tqdm.github.io/) [>=4.64.0]

### Optional Packages

Expand Down
9 changes: 0 additions & 9 deletions develop.txt

This file was deleted.

1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ numpydoc==1.1.0
sphinx==4.3.1
sphinxcontrib-bibtex==2.4.1
sphinxawesome-theme==3.2.1
sphinx-gallery==0.11.1
Loading

0 comments on commit aec0999

Please sign in to comment.