Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
498 commits
Select commit Hold shift + click to select a range
14d0c8e
Have mypy ignore astropy package
kadri-nizam Feb 5, 2023
b0e8acc
Merge pull request #137 from kadri-nizam/new_dev
iancze Feb 6, 2023
8223316
change tests workflow trigger
jeffjennings Feb 6, 2023
5677547
change docs_build workflow trigger
jeffjennings Feb 6, 2023
38edec6
pre-release.yml: move linter after mpol install
jeffjennings Feb 6, 2023
34111dd
Merge branch 'main' into crossval_splitter
jeffjennings Feb 6, 2023
cc66a59
typo
jeffjennings Feb 6, 2023
0beb730
Type hint and simplify if-else in Dartboard init
kadri-nizam Feb 6, 2023
3ef5c32
Type hint Dartboard methods
kadri-nizam Feb 6, 2023
f074ba4
UVDataset type hinted and asserts converted
kadri-nizam Feb 6, 2023
f2a4958
Import numpy types directly for better readability
kadri-nizam Feb 6, 2023
0bff7f5
Simplify UVDataset init logic
kadri-nizam Feb 6, 2023
e4a38a3
GriddedDataset type hinted
kadri-nizam Feb 6, 2023
e710838
KFoldCrossValidatorGridded type hinted
kadri-nizam Feb 6, 2023
db59a7c
Merge pull request #138 from MPoL-dev/github_actions_forks
iancze Feb 6, 2023
60e869a
Merge pull request #139 from MPoL-dev/pre_release_workflow_reorder
iancze Feb 6, 2023
f61fd4d
Merge branch 'main' into geo
Feb 6, 2023
4c93b82
Merge branch 'MPoL-dev:main' into datasets_file
kadri-nizam Feb 6, 2023
ba500c8
Updated HD143006 docs with new init method
kadri-nizam Feb 6, 2023
a35bbab
Merge branch 'main' into crossval_splitter
jeffjennings Feb 6, 2023
b1f7988
apply main changes to moved dataset routines
jeffjennings Feb 6, 2023
4f2dc66
run_crossval: return mean and std of scores
jeffjennings Feb 6, 2023
38a50cd
Merge pull request #141 from kadri-nizam/datasets_file
kadri-nizam Feb 7, 2023
1d2623d
vis_histogram: rotate phi axes
jeffjennings Feb 7, 2023
1297ade
add torch2npy convenience utility
jeffjennings Feb 7, 2023
2e54406
vis_histogram: sensible color range
jeffjennings Feb 7, 2023
5a05c9b
vis_histogram: update args
jeffjennings Feb 7, 2023
f8bfcf5
vis_histogram: set hist weights from args
jeffjennings Feb 7, 2023
3518f82
Merge branch 'main' into uv_cell_hist
jeffjennings Feb 7, 2023
216e633
vis_histogram: copy data weight obj
jeffjennings Feb 7, 2023
575e9c2
plot.py: matplotlib doesn't have type hints
jeffjennings Feb 7, 2023
e5313de
add package-wide matplotlib mypy ignore
jeffjennings Feb 7, 2023
8254151
stricter workflow trigger events
jeffjennings Feb 7, 2023
161ed00
docs API: add mpol.plot
jeffjennings Feb 7, 2023
fb2dd04
Merge pull request #124 from MPoL-dev/uv_cell_hist
jeffjennings Feb 7, 2023
34d1934
Raise execption when notebook build fails.
iancze Feb 7, 2023
7eddf26
Merge pull request #144 from MPoL-dev/myst-build-flags
iancze Feb 7, 2023
29334bd
Merge branch 'main' into crossval_splitter
jeffjennings Feb 7, 2023
6e00ea1
propagate new Dartboard, KFold into crossval
jeffjennings Feb 7, 2023
3e7226f
crossval: change default arg
jeffjennings Feb 7, 2023
795a2a8
move Dartboard back to datasets.py
jeffjennings Feb 7, 2023
34e7dc2
rename KFoldCross... to DartboardSplitGridded
jeffjennings Feb 7, 2023
2455da3
move tests from datasets_test to crossval_test
jeffjennings Feb 7, 2023
c513f1d
update crossval test name
jeffjennings Feb 7, 2023
8875cd6
update crossval test args
jeffjennings Feb 7, 2023
318fea6
common_data: update import of DartboardSplit...
jeffjennings Feb 7, 2023
0a7648d
crossval tutorial: update import of DartboardSplit
jeffjennings Feb 7, 2023
66f3825
HD143006_pt2: update import of DartboardSplit...
jeffjennings Feb 7, 2023
c3c20b3
tests.yml: update activity types
jeffjennings Feb 7, 2023
f3b7ee6
docs_build.yml: update activity types
jeffjennings Feb 7, 2023
c70103c
Add crossval to API
jeffjennings Feb 9, 2023
0d3f247
crossval.py: add random cell split class
jeffjennings Feb 9, 2023
a63adb9
crossval.py: update imports
jeffjennings Feb 9, 2023
b431530
CrossValidate: update args
jeffjennings Feb 9, 2023
aa06b99
split_dataset: update supported methods
jeffjennings Feb 9, 2023
27c9f43
run_crossval: update args
jeffjennings Feb 9, 2023
62ea137
run_crossval: return dict
jeffjennings Feb 9, 2023
e64138c
run_crossval: accept either splitter
jeffjennings Feb 9, 2023
aa11463
run_crossval: GPU TODOs
jeffjennings Feb 9, 2023
0effac0
run_crossval: add diagnostics dict
jeffjennings Feb 9, 2023
1784ff1
add tests for new splitter class
jeffjennings Feb 9, 2023
7b848f0
update default params for crossval tests
jeffjennings Feb 9, 2023
ebe31d8
CrossValidate: remove old arg
jeffjennings Feb 9, 2023
80f0e43
DartboardSplitGridded: mysterious indent
jeffjennings Feb 9, 2023
85f01b3
crossval.py: add imports for type hint
jeffjennings Feb 9, 2023
5947598
crossval.py: import TODO
jeffjennings Feb 9, 2023
17933f7
TrainTest: add arg for compat with CrossValidate
jeffjennings Feb 9, 2023
0f411a9
GriddedDataset: torch warn fix
jeffjennings Feb 9, 2023
9460d76
plot.py: update imports
jeffjennings Feb 9, 2023
1396ce3
vis_histogram_fig: rename, update args
jeffjennings Feb 9, 2023
d90977d
vis_histogram_fig: convenience wrapper
jeffjennings Feb 9, 2023
be33fb1
add plotting routine to get colormap normalization
jeffjennings Feb 9, 2023
12428d1
add plotting routine for splitter diagnostics
jeffjennings Feb 9, 2023
205691e
add plotting routine for training diagnostics
jeffjennings Feb 9, 2023
8d3dd3c
speed up training tests
jeffjennings Feb 9, 2023
0d597d4
use training fig in TrainTest
jeffjennings Feb 9, 2023
57d0b16
use splitter fig in CrossValidate
jeffjennings Feb 9, 2023
300e736
check force PR tests
jeffjennings Feb 9, 2023
a506c7f
induce tests
jeffjennings Feb 9, 2023
17db0a6
induce tests
jeffjennings Feb 9, 2023
340ccf6
docs api: adding training.py
jeffjennings Feb 9, 2023
0d8e97f
Merge pull request #147 from MPoL-dev/api_add_training
jeffjennings Feb 9, 2023
39b42e0
crossval.py: new import
jeffjennings Feb 9, 2023
901d439
Merge pull request #121 from MPoL-dev/geo
jeffjennings Feb 9, 2023
30ad09b
Replace type check with direct Tensor call
kadri-nizam Feb 9, 2023
b217642
Merge pull request #132 from MPoL-dev/crossval_splitter
iancze Feb 9, 2023
7c9667f
Merge pull request #145 from MPoL-dev/pytorch_warn_fix
iancze Feb 9, 2023
855e8c7
Merge branch 'main' into plot_routines
jeffjennings Feb 9, 2023
6636d52
update cross-val docstrings
jeffjennings Feb 9, 2023
b1d904a
Fixed #137 doc errors
kadri-nizam Feb 9, 2023
b6d9b24
Merge pull request #149 from kadri-nizam/137_related_doc_error
iancze Feb 10, 2023
a32f97e
removed persistent buffer and fixed some typos.
iancze Feb 11, 2023
90319c1
Temporarily force execution of notebooks
kadri-nizam Feb 11, 2023
8bee203
Set nb execution mode back to cache
kadri-nizam Feb 11, 2023
4bd668a
Merge pull request #150 from MPoL-dev/fourier-state-dict
kadri-nizam Feb 11, 2023
72535e4
Merge branch 'main' into plot_routines
jeffjennings Feb 13, 2023
5055ab2
increased error tolerance to pass
iancze Feb 18, 2023
354bf4c
Merge pull request #155 from MPoL-dev/test-errors
iancze Feb 18, 2023
5aafb7d
first attempt at splitting classes.
iancze Feb 18, 2023
c42096c
first attempt at checking tests.
iancze Feb 18, 2023
740d766
removed more hermitian duplication in DataAverager.
iancze Feb 18, 2023
45e9e35
changes to conftest fixtures.
iancze Feb 18, 2023
21e7606
to DataAverager in export test.
iancze Feb 18, 2023
fdbb675
moved over DataAverage in gridding test.
iancze Feb 18, 2023
87e4775
first attempt to rename gridder -> averager or imager and then Gridde…
iancze Feb 19, 2023
3b9afac
fixed some issues but running into a problem with test_uniform_ones.
iancze Feb 19, 2023
cbb70a1
BUG fixed: mask needed fftshift axes specified.
iancze Feb 19, 2023
de1d0f3
got gridder tests passing.
iancze Feb 19, 2023
0fdfa2d
fixed init method checks/inheritance
iancze Feb 19, 2023
d4d4ce2
changed imager and averager instances in training routines.
iancze Feb 19, 2023
761ea22
fixed all pytest errors not stemming from GriddedResidualConnector
iancze Feb 19, 2023
61661c5
removed GriddedResidualConnector from crossvalidation.md
iancze Feb 19, 2023
1324b33
added residual production to tutorial.
iancze Feb 19, 2023
56fe908
removed GriddedResidualConnector from tutorials.
iancze Feb 19, 2023
a93fe92
tests now passing.
iancze Feb 19, 2023
d902788
train_diagnostics_fig: add grad image
jeffjennings Feb 20, 2023
4996ada
splitter_diagnostics_fig: remove dirty image
jeffjennings Feb 20, 2023
8ea668e
Update docs/ci-tutorials/crossvalidation.md
iancze Feb 20, 2023
d0a005d
Merge pull request #158 from MPoL-dev/briggs-residual
iancze Feb 20, 2023
91827c3
Merge branch 'main' into gridder-refactor
iancze Feb 20, 2023
30a161a
updates to tutorials.
iancze Feb 20, 2023
d140df0
docstring fixes.
iancze Feb 20, 2023
812465f
updates to ci tutorials.
iancze Feb 20, 2023
1e2ae17
updated large tutorials.
iancze Feb 20, 2023
fc30cb3
return type error.
iancze Feb 20, 2023
efdb9e4
Update docs/ci-tutorials/loose-visibilities.md
iancze Feb 21, 2023
8a0d6af
Update src/mpol/crossval.py
iancze Feb 21, 2023
eb12a5c
Update src/mpol/gridding.py
iancze Feb 21, 2023
82f3386
Merge pull request #156 from MPoL-dev/gridder-refactor
iancze Feb 21, 2023
fb84d3e
removed forward from most places
iancze Feb 21, 2023
6b1c8ec
updated tutorial 2 .ipy build
iancze Feb 21, 2023
2a40109
should ignore building already complete large-tutorials/*ipynb
iancze Feb 21, 2023
8837f77
Merge pull request #160 from MPoL-dev/forward
iancze Feb 21, 2023
f5328e0
train_diagnostics_fig: update docstring
jeffjennings Feb 21, 2023
2b60981
Merge branch 'main' into plot_routines
jeffjennings Feb 21, 2023
b5f3436
standardize split class args
jeffjennings Feb 21, 2023
d1d7152
remove training TODO
jeffjennings Feb 21, 2023
312bb6d
splitter_diagnostics_fig: update gridspec
jeffjennings Feb 21, 2023
da584d1
update name of split_diagnostics_fig
jeffjennings Feb 21, 2023
5ded8a3
run_crossval: add split diag fig to self
jeffjennings Feb 21, 2023
c666ea7
run_crossval: capture train_figure
jeffjennings Feb 21, 2023
ab4083e
fourier: add vis resid func
jeffjennings Feb 22, 2023
2913d27
TrainTest: add train_state dict
jeffjennings Feb 22, 2023
5dc942b
update fig savenames
jeffjennings Feb 22, 2023
0ec9c57
train_diagnostics_fig: update args
jeffjennings Feb 22, 2023
a4dce28
train_diagnostics_fig: add asinh model image
jeffjennings Feb 22, 2023
7c41bb4
train_diagnostics_fig: add fourier residsuals
jeffjennings Feb 22, 2023
a1abde7
train_diagnostics_fig: dirty image of vis resid
jeffjennings Feb 22, 2023
78dd758
train_diagnostics_fig: add loss func
jeffjennings Feb 22, 2023
7bcc503
train: prep addition of train figure
jeffjennings Feb 22, 2023
512ca46
TrainTest: update args
jeffjennings Feb 22, 2023
7f36977
CrossValidate: new default epochs, convergence_tol
jeffjennings Feb 22, 2023
7bd4a78
train: incorporate training diag figure
jeffjennings Feb 22, 2023
63df35f
train_diagnostics_fig: remove vis plots
jeffjennings Feb 22, 2023
3a718ae
train diag fig: clean up syntax, fig details
jeffjennings Feb 22, 2023
86bbf66
TrainTest: remove TODO
jeffjennings Feb 22, 2023
bd3c351
split_diagnostics_fig: axis labels
jeffjennings Feb 22, 2023
e55fd2c
crossvaL_test: add test to make split diag fig
jeffjennings Feb 22, 2023
7c3d73d
train_test_test: add test to make train diag fig
jeffjennings Feb 22, 2023
f5dbfa6
Merge pull request #146 from MPoL-dev/plot_routines
jeffjennings Feb 22, 2023
9b0be2d
CrossValidate: cv_diagnostics --> diagnostics
jeffjennings Feb 22, 2023
e6be9e6
CrossValidate: add model to self
jeffjennings Feb 22, 2023
d8c9450
CrossVal: replace indiv. args w/ 'regularizers'
jeffjennings Feb 22, 2023
257d9e2
TrainTest: replace indiv. args w/ 'regularizers'
jeffjennings Feb 22, 2023
f99599e
loss_lambda_guess: use 'regularizers'
jeffjennings Feb 22, 2023
337c297
loss_eval: use 'regularizers'
jeffjennings Feb 22, 2023
19fb53e
train: use 'regularizers'
jeffjennings Feb 22, 2023
1730632
CrossValidate: remove 'lambda_guess_briggs' arg
jeffjennings Feb 22, 2023
fc8f90e
TrainTest: remove 'lambda_guess_briggs' arg
jeffjennings Feb 22, 2023
b7b7c4c
TrainTest: make 'regularizers' @property
jeffjennings Feb 22, 2023
ad7a847
CrossValdate: update regularizers from trainer
jeffjennings Feb 22, 2023
7fc9b15
conftest: update default pars with regularizers
jeffjennings Feb 22, 2023
45f0603
update training tests to user 'regularizers'
jeffjennings Feb 23, 2023
4d58e2d
update regularizers used in tests
jeffjennings Feb 23, 2023
8032696
loss_lambda_guess: store floats
jeffjennings Feb 23, 2023
2fd2c10
CrossValidate: add property decorators
jeffjennings Feb 23, 2023
eecee5a
update crossval tests to use 'regularizers'
jeffjennings Feb 23, 2023
fed638f
training: remove unused imports
jeffjennings Feb 23, 2023
8a13621
conftest: update default train_pars
jeffjennings Feb 23, 2023
e3287a0
crossval_test: use imager, not averager
jeffjennings Feb 23, 2023
dd9fded
Merge pull request #165 from MPoL-dev/crossval_hyperpar_handling
iancze Feb 23, 2023
1a2b87c
split_diagnostics_fig: change presentation
jeffjennings Feb 28, 2023
5331457
Default device is set to none
kadri-nizam Feb 28, 2023
3d91ad7
Merge pull request #170 from kadri-nizam/#133-default_device
iancze Feb 28, 2023
0cd0042
Merge pull request #169 from MPoL-dev/split_plot_tweak
jeffjennings Mar 4, 2023
274bb69
Implement faster histogram
kadri-nizam Mar 4, 2023
509f323
Merge branch 'MPoL-dev:main' into faster-histograms
kadri-nizam Mar 4, 2023
1a1b042
Remove reshape call in favour of indexing
kadri-nizam Mar 4, 2023
c8a8dac
Mypy ignore type checking fast-histogram
kadri-nizam Mar 4, 2023
fad39a8
Made bin range choice clearer
kadri-nizam Mar 4, 2023
801cacc
Merge pull request #171 from kadri-nizam/faster-histograms
iancze Mar 5, 2023
024db57
added jupyter notebook stub.
iancze Mar 13, 2023
c80fd3f
drafted pyro notebook.
Mar 13, 2023
70dabe6
mermaid diagrams draft.
iancze Mar 13, 2023
6ef516c
get_optimal_image_properties: take in u,v -- not q
jeffjennings Mar 13, 2023
ae89ee0
get_optimal_image_properties: take in u,v -- not q
jeffjennings Mar 13, 2023
8f2bcf8
add test for get_optimal_image_properties
jeffjennings Mar 13, 2023
c4a7cd0
add plot_image wrapper func
jeffjennings Mar 13, 2023
aab7365
def train_diagnostics_fig using plot_image
jeffjennings Mar 13, 2023
b710ff4
plot_image: missing docstring entry
jeffjennings Mar 13, 2023
7a8b87f
train_diagnostics_fig: calls to plot_image
jeffjennings Mar 13, 2023
f57fee8
train_diagnostics_fig: axis titles
jeffjennings Mar 13, 2023
4dd7cb5
redundant titles
jeffjennings Mar 13, 2023
192c859
more text about PPL and links.
iancze Mar 14, 2023
21f4818
added more file dl text
Mar 14, 2023
ccf4d1e
added predictive tests to tutorial.
Mar 14, 2023
ca9e75c
built ipynb
iancze Mar 14, 2023
207bbb4
added optimization and loss rate. Still need to tune a bit.
Mar 15, 2023
1a11f95
updated ipynb
iancze Mar 15, 2023
9f0fa47
plot_image: default x-, y-labels
jeffjennings Mar 19, 2023
873af84
Merge pull request #176 from MPoL-dev/plot_image_wrapper
jeffjennings Mar 19, 2023
c79e169
Merge pull request #175 from MPoL-dev/optimal_image_properties
jeffjennings Mar 19, 2023
c09306d
some debugging statements.
Mar 21, 2023
409533a
updated tutorial
Mar 21, 2023
2fc1331
update build.
Mar 21, 2023
018062b
updated iterations print, notes about multi diag.
Mar 21, 2023
ece5402
rebuilt ipbn
Mar 21, 2023
f30b29e
updated with time.
Mar 21, 2023
275e13f
udptade ipynb
Mar 21, 2023
4ad59e2
updated build w/ lower learning rate.
Mar 21, 2023
ec183db
Merge branch 'main' into pyro-tutorial
iancze Mar 22, 2023
7931fdc
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
62c423a
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
886bad2
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
62257a8
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
cf3633e
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
87c066f
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
09c01b8
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
4d38055
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
ce720ff
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
08e4377
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
b74b497
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
d328e81
Update docs/large-tutorials/pyro.md
iancze Mar 23, 2023
c1290f2
older versions of mermaid seem to not build.
Mar 23, 2023
3913596
Merge branch 'pyro-tutorial' of https://github.com/MPoL-dev/MPoL into…
Mar 23, 2023
b07162e
addressed Jeff's comments and updated ipynb.
Mar 23, 2023
c700004
Merge pull request #173 from MPoL-dev/pyro-tutorial
iancze Mar 23, 2023
3d1de04
Added obscured_airy_disk() function and added PBCorrectedCube to Simp…
kdesoto-astro Oct 27, 2022
5551ff6
Modified gridding checks to include optional frequency array.
kdesoto-astro Nov 26, 2022
ad3653a
Added class attribute chan_freq, changed naming to better differentia…
kdesoto-astro Nov 26, 2022
d3852b2
Set up framework for PrimaryBeamCube and dish types
kdesoto-astro Nov 27, 2022
2006878
First attempt at both versions of primary beam corrections implemented
kdesoto-astro Nov 27, 2022
5eb95ee
Fixed typo in diameter to wavelength ratio calculation
kdesoto-astro Nov 27, 2022
02651fb
Fixed miscellaneous errors, including missing arcsec to radian conver…
kdesoto-astro Nov 28, 2022
b7d9a78
Normed factor IS 1 for the uniform case, no need to calculate it
kdesoto-astro Nov 30, 2022
5a7d7f0
Rebase + removed _setup_coords function for PrimaryBeamCorrected
kdesoto-astro Mar 23, 2023
aa8eb55
Resolving merge conflicts
kdesoto-astro Mar 23, 2023
503acd3
Removed last merge conflict from gridding
kdesoto-astro Mar 23, 2023
cf042b8
Removed duplicated PrimaryBeamCube class
kdesoto-astro Mar 23, 2023
45639dd
Small typo in gridding.py
kdesoto-astro Mar 23, 2023
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
57 changes: 57 additions & 0 deletions .github/workflows/docs_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: docs test

# Run this workflow when a review is requested on a PR that targets the main
# branch, or the PR is closed
on:
pull_request:
types: [review_requested, closed]
pull_request_target:
types: [review_requested, closed]

# Prevent multiple PRs from building/deploying the docs at the same time
concurrency:
group: ${{ github.workflow }}

# test that the docs build
# (but don't deploy to gh-pages)
jobs:
build_docs:
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# cache the Python environment, including installed dependencies
# (speeds up tests more than caching pip cache)
- name: Cache/Restore the Python env
uses: actions/cache@v3
env:
cache-name: cache-python${{ matrix.python-version }}-env
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
- name: Install doc dependencies
run: |
pip install .[docs]
- name: Install Pandoc dependency
run: |
sudo apt-get install pandoc
- name: Cache/Restore the .mpol folder cache
uses: actions/cache@v3
env:
cache-name: cache-mpol-dls
with:
# files are stored in .mpol
path: ~/.mpol
# the "key" is the hash of the download script
key: ${{ hashFiles('docs/download_external_files.py') }}
- name: Build the docs
run: |
make -C docs clean
make -C docs html
12 changes: 6 additions & 6 deletions .github/workflows/gh_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.8'
- name: Install doc deps
run: |
pip install .[docs]
pip install .'[docs]'
- name: Install Pandoc dependency
run: |
sudo apt-get install pandoc
Expand All @@ -26,7 +26,7 @@ jobs:
run: |
npm install @mermaid-js/mermaid-cli
- name: Cache/Restore the .mpol folder cache
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-mpol-dls
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
Expand All @@ -27,7 +27,7 @@ jobs:
run: |
python -m pep517.build --source --binary --out-dir dist/ .
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
30 changes: 15 additions & 15 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ on:

jobs:
dl_files:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install package deps
run: |
pip install .[dev]
- name: Cache/Restore the .mpol folder cache
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-mpol-dls
with:
Expand All @@ -37,32 +37,32 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-20.04, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
- name: Install vanilla package
run: |
pip install .
- name: Install test deps
run: |
pip install .[test]
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install vanilla package
run: |
pip install .
- name: Install test deps
run: |
pip install .[test]
- name: Cache/Restore the .mpol folder cache
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-mpol-dls
with:
Expand Down
90 changes: 34 additions & 56 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name: package test and docs test
name: package test

on: [push, pull_request]
on:
pull_request_target:
types: [opened, synchronize, reopened]
push:

jobs:
dl_files:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install package deps
- name: Install dependencies needed to download files
run: |
pip install .[dev]
pip install astropy
- name: Cache/Restore the .mpol folder cache
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-mpol-dls
with:
Expand All @@ -29,35 +32,47 @@ jobs:

tests:
needs: dl_files # don't bother running if we didn't succeed getting the files
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
# cache the Python environment, including installed dependencies
# (unique to each python-version; speeds up tests more than caching pip cache)
- name: Cache/Restore the Python env
uses: actions/cache@v3
env:
cache-name: cache-python${{ matrix.python-version }}-env
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
- name: Install pip
run: |
pip install --upgrade pip
- name: Install vanilla package
run: |
pip install .
- name: Install test dependencies
run: |
pip install .[test]
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install vanilla package
run: |
pip install .
- name: Install test deps
- name: Check types with MyPy
run: |
pip install .[test]
mypy src/mpol --pretty
- name: Cache/Restore the .mpol folder cache
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-mpol-dls
with:
Expand All @@ -68,40 +83,3 @@ jobs:
- name: Run tests with coverage
run: |
pytest --cov=mpol

# if all tests succeed, then
# make sure the docs build OK
# (but don't deploy to gh-pages)
docs:
needs: tests # don't bother running if a test failed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install doc deps
run: |
pip install .[docs]
- name: Install Pandoc dependency
run: |
sudo apt-get install pandoc
- name: Set up node
uses: actions/setup-node@v2
- name: Install mermaid.js dependency
run: |
npm install @mermaid-js/mermaid-cli
- name: Cache/Restore the .mpol folder cache
uses: actions/cache@v2
env:
cache-name: cache-mpol-dls
with:
# files are stored in .mpol
path: ~/.mpol
# the "key" is the hash of the download script
key: ${{ hashFiles('docs/download_external_files.py') }}
- name: Build the docs
run: |
make -C docs clean
make -C docs html MERMAID_PATH="../node_modules/.bin/"
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ venv/
# notebooks produced from jupytext
docs/ci-tutorials/*.ipynb

docs/ci-tutorials/alma.jpg
docs/ci-tutorials/mock_data.npz


# tensorboard outputs
docs/ci-tutorials/runs
docs/large-tutorials/runs
Expand All @@ -134,3 +138,6 @@ dirty_image_model.pt

# setup file
project_setup.sh

plotsdir
runs
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -12,11 +12,11 @@ repos:
- id: detect-private-key
- id: name-tests-test
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.1.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.8.0
rev: 5.12.0
hooks:
- id: isort
args: []
Expand Down
16 changes: 3 additions & 13 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
Expand All @@ -15,18 +14,14 @@ help:
.PHONY: help Makefile html clean

CI-NOTEBOOKS := ci-tutorials/PyTorch.ipynb ci-tutorials/gridder.ipynb ci-tutorials/optimization.ipynb ci-tutorials/crossvalidation.ipynb ci-tutorials/initializedirtyimage.ipynb
CHARTS := _static/mmd/build/SimpleNet.svg _static/mmd/build/ImageCube.svg _static/mmd/build/BaseCube.svg _static/mmd/build/SkyModel.svg
clean:
rm -rf _build
rm -rf ${CI-NOTEBOOKS}
rm -rf ci-tutorials/.ipynb_checkpoints
rm -rf ci-tutorials/runs
rm -rf ${CHARTS}
rm -rf ci-tutorials/alma.jpg
rm -rf ci-tutorials/mock_data.npz
rm -rf _static/baselines/build/baselines.csv

ci-tutorials/%.ipynb: ci-tutorials/%.py ${CHARTS}
jupytext --to ipynb --execute $<

# baseline table
_static/baselines/build/baselines.csv: _static/baselines/src/print_conversions.py
mkdir -p _static/baselines/build
Expand All @@ -37,10 +32,5 @@ _static/fftshift/build/plot.png: _static/fftshift/src/plot.py
mkdir -p _static/fftshift/build
python _static/fftshift/src/plot.py $@

# mermaid.js files
_static/mmd/build/%.svg: _static/mmd/src/%.mmd
mkdir -p _static/mmd/build
${MERMAID_PATH}mmdc -i $^ -o $@

html: ${CI-NOTEBOOKS} ${CHARTS} _static/baselines/build/baselines.csv _static/fftshift/build/plot.png
html: _static/baselines/build/baselines.csv _static/fftshift/build/plot.png
python -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
5 changes: 5 additions & 0 deletions docs/_static/mmd/src/Parametric.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
graph TD
pm(DiskModel) --> ImageCube
ImageCube --> FourierLayer
FourierLayer --> il([Loss])
ad[[Dataset]] --> il([Loss])
Loading