Skip to content

Commit 616c9e7

Browse files
ModOpt v1.5 release (#108)
* 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>
1 parent e30cc02 commit 616c9e7

104 files changed

Lines changed: 4868 additions & 3361 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/cd-build.yml‎

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
9+
jobs:
10+
11+
coverage:
12+
name: Deploy Coverage Results
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Conda with Python 3.8
20+
uses: conda-incubator/setup-miniconda@v2
21+
with:
22+
auto-update-conda: true
23+
python-version: 3.8
24+
auto-activate-base: false
25+
26+
- name: Install dependencies
27+
shell: bash -l {0}
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install -r develop.txt
31+
python -m pip install twine
32+
python -m pip install .
33+
34+
- name: Run Tests
35+
shell: bash -l {0}
36+
run: |
37+
python setup.py test
38+
39+
- name: Check distribution
40+
shell: bash -l {0}
41+
run: |
42+
python setup.py sdist
43+
twine check dist/*
44+
45+
- name: Upload coverage to Codecov
46+
uses: codecov/codecov-action@v1
47+
with:
48+
token: ${{ secrets.CODECOV_TOKEN }}
49+
file: coverage.xml
50+
flags: unittests
51+
52+
api:
53+
name: Deploy API Documentation
54+
needs: coverage
55+
runs-on: ubuntu-latest
56+
if: success()
57+
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v2
61+
62+
- name: Set up Conda with Python 3.8
63+
uses: conda-incubator/setup-miniconda@v2
64+
with:
65+
auto-update-conda: true
66+
python-version: 3.8
67+
auto-activate-base: false
68+
69+
- name: Install dependencies
70+
shell: bash -l {0}
71+
run: |
72+
conda install -c conda-forge pandoc
73+
python -m pip install --upgrade pip
74+
python -m pip install -r docs/requirements.txt
75+
python -m pip install .
76+
77+
- name: Build API documentation
78+
shell: bash -l {0}
79+
run: |
80+
sphinx-apidoc -t docs/_templates -feTMo docs/source modopt
81+
sphinx-build -E docs/source docs/_build
82+
83+
- name: Deploy API documentation
84+
uses: peaceiris/actions-gh-pages@v3.5.9
85+
with:
86+
github_token: ${{ secrets.GITHUB_TOKEN }}
87+
publish_dir: docs/_build

‎.github/workflows/ci-build.yml‎

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- master
8+
- main
9+
10+
jobs:
11+
test-full:
12+
name: Full Test Suite
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, macos-latest]
19+
python-version: [3.8]
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Report WPS Errors
26+
uses: wemake-services/wemake-python-styleguide@0.14.1
27+
continue-on-error: true
28+
with:
29+
reporter: 'github-pr-review'
30+
path: './modopt'
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Set up Conda with Python ${{ matrix.python-version }}
35+
uses: conda-incubator/setup-miniconda@v2
36+
with:
37+
auto-update-conda: true
38+
python-version: ${{ matrix.python-version }}
39+
auto-activate-base: false
40+
41+
- name: Check Conda
42+
shell: bash -l {0}
43+
run: |
44+
conda info
45+
conda list
46+
python --version
47+
48+
- name: Install Dependencies
49+
shell: bash -l {0}
50+
run: |
51+
python --version
52+
python -m pip install --upgrade pip
53+
python -m pip install -r develop.txt
54+
python -m pip install -r docs/requirements.txt
55+
python -m pip install astropy scikit-image scikit-learn
56+
python -m pip install twine
57+
python -m pip install .
58+
59+
- name: Run Tests
60+
shell: bash -l {0}
61+
run: |
62+
export PATH=/usr/share/miniconda/bin:$PATH
63+
python setup.py test
64+
65+
- name: Save Test Results
66+
if: always()
67+
uses: actions/upload-artifact@v2
68+
with:
69+
name: unit-test-results-${{ matrix.os }}-${{ matrix.python-version }}
70+
path: pytest.xml
71+
72+
- name: Check Distribution
73+
shell: bash -l {0}
74+
run: |
75+
python setup.py sdist
76+
twine check dist/*
77+
78+
- name: Check API Documentation build
79+
shell: bash -l {0}
80+
run: |
81+
conda install -c conda-forge pandoc
82+
sphinx-apidoc -t docs/_templates -feTMo docs/source modopt
83+
sphinx-build -b doctest -E docs/source docs/_build
84+
85+
- name: Upload Coverage to Codecov
86+
uses: codecov/codecov-action@v1
87+
with:
88+
token: ${{ secrets.CODECOV_TOKEN }}
89+
file: coverage.xml
90+
flags: unittests
91+
92+
test-basic:
93+
name: Basic Test Suite
94+
runs-on: ${{ matrix.os }}
95+
96+
strategy:
97+
fail-fast: false
98+
matrix:
99+
os: [ubuntu-latest, macos-latest]
100+
python-version: [3.6, 3.7, 3.9]
101+
102+
steps:
103+
- name: Checkout
104+
uses: actions/checkout@v2
105+
106+
- name: Set up Conda with Python ${{ matrix.python-version }}
107+
uses: conda-incubator/setup-miniconda@v2
108+
with:
109+
auto-update-conda: true
110+
python-version: ${{ matrix.python-version }}
111+
auto-activate-base: false
112+
113+
- name: Install Dependencies
114+
shell: bash -l {0}
115+
run: |
116+
python --version
117+
python -m pip install --upgrade pip
118+
python -m pip install -r develop.txt
119+
python -m pip install astropy scikit-image scikit-learn
120+
python -m pip install .
121+
122+
- name: Run Tests
123+
shell: bash -l {0}
124+
run: |
125+
export PATH=/usr/share/miniconda/bin:$PATH
126+
python setup.py test

‎.gitignore‎

Lines changed: 135 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,142 @@
1-
# Ignore Python compilation
2-
*.pyc
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
35

4-
# Ignore scripts
5-
*.sh
6+
# C extensions
7+
*.so
68

7-
# Ignore cache
8-
*.cache/
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
934

10-
# Ignore coverage tests
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
1143
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
1251
.pytest_cache/
52+
cover/
53+
pytest.xml
1354

14-
# Ignore installation
15-
.eggs/
16-
modopt.egg-info/
17-
dist/
18-
build/
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
docs/_build/
74+
docs/source/fortuna.*
75+
docs/source/scripts.*
76+
docs/source/*.nblink
77+
78+
# PyBuilder
79+
.pybuilder/
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
# For a library or package, you might want to ignore these files since the code is
91+
# intended to run in multiple environments; otherwise, check them in:
92+
# .python-version
93+
94+
# pipenv
95+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
97+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
98+
# install all needed dependencies.
99+
#Pipfile.lock
100+
101+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
102+
__pypackages__/
103+
104+
# Celery stuff
105+
celerybeat-schedule
106+
celerybeat.pid
107+
108+
# SageMath parsed files
109+
*.sage.py
110+
111+
# Environments
112+
.env
113+
.venv
114+
env/
115+
venv/
116+
ENV/
117+
env.bak/
118+
venv.bak/
119+
120+
# Spyder project settings
121+
.spyderproject
122+
.spyproject
123+
124+
# Rope project settings
125+
.ropeproject
126+
127+
# mkdocs documentation
128+
/site
129+
130+
# mypy
131+
.mypy_cache/
132+
.dmypy.json
133+
dmypy.json
134+
135+
# Pyre type checker
136+
.pyre/
137+
138+
# pytype static type analyzer
139+
.pytype/
19140

20-
# Ignore pypi config
21-
.pypirc
141+
# Cython debug symbols
142+
cython_debug/

‎.pylintrc‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[MASTER]
2+
ignore-patterns=**/docs/**/*.py

‎.pyup.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# autogenerated pyup.io config file
2+
# see https://pyup.io/docs/configuration/ for all available options
3+
4+
schedule: ''
5+
update: all
6+
label_prs: update
7+
assignees: sfarrens
8+
requirements:
9+
- requirements.txt
10+
- develop.txt
11+
- docs/requirements.txt

0 commit comments

Comments
 (0)