Skip to content
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

Use DevOps shared github runners #226

Merged
merged 16 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions .github/workflows/minimumdependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Minimum Dependencies
# Installs the minimum versions of the dependencies and runs the tests.
# This test will lower the chance that users botch their installation by
# only upgrading this project but not the dependencies.

on:
push:
branches:
- master
- dev_master
- dev_spectroscopy
pull_request:
branches:
- master
- dev_master
- dev_spectroscopy

# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:

schedule:
- # Run every day at 5:00 UTC.
- cron: "0 5 * * *"

jobs:
call-minimum-dependencies:
uses: AstarVienna/DevOps/.github/workflows/minimumdependencies.yml@master
28 changes: 2 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,5 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Install this version of ScopeSim. Otherwise the PyPI version of
# ScopeSim will be installed when the test-requriments
# are installed, because ScopeSim is a dependency of
# ScopeSim_Templates.
pip install .
pip install .[dev,test]
- name: Run Pytest
run: pytest --cov=scopesim
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
call-tests:
uses: AstarVienna/DevOps/.github/workflows/tests.yml@master
28 changes: 17 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ classifiers=[
"Topic :: Scientific/Engineering :: Astronomy",
]
dependencies = [
"numpy>=1.16",
"scipy>=1.0.0",
"astropy>=2.0",
"matplotlib>=1.5",
"numpy>=1.19",
"scipy>=1.4.0",
"astropy>=5.0",
"matplotlib>=3.2.0",

"docutils",
"requests>=2.20",
"docutils>=0.15",
"requests>=2.28.2",
"beautifulsoup4>=4.4",
"lxml",
"lxml>=4.5.0",
"pyyaml>5.1",
"more-itertools>=9.0",
"tqdm>=4.64",
"requests-cache>1.0",

"synphot>=0.1.3",
"synphot>=1.1.0",
"skycalc_ipy>=0.1.3",
"anisocado",
"anisocado>=0.2.3",
]

[project.optional-dependencies]
Expand All @@ -45,9 +45,9 @@ dev = [
"jupytext",
]
test = [
"pytest",
"pytest>=5.0.0",
"pytest-cov",
"scopesim_templates",
"scopesim_templates>=0.4.4",
# Just so that readthedocs doesn't include the tests module - yes it's hacky
"skycalc_cli",
]
Expand All @@ -67,3 +67,9 @@ docs = [

[tool.setuptools.packages]
find = {}

[tool.pytest.ini_options]
addopts = "--strict-markers"
markers = [
"webtest: marks tests as requiring network (deselect with '-m \"not webtest\"')",
]
244 changes: 244 additions & 0 deletions scopesim/tests/mocks/test_package/TC_filter_Ks.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
# name : Ks filter curve
# author : unknown
# date_created : 2018-11-09
# date_modified : 2018-01-28
# sources : HAWK-I_Ks, SVO Filter service
# wavelength_unit : um
# changes :
# - 2019-11-09 (KL) Added to the test package
#
wavelength transmission
1.9244 0.004092
1.9264 0.004719
1.9284 0.005363
1.9303 0.005971
1.9323 0.006650
1.9343 0.007400
1.9363 0.008185
1.9383 0.009123
1.9403 0.010084
1.9423 0.011361
1.9443 0.012872
1.9463 0.014803
1.9482 0.016989
1.9502 0.019718
1.9522 0.023170
1.9542 0.027843
1.9562 0.033511
1.9582 0.040535
1.9602 0.049724
1.9622 0.061381
1.9641 0.076299
1.9661 0.095620
1.9681 0.119920
1.9701 0.151441
1.9721 0.188898
1.9741 0.233436
1.9761 0.283781
1.9781 0.335879
1.9800 0.387428
1.9820 0.436250
1.9840 0.480822
1.9860 0.515266
1.9880 0.544181
1.9900 0.567621
1.9920 0.587735
1.9940 0.605451
1.9960 0.622213
1.9979 0.639393
1.9999 0.655671
2.0019 0.672747
2.0039 0.690064
2.0059 0.705886
2.0079 0.721667
2.0099 0.735400
2.0119 0.747657
2.0138 0.757275
2.0158 0.764611
2.0178 0.770151
2.0198 0.772692
2.0218 0.774471
2.0238 0.774904
2.0258 0.773802
2.0278 0.772770
2.0297 0.771374
2.0317 0.770816
2.0337 0.769840
2.0357 0.769821
2.0377 0.770729
2.0397 0.772116
2.0417 0.774129
2.0437 0.777027
2.0457 0.779965
2.0476 0.783401
2.0496 0.786676
2.0516 0.790208
2.0536 0.793924
2.0556 0.796736
2.0576 0.799705
2.0596 0.801859
2.0616 0.803399
2.0635 0.805139
2.0655 0.805537
2.0675 0.805883
2.0695 0.806335
2.0715 0.805885
2.0735 0.805576
2.0755 0.805038
2.0775 0.804727
2.0794 0.804133
2.0814 0.803998
2.0834 0.804295
2.0854 0.804219
2.0874 0.805041
2.0894 0.805836
2.0914 0.806782
2.0934 0.808434
2.0954 0.809909
2.0973 0.811714
2.0993 0.813773
2.1013 0.815366
2.1033 0.817463
2.1053 0.819240
2.1073 0.820868
2.1093 0.822257
2.1113 0.823537
2.1132 0.824653
2.1152 0.825138
2.1172 0.825841
2.1192 0.826139
2.1212 0.825767
2.1232 0.825670
2.1252 0.825048
2.1272 0.824093
2.1291 0.823366
2.1311 0.822455
2.1331 0.821660
2.1351 0.820357
2.1371 0.819444
2.1391 0.818331
2.1411 0.817576
2.1431 0.816831
2.1451 0.816213
2.1470 0.815788
2.1490 0.815617
2.1510 0.815571
2.1530 0.816045
2.1550 0.816148
2.1570 0.816919
2.1590 0.817598
2.1610 0.818230
2.1629 0.819752
2.1649 0.820894
2.1669 0.822492
2.1689 0.823297
2.1709 0.825110
2.1729 0.826640
2.1749 0.827869
2.1769 0.829224
2.1788 0.830143
2.1808 0.831485
2.1828 0.832080
2.1848 0.832791
2.1868 0.833866
2.1888 0.834211
2.1908 0.834641
2.1928 0.835547
2.1948 0.835783
2.1967 0.836970
2.1987 0.836947
2.2007 0.838148
2.2027 0.838697
2.2047 0.839203
2.2067 0.839969
2.2087 0.840589
2.2107 0.841150
2.2126 0.841549
2.2146 0.841638
2.2166 0.842445
2.2186 0.842636
2.2206 0.843223
2.2226 0.843759
2.2246 0.843869
2.2266 0.844823
2.2285 0.844729
2.2305 0.845598
2.2325 0.846154
2.2345 0.846594
2.2365 0.847138
2.2385 0.847915
2.2405 0.848186
2.2425 0.848552
2.2445 0.848987
2.2464 0.849377
2.2484 0.849617
2.2504 0.849636
2.2524 0.849992
2.2544 0.849781
2.2564 0.849623
2.2584 0.849220
2.2604 0.849069
2.2623 0.848822
2.2643 0.847899
2.2663 0.847239
2.2683 0.846086
2.2703 0.844456
2.2723 0.842642
2.2743 0.840222
2.2763 0.836502
2.2782 0.832160
2.2802 0.824891
2.2822 0.816848
2.2842 0.805276
2.2862 0.790971
2.2882 0.772614
2.2902 0.750201
2.2922 0.723509
2.2942 0.692577
2.2961 0.655112
2.2981 0.613860
2.3001 0.570899
2.3021 0.526108
2.3041 0.479929
2.3061 0.434709
2.3081 0.389649
2.3101 0.346600
2.3120 0.305818
2.3140 0.269378
2.3160 0.236474
2.3180 0.206357
2.3200 0.180523
2.3220 0.157756
2.3240 0.138264
2.3260 0.121272
2.3279 0.105898
2.3299 0.092828
2.3319 0.081272
2.3339 0.071141
2.3359 0.062715
2.3379 0.054966
2.3399 0.048328
2.3419 0.042917
2.3439 0.038122
2.3458 0.033789
2.3478 0.030085
2.3498 0.026816
2.3518 0.024026
2.3538 0.021635
2.3558 0.019397
2.3578 0.017481
2.3598 0.015782
2.3617 0.014202
2.3637 0.012930
2.3657 0.011737
2.3677 0.010634
2.3697 0.009654
2.3717 0.008782
2.3737 0.008009
2.3757 0.007305
2.3776 0.006740
2.3796 0.006113
2.3816 0.005585
2.3836 0.005160
2.3856 0.004714
2.3876 0.004274
27 changes: 27 additions & 0 deletions scopesim/tests/mocks/test_package/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Instrument
object : observation
alias : OBS
name : test_instrument

packages :
- test_package

yamls :
- test_package.yaml
- test_telescope.yaml
- test_instrument.yaml
- test_detector.yaml

properties :
airmass : 1.
modes : ["mode_1", "mode_2"]

mode_yamls :
- name : mode_1
alias: OBS
properties :
airmass : 2.

- name : mode_2
yamls :
- test_mode_2.yaml
Loading