-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update unit tests for the new code installed via setup.py #259
Merged
Merged
Changes from 21 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
5a4af93
Update simple tests that basically already work
rmjarvis 6a2cbf3
Add get_logger
rmjarvis 0029380
Add FWHMgeom and FWHMeff to OpsimMetaDict
rmjarvis 21438e7
Update cosmic_rays tests
rmjarvis 2751280
Update PSF tests
rmjarvis 9cc000c
Update treering tests
rmjarvis 7739ec3
Update trimmer tests
rmjarvis 7839c76
Cache get_camera returns to avoid multiple loads of the LsstCam object
rmjarvis f71562d
Update instcat tests
rmjarvis 79dc5cf
Add seds needed for tests in local test_sed_library directory
rmjarvis 962b26b
Make object_is_valid check optional
rmjarvis f39de93
Fix psf tests that I apparently only half finished
rmjarvis baba218
Don't use LsstCamMapper in batoid unit tests
rmjarvis acf11a2
First try at ci.yml
rmjarvis 5bc4993
forgot pipe
rmjarvis 879f5ee
Add .condarc file
rmjarvis ffd453b
add conda_requirements.txt
rmjarvis 4e4f6e6
Use bash -l {0} for shell
rmjarvis 32759b8
Switch to mamba for faster build
rmjarvis 2ceb4f8
Minor typos
rmjarvis 462176c
Switch to pip install . and pytest to be more modern
rmjarvis 704f4a1
Remove test_logging.py as no longer relevant
rmjarvis 3ad40e7
Remove test_config_reader.py
rmjarvis 2b82b10
Remove test_TracebackDecorator.py
rmjarvis ca50b23
Resolve question about TAI time and put note in doc string.
rmjarvis 4374bc6
Treat dust=none as Av=0, Rv=1, not skipped. Closes #213
rmjarvis f61f35f
Remove chunking test
rmjarvis 0c559a1
Remove extra_commands stuff in tests
rmjarvis 9a0fbc0
Resolve comment about nsnap=2
rmjarvis 0dcabea
Exclude Latiss from valid cameras
rmjarvis fe4cac6
Add tests of actual separation in spherical geom in WCS tests
rmjarvis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: imSim CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- releases/* | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
- releases/* | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
# For now, just ubuntu, 3.8. Can add more later. | ||
os: [ ubuntu-latest ] | ||
py: [ 3.8 ] | ||
CC: [ gcc ] | ||
CXX: [ g++ ] | ||
|
||
defaults: | ||
run: | ||
# cf. https://github.com/conda-incubator/setup-miniconda#important | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup conda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: stack | ||
python-version: 3.8 | ||
condarc-file: etc/.condarc | ||
|
||
- name: Install conda deps | ||
run: | | ||
conda info | ||
conda list | ||
conda install -y mamba | ||
mamba install -y --file conda_requirements.txt | ||
conda info | ||
conda list | ||
|
||
- name: Install pip deps | ||
run: | | ||
# We need to get batoid onto conda, but for now, this is a separate step. | ||
pip install batoid | ||
conda info | ||
conda list | ||
|
||
- name: Install imSim | ||
run: | ||
pip install . | ||
|
||
- name: Install test deps | ||
run: | ||
conda install -y pytest nose | ||
|
||
- name: Run tests | ||
run: | | ||
cd tests | ||
# We're working towards getting all the tests working, but so far these are | ||
# the ones that work withe the pip installation. | ||
pytest test_FWHMgeom.py test_atmPSF.py test_batoid_wcs.py test_cosmic_rays.py test_fopen.py test_instcat_parser.py test_logging.py test_optical_zernikes.py test_psf.py test_tree_rings.py test_trimmer.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# conda install --file conda_requirements should install all required dependencies of imSim. | ||
|
||
stackvana>=0.2021.30 | ||
galsim>=2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
channels: | ||
- conda-forge | ||
- defaults | ||
ssl_verify: true | ||
channel_priority: strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
from .batoid_wcs import * | ||
from .bleed_trails import * | ||
from .cosmic_rays import * | ||
from .util import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the rubin_sim code assumes that times are TAI by default: https://github.com/lsst/rubin_sim/blob/ad16f12bb4e5cc4ef143c6db439de6b51d10cb10/rubin_sim/utils/ObservationMetaData.py#L39