Skip to content

Commit

Permalink
ModOpt v1.5 release (#108)
Browse files Browse the repository at this point in the history
* added workflows

* test update to deploy test results from fork

* fix typo

* test commands copied from yaml

* removed test deployment

* Pyralid style update (#104)

* first iteration of pyralid style update

* updated progress on pyralid style refactor

* further updates

* latest update

* all tests passing locally

* all doctests passing locally

* removed autodoc files

* updated refactoring

* test pull_request_target and add main branch

* added logo and fixed link to api docs

* added develop branch to CI

* updated workflow

* test PR review

* reverted to standard PR directive

* updated readme

* test deploy test results from fork

* attempt to fix fomatting

* removed test deployment

* added #97 GPU compatibility in consistent style

* additional clean up

* more clean up

* fixed mistake

* Update modopt/interface/errors.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_math.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_math.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* removed doc requirements from basic test suite

* removed contents as they are now automatically generated on GitHub

* fix GPU bug in PowerMethod

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Update modopt/tests/test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* renamed dummy functions in test_opt.py

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>

* Release cleanup (#109)

* cleaned up readme

* cleaned up api docs

Co-authored-by: Zaccharie Ramzi <zaccharie.ramzi@gmail.com>
  • Loading branch information
sfarrens and zaccharieramzi authored Mar 31, 2021
1 parent e30cc02 commit 616c9e7
Show file tree
Hide file tree
Showing 104 changed files with 4,868 additions and 3,361 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/cd-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: CD

on:
push:
branches:
- master
- main

jobs:

coverage:
name: Deploy Coverage Results
runs-on: ubuntu-latest

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

- 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: |
python -m pip install --upgrade pip
python -m pip install -r develop.txt
python -m pip install twine
python -m pip install .
- name: Run Tests
shell: bash -l {0}
run: |
python setup.py test
- name: Check distribution
shell: bash -l {0}
run: |
python setup.py sdist
twine check dist/*
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: unittests

api:
name: Deploy API Documentation
needs: coverage
runs-on: ubuntu-latest
if: success()

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

- 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 .
- name: Build API documentation
shell: bash -l {0}
run: |
sphinx-apidoc -t docs/_templates -feTMo docs/source modopt
sphinx-build -E docs/source docs/_build
- name: Deploy API documentation
uses: peaceiris/actions-gh-pages@v3.5.9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build
126 changes: 126 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: CI

on:
pull_request:
branches:
- develop
- master
- main

jobs:
test-full:
name: Full Test Suite
runs-on: ${{ matrix.os }}

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

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
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
- 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 twine
python -m pip install .
- name: Run Tests
shell: bash -l {0}
run: |
export PATH=/usr/share/miniconda/bin:$PATH
python setup.py test
- name: Save Test Results
if: always()
uses: actions/upload-artifact@v2
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/*
- name: Check API Documentation build
shell: bash -l {0}
run: |
conda install -c conda-forge pandoc
sphinx-apidoc -t docs/_templates -feTMo docs/source modopt
sphinx-build -b doctest -E docs/source docs/_build
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
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
149 changes: 135 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,142 @@
# Ignore Python compilation
*.pyc
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Ignore scripts
*.sh
# C extensions
*.so

# Ignore cache
*.cache/
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Ignore coverage tests
# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
pytest.xml

# Ignore installation
.eggs/
modopt.egg-info/
dist/
build/
# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/
docs/source/fortuna.*
docs/source/scripts.*
docs/source/*.nblink

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Ignore pypi config
.pypirc
# Cython debug symbols
cython_debug/
2 changes: 2 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MASTER]
ignore-patterns=**/docs/**/*.py
11 changes: 11 additions & 0 deletions .pyup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# autogenerated pyup.io config file
# see https://pyup.io/docs/configuration/ for all available options

schedule: ''
update: all
label_prs: update
assignees: sfarrens
requirements:
- requirements.txt
- develop.txt
- docs/requirements.txt
Loading

0 comments on commit 616c9e7

Please sign in to comment.