Skip to content

Commit

Permalink
Merge pull request #169 from COINtoolbox/master
Browse files Browse the repository at this point in the history
update branch
  • Loading branch information
emilleishida authored Feb 7, 2024
2 parents 39fb31c + b7955ac commit 3c59939
Show file tree
Hide file tree
Showing 55 changed files with 858 additions and 22,926 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run end-to-end tests

on:
pull_request:
push:
workflow_dispatch:
schedule:
# Run every Sunday at 04:53 UTC
- cron: 53 4 * * 0

jobs:
tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install package inside virtual environment
run: |
python3.8 -m venv venv
source venv/bin/activate
python -m pip install -U pip setuptools
python -m pip install .
- name: Run pipeline for SNPCC
run: |
source venv/bin/activate
./tests/run-snpcc-e2e.sh
40 changes: 3 additions & 37 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,13 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]

steps:
- uses: actions/checkout@v2

- name: Cache conda packages and test files
uses: actions/cache@v2
env:
# Increase this value to reset cache
CACHE_NUMBER: 0
- uses: actions/setup-python@v4
with:
path: |
~/conda_pkgs_dir
~/resspect_tests
key: ${{ runner.os }}-${{ env.CACHE_NUMBER }}

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
channels: http://ssb.stsci.edu/astroconda
channel-priority: disabled
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
- name: Install packages
shell: bash -l {0}
run: python -m pip install tox tox-conda

- name: Setup RESSPECT_TEST
shell: bash -l {0}
run: echo "RESSPECT_TEST=~/resspect_tests" >> $GITHUB_ENV
python-version: 3.8

- name: Run Tox
shell: bash -l {0}
run: |
tox -e py37-unit -v
run: pipx run tox -e py38 -v
13 changes: 13 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: "requirements.txt"
29 changes: 29 additions & 0 deletions data/tests/Bazin.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
id,redshift,type,code,orig_sample,gA,gB,gt0,gtfall,gtrise,rA,rB,rt0,rtfall,rtrise,iA,iB,it0,itfall,itrise,zA,zB,zt0,ztfall,ztrise
811655,0.1631,Ia,0,train,1112.9024292192232,23.246594709176108,-25.979159554750492,12.030106794407551,0.25841102904638313,2183.0494514644292,38.33061767309974,-29.999999997077044,18.518699684320918,18.518699682648364,681.0510605367533,49.44307688530833,-2.128688381188217,15.236382915551253,5.850490513425097,507.1616670377183,39.93513113643545,0.04515547111291113,17.815129133043282,5.974920861174946
811244,0.5709,II,41,test,50480.937144489086,0.9177429920052435,79.65698993309685,0.1661599962414031,0.006308632927513845,6.469055608741274,2.452232503697866,16.766632001042094,0.17827357846335956,0.1782735784633588,36652.30878255906,6.312531875349326,50.36537046634493,0.07161057723615692,0.006279919656731042,16.871359516754413,-0.5374479741354536,39.70232598979942,33.93452371767789,15.406140788085745
811041,0.6335,II,32,test,24.260495950650856,0.2260182950679419,36.576019633072086,17.19180711990508,0.020150070031003192,27.426399244868925,-0.015699518862628936,44.70430847399331,29.804846270037768,1.6171948650956365,16.059746013684034,-0.06654598499958485,39.64959096340825,73.00200920841729,0.06487575320342075,20.529208807764398,0.10787537626173184,43.84120191419671,63.083396856078096,3.649450103509142
811007,0.5994,II,19,test,60.65623876310663,-1.0873841035133696,-56.517999993981725,31.09471307425025,31.094713066164182,19.018413673785258,-0.9728712677404106,-0.7662175325530198,40.03104565447872,1.4884198126653225,5.231756788204939,5.958930571249209,33.4364115083488,0.3720445307495475,0.3720445307495472,9.757310861207145,5.2423436734568325,12.516428493157347,52.1543600055607,0.38304629869531587
811115,0.678,II,38,test,113.58972478378516,-0.3733013393044611,50.97071316450278,0.7855196934216879,0.003045460389847142,127.1090411991678,0.6605394902193813,-28.08878426676114,13.766627633643413,0.44053707957673705,17.176384588530397,4.609058218172067,44.95814694889474,0.2945377645922932,0.0005965954371170118,4200.852113680489,-2093.5460235594974,91.09906235007135,22543.17680792205,22542.853860219235
811390,1.0121,Ia,0,test,23.762122945778447,-1.1489931585843356,6.974503957842363,2.7947196660448057,0.0005934627795868044,23.041431501785905,0.4161668155515826,60.0977971505989,23.11784349745136,2.954465903449279,59.03947017105216,-1.4301764909947912,64.00717633432818,28.86632459217004,7.002647340370184,63.7146828196738,-1.3685333728744689,74.431177888267,25.111802798092366,8.625106785365212
811877,0.5083,II,20,test,48.07464184154864,0.32820544663553863,40.775338107663686,26.66803446254648,5.254529149494,34.892253063183325,0.21496331337601216,36.15059250076548,91.58980927612448,3.711453965419972,79.1583585604935,11.489525160425915,-54.75662792302548,0.8872823693103433,4.709368182531024e-05,62.77465952880055,-26.387738762710445,18.32781791097013,242.18404786853895,17.397735182220742
811249,1.0222,Ia,0,test,4.823300961928659,-1.4491088748967311,85.87878512800604,20.868299164892356,0.008017450255182391,7.758915255395452,-0.3511544474055463,58.118786232187425,44.21199117276768,2.030730008287409,46.657502834944914,-2.3482005814964486,67.29086355278098,25.842582767655504,8.336264373578825,61.62692544136547,-1.3436975385798628,75.7716020604355,17.8119351604985,7.380713970651467
811771,0.365,II,41,test,28.15021989780634,-0.5134975539034582,39.12801027738808,17.7347221599886,3.7187824514813355,21.067552991050757,0.04500812112398245,35.01630187941881,90.61706936217682,2.480737191835797,18.49307900548313,1.2220410563427215,45.32668945853211,101.05371446466941,4.702266403332603,28.786960947970684,1.643507296348507,43.882447615643905,203.73626167670335,7.179045797572387
811385,1.0685,II,30,test,73.20373359574916,0.7777621163890701,117.08016346173287,2.4392912134643523,0.06269912866198361,31.347792614202934,1.5117025620536366,57.91550637872851,52.67118136292266,3.6992081020901337,28.159225058692346,0.7433611852044264,64.93967528933769,107.8923834078002,7.362027176369704,309.55573100981087,-190.69383879775944,-70.93670343104512,807.6707253098124,104.83770333732747
811264,0.2587,Ibc,29,train,160.96575631765828,-0.012212634072634527,37.35357692183875,16.84171811509053,4.79303236729807,120.2624611272291,-0.7880565184706649,37.69242606387094,35.065451975774145,4.279094807358085,173.90652202027093,0.1855469764234043,39.21173158627625,43.891616822717694,5.12698279962305,228.29779526723104,2.7541444593675806,45.13652440607945,35.2484581126728,6.380130708535198
811428,0.8784,II,2,test,48.16783602182394,-1.5973437352469773,46.18168122739891,26.130320848866987,0.5262630279449982,36.95335956228178,-1.9162924252752112,42.94848078123115,74.81200647444001,1.2887738899001677,31.71178800507451,-2.040114113527867,42.57512311217933,1334.9493507093312,0.4830328695721322,33.41593333657871,4.03974789494691,44.04799761021319,39.053438767557665,0.4835659910965634
811132,0.9144,II,30,test,29.847140545663724,5.094855088498735,2.446019713921596,1.8445239854304816,0.013854656403381937,45.68545517468224,-2.4290694382177476,17.922186436527625,92.23197458580525,3.1146762200936546,9471.635108340506,19.48953886381147,22.613140414596444,0.6745053285416046,0.00010259150410711965,23.70930363013664,21.284718288774002,68.33700930580441,1.1120604247917245,1.0178762568966926
811757,1.0407,II,30,test,72.86960231230317,-0.08421568725100877,47.9423606220907,1.1971309929271592,0.023305615915517955,30.98969228828082,-4.538634127285886,2.04247541741067,166.15547297506473,0.11399527324524525,1014736.2621598655,14.17319242750643,49.08271172479221,0.08917301212053676,0.07564517579274094,33.24964021176301,17.731829944707076,44.08552766313691,2.6640412724492433,0.0006773204798849737
811564,1.0301,Ia,0,test,58.28524601305496,0.27201677404802843,17.246813176791044,0.722073814152593,0.05442332705010518,13.201745115273546,0.17305963835185256,69.8333495797645,12.956369083245184,3.015830812388204,33.977309281238966,-2.4265267106416175,87.15136167030583,8.510204686451852,5.7325100333787455,38.98299783179062,-0.9234373041152613,76.95410348293284,14.99340853197159,5.241787372738828
811134,0.704,Ia,0,test,12.427373373331346,0.44171757558356217,23.20606023306814,21.46029709822066,0.007037541160888288,47.867967016135964,-0.3834261182762724,34.860070469058435,20.66220026512578,6.223420111849047,60.45420503628916,0.1134499789904362,35.85200000966071,24.949652959152523,5.4563918580544115,62.31104026404217,2.3549090552401335,35.1836351492354,27.255085786966134,5.694633806723484
811586,0.6176,Ibc,16,test,34.02244603119841,-31.271286031362333,173.92499967434475,39.37218755157227,39.37218755150816,9.313439685729396,0.5587006470936211,19.118264860262595,1.0021439944102897,1.0021439944102895,16.548221479515945,1.369266101148823,1.9327712303018856,11.045021372167389,1.6002219299853022,24.55349802895356,-2.483017728934042,0.8339124321434593,45.60604640172967,4.183982102736102
811776,0.6991,II,24,test,59.99372088863103,0.5220860161578588,45.88321111289366,0.49957618501374534,6.39473791591116e-05,47.378730573546534,0.7816271977476478,-22.842432600179606,17.529961706585983,1.1207794897685859,680.9352588297731,4.101519350817671,-48.26759982164186,11.258468074668665,0.707011933339535,8.700227603360283,9.78982184602577,46.22519805883414,3.039347309299515,1.2321497709931786
811273,0.8546,II,31,test,54.64221048444754,0.31922154331850466,20.18039998438826,2.7378077771336513,9.879490228300409e-07,11.258904431361893,-0.4310252363673789,71.86542042496104,73.26426169307717,0.45940117372500383,21.76026908735841,1.6246269448414286,89.91984446837024,0.16393885501579866,0.15905979627665992,9.029390977171396,-1.041113490289298,79.45132948921321,220.735832155819,0.2175431872533646
811124,0.693,Ia,0,test,227.25554322689663,1.7824915474664327,31.584785971218782,0.3987432275632506,0.3226769496498081,34.98060974653688,0.6959994156561857,33.886264288766554,20.264545198175767,2.7537358854119347,54.924468080939384,-0.6262675464164021,38.7399621823129,18.416105896158122,6.388860315835543,59.245384465273126,-2.755557181053419,28.677773847209853,37.39189807720279,5.1892042623074195
811065,0.9584,II,44,test,59.3005483336944,0.4457718563743562,50.93353106836095,0.8369087008349083,0.05164156719954755,30.505267391232053,-0.2953113647009973,-22.89966039316111,27.254195964578585,0.5800864528491811,5.670873507064198,1.2444137088560814,54.791877739007845,8.045881487207176,8.04588114580117,5.841677000341803,1.8950196021271506,44.43445399287496,0.06300987916387306,0.06260338491195976
811721,0.3715,II,42,test,13.946656652831281,0.7709646597807435,11.556310585665177,1.0613653534448015,1.0613653025824794,82.12857809367567,6.120162339299603,-18.29815560893568,38.205834684390204,11.109096197781183,116.07587736593226,-39.13277772801088,106.54049998237907,46.359138521842816,46.35913849325369,83.65972874150242,30.78256992470981,-13.168589186007596,41.45929300056123,7.65368653398632
811945,0.7962,II,27,test,246.0904905329728,2.0966257030344853,59.209031713634694,0.9512171548780619,0.06306017534659901,42.69957411188546,0.11302582598925703,23.266380281939195,17.01974122933212,5.242875432766822,19.989753147214767,-2.2607872973527714,15.758490489885439,64.30909310997545,0.32384068346911626,16.010855337464704,8.038674354412398,58.181225172901385,0.162566474020596,0.16116472705591606
811429,0.4126,II,25,test,51.2151233813991,-1.0462018944164697,47.041180206941895,12.194728851720512,0.00012508830700813162,94.4802609011609,6.671472089571474,-31.23729301654576,0.6689865661550204,0.1033227451391258,17.118151564760648,1.5825759438316265,56.39381868117595,1098873.3844824887,6.187237099139393,26.789564500093547,-2.1699605022694075,50.31595473505144,467.38294436495715,2.545136535043631
811142,1.0623,II,30,test,32089.48431986223,1.6594339234311368,49.5093696892818,0.0756003386443617,0.003598741243194064,25.89760805194418,-0.8093646878675882,48.51675555354843,122.30527677304195,3.281000809511685,32.68896399820259,-4.033622960579568,56.95172538506091,144.54632683130916,13.601337177059118,45.89812802868963,-9.92243910520164,49.86191215346016,227.48860228706948,36.02791057811775
811577,0.8955,II,21,test,28.86560816122999,-0.14708156162279692,45.888820830479226,1.9213784698341476,0.0005372005084662344,25.296659818923054,-0.8851049989152684,28.359022948316255,19.604817273559778,1.6346881299023794,19.64966466841523,-1.541063284430239,26.229993700768112,43.17343483962533,0.5060723826579234,37.24403665676935,3.2093128476271056,42.922985710722585,2.405556295560184,0.0015498234906446886
811010,0.8701,II,32,test,22.765304591321105,-0.09522509115873275,132.82731325534226,0.5191770511705601,0.4838085430836838,20.546407954209123,-0.9254492604356614,51.183433452608014,17.129825003187218,2.0842858002635696,46.343436454966444,3.983698826146591,22.008760582828153,2.215596638109355,0.0005519776020634972,5.127670224213655,1.260995368638832,43.53802051358185,311.4985960379527,0.010122067336716034
811068,0.5888,Ia,0,test,237358.0178218536,1.333303959164686,-8.282448746659906,0.7539323982104529,0.013278250998545304,170.31027173914498,0.69335359398199,30.619710088603227,10.450099512807812,0.8509960905312252,230.62056361456493,-2.106043695379887,38.97040616943825,0.9341023119570397,0.7887833503805864,353.275581975419,-3.6995523975169795,65.50905142695783,100141.86667479128,10.37305358889532
Loading

0 comments on commit 3c59939

Please sign in to comment.