lightcurvelynx 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightcurvelynx-0.2.4/.copier-answers.yml +25 -0
- lightcurvelynx-0.2.4/.git_archival.txt +4 -0
- lightcurvelynx-0.2.4/.gitattributes +24 -0
- lightcurvelynx-0.2.4/.github/ISSUE_TEMPLATE/0-general_issue.md +8 -0
- lightcurvelynx-0.2.4/.github/ISSUE_TEMPLATE/1-bug_report.md +21 -0
- lightcurvelynx-0.2.4/.github/ISSUE_TEMPLATE/2-feature_request.md +18 -0
- lightcurvelynx-0.2.4/.github/dependabot.yml +10 -0
- lightcurvelynx-0.2.4/.github/pull_request_template.md +63 -0
- lightcurvelynx-0.2.4/.github/workflows/asv-main.yml +68 -0
- lightcurvelynx-0.2.4/.github/workflows/asv-nightly.yml +72 -0
- lightcurvelynx-0.2.4/.github/workflows/asv-pr.yml +70 -0
- lightcurvelynx-0.2.4/.github/workflows/build-documentation.yml +39 -0
- lightcurvelynx-0.2.4/.github/workflows/pre-commit-ci.yml +36 -0
- lightcurvelynx-0.2.4/.github/workflows/publish-benchmarks-pr.yml +53 -0
- lightcurvelynx-0.2.4/.github/workflows/publish-to-pypi.yml +37 -0
- lightcurvelynx-0.2.4/.github/workflows/smoke-test.yml +80 -0
- lightcurvelynx-0.2.4/.github/workflows/testing-and-coverage.yml +40 -0
- lightcurvelynx-0.2.4/.gitignore +155 -0
- lightcurvelynx-0.2.4/.pre-commit-config.yaml +102 -0
- lightcurvelynx-0.2.4/.readthedocs.yml +23 -0
- lightcurvelynx-0.2.4/.setup_dev.sh +51 -0
- lightcurvelynx-0.2.4/LICENSE +21 -0
- lightcurvelynx-0.2.4/PKG-INFO +134 -0
- lightcurvelynx-0.2.4/README.md +75 -0
- lightcurvelynx-0.2.4/benchmarks/__init__.py +0 -0
- lightcurvelynx-0.2.4/benchmarks/asv.conf.json +81 -0
- lightcurvelynx-0.2.4/benchmarks/benchmarks.py +263 -0
- lightcurvelynx-0.2.4/data/model_files/snia_hosts_test_pzflow.pkl +0 -0
- lightcurvelynx-0.2.4/data/roman_characterization/roman_wfi_imaging_multiaccum_tables_with_exptime.csv +34 -0
- lightcurvelynx-0.2.4/docs/Makefile +31 -0
- lightcurvelynx-0.2.4/docs/_static/GetBandFluxes.png +0 -0
- lightcurvelynx-0.2.4/docs/_static/MicrolensingGraph.png +0 -0
- lightcurvelynx-0.2.4/docs/_static/ParameterGraph.png +0 -0
- lightcurvelynx-0.2.4/docs/_static/compute_sed.png +0 -0
- lightcurvelynx-0.2.4/docs/_static/dag-model.png +0 -0
- lightcurvelynx-0.2.4/docs/_static/lightcurvelynx-intro.png +0 -0
- lightcurvelynx-0.2.4/docs/_static/lightcurves.png +0 -0
- lightcurvelynx-0.2.4/docs/_static/plotted_lightcurve.png +0 -0
- lightcurvelynx-0.2.4/docs/citations.rst +50 -0
- lightcurvelynx-0.2.4/docs/conf.py +97 -0
- lightcurvelynx-0.2.4/docs/contributing.rst +101 -0
- lightcurvelynx-0.2.4/docs/custom_models.rst +96 -0
- lightcurvelynx-0.2.4/docs/faq.rst +65 -0
- lightcurvelynx-0.2.4/docs/glossary.rst +44 -0
- lightcurvelynx-0.2.4/docs/index.rst +174 -0
- lightcurvelynx-0.2.4/docs/notebooks/README.md +25 -0
- lightcurvelynx-0.2.4/docs/notebooks/adding_effects.ipynb +382 -0
- lightcurvelynx-0.2.4/docs/notebooks/adding_models.ipynb +368 -0
- lightcurvelynx-0.2.4/docs/notebooks/advanced_sampling.ipynb +350 -0
- lightcurvelynx-0.2.4/docs/notebooks/citations.ipynb +130 -0
- lightcurvelynx-0.2.4/docs/notebooks/debugging.ipynb +234 -0
- lightcurvelynx-0.2.4/docs/notebooks/detector_footprint.ipynb +284 -0
- lightcurvelynx-0.2.4/docs/notebooks/extrapolation.ipynb +381 -0
- lightcurvelynx-0.2.4/docs/notebooks/host_source_models.ipynb +221 -0
- lightcurvelynx-0.2.4/docs/notebooks/introduction.ipynb +514 -0
- lightcurvelynx-0.2.4/docs/notebooks/lightcurve_source_demo.ipynb +425 -0
- lightcurvelynx-0.2.4/docs/notebooks/multiple_surveys.ipynb +186 -0
- lightcurvelynx-0.2.4/docs/notebooks/opsim_notebook.ipynb +384 -0
- lightcurvelynx-0.2.4/docs/notebooks/parallel_runs.ipynb +348 -0
- lightcurvelynx-0.2.4/docs/notebooks/passband-demo.ipynb +422 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/Bayesian.ipynb +324 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/README.md +16 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/agn.ipynb +784 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/lclib_example.ipynb +454 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/microlensing.ipynb +550 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/plasticc_snia.ipynb +616 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/redback_example.ipynb +626 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/snana_example.ipynb +415 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/synphot_example.ipynb +163 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/using_pzflow.ipynb +450 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/wrapping_bagle.ipynb +823 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/wrapping_redback.ipynb +478 -0
- lightcurvelynx-0.2.4/docs/notebooks/pre_executed/wrapping_vbmicrolensing.ipynb +367 -0
- lightcurvelynx-0.2.4/docs/notebooks/sampling.ipynb +603 -0
- lightcurvelynx-0.2.4/docs/notebooks/sampling_positions.ipynb +290 -0
- lightcurvelynx-0.2.4/docs/notebooks/technical_overview.ipynb +490 -0
- lightcurvelynx-0.2.4/docs/notebooks/time_varying_effects.ipynb +177 -0
- lightcurvelynx-0.2.4/docs/notebooks.rst +90 -0
- lightcurvelynx-0.2.4/docs/requirements.txt +11 -0
- lightcurvelynx-0.2.4/docs/results_and_output.rst +138 -0
- lightcurvelynx-0.2.4/docs/simulations.rst +259 -0
- lightcurvelynx-0.2.4/pyproject.toml +142 -0
- lightcurvelynx-0.2.4/setup.cfg +4 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/__init__.py +8 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/_version.py +34 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/__init__.py +0 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/agn_utils.py +63 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/black_body.py +40 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/coordinate_utils.py +80 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/detector_footprint.py +416 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/dustmap.py +305 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/mag_flux.py +73 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/noise_model.py +106 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/obs_utils.py +49 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/passbands.py +1337 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/pzflow_node.py +125 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/redshift.py +116 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/salt2_color_law.py +154 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/sed_basis_models.py +205 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/snia_utils.py +433 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/unit_utils.py +116 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/astro_utils/zeropoint.py +179 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/base_models.py +1092 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/consts.py +72 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/effects/__init__.py +0 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/effects/basic_effects.py +88 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/effects/effect_model.py +114 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/effects/extinction.py +180 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/effects/microlensing.py +211 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/effects/white_noise.py +102 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/example_runs/simulate_snia.py +325 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/graph_state.py +994 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/__init__.py +0 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/basic_math_node.py +243 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/bilby_priors.py +125 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/distribution_sampler.py +100 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/given_sampler.py +372 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/np_random.py +138 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/ra_dec_sampler.py +496 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/scipy_random.py +316 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/math_nodes/single_value_node.py +25 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/__init__.py +0 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/agn.py +593 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/bagle_models.py +355 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/basic_models.py +284 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/bayesn.py +506 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/galaxy_models.py +84 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/lightcurve_template_model.py +1012 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/multi_object_model.py +563 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/periodic_model.py +77 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/periodic_variable_star.py +290 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/physical_model.py +1050 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/redback_models.py +226 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/salt2_jax.py +190 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/sed_template_model.py +626 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/sncosmo_models.py +281 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/snia_host.py +22 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/models/static_sed_model.py +292 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/obstable/__init__.py +0 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/obstable/fake_obs_table.py +159 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/obstable/obs_table.py +897 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/obstable/obs_table_params.py +406 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/obstable/opsim.py +497 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/obstable/roman_obstable.py +367 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/obstable/ztf_obstable.py +254 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/simulate.py +699 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/utils/__init__.py +0 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/utils/bicubic_interp.py +370 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/utils/data_download.py +53 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/utils/extrapolate.py +419 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/utils/io_utils.py +312 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/utils/plotting.py +240 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx/utils/post_process_results.py +261 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx.egg-info/PKG-INFO +134 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx.egg-info/SOURCES.txt +275 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx.egg-info/dependency_links.txt +1 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx.egg-info/requires.txt +45 -0
- lightcurvelynx-0.2.4/src/lightcurvelynx.egg-info/top_level.txt +1 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_agn_utils.py +31 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_black_body.py +22 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_coordinate_utils.py +42 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_detector_footprint.py +249 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_dustmap.py +104 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_mag_flux.py +78 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_noise_model.py +136 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_obs_utils.py +26 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_passband_groups.py +706 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_passbands.py +620 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_pzflow_node.py +133 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_redshift.py +49 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_salt_color_law.py +52 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_sed_basis_models.py +80 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_snia_utils.py +155 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_unit_utils.py +102 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/astro_utils/test_zeropoint.py +205 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/conftest.py +69 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/BAYESN.INFO +32 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/BAYESN.YAML +201 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/L_Sigma_epsilon.txt +42 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/M0_sigma0_RV_tauA.txt +2 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/W0.txt +9 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/W1.txt +9 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/bayesn.params +5 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/l_knots.txt +10 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/tau_knots.txt +7 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/BAYESN.M20/theta1_range.txt +2 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/README.md +6 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/dustmaps/sfdmap2/SFD_dust_4096_ngp.fits +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/dustmaps/sfdmap2/SFD_dust_4096_sgp.fits +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/fake_simsed/SED.INFO +12 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/fake_simsed/fake_snia1.sed.gz +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/fake_simsed/fake_snia2.sed.gz +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/fake_simsed/readme.txt +20 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/fake_sncosmo/models/nugent/sn1a_flux.v1.2.dat +5600 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/grid_input_bad.txt +6 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/grid_input_good.ecsv +8 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/hsiao.h5 +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/opsim_shorten.db +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/opsim_small.db +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/LSST/filters.yaml +26 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/LSST/g.dat +8508 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/LSST/i.dat +8508 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/LSST/r.dat +8508 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/LSST/u.dat +8508 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/LSST/y.dat +8508 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/LSST/z.dat +8508 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/Palomar/ZTF/g.xml +8078 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/Palomar/ZTF/readme.txt +1 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/passbands/Roman/roman_wfi_filters.ecsv +2201 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/roman_characterization/roman_wfi_imaging_multiaccum_tables_with_exptime.csv +34 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/test_conditional_flow.pkl +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/test_flow.pkl +0 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/test_lclib_data.TEXT +91 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/SALT2.INFO +19 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_color_correction.dat +8 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_color_dispersion.dat +636 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_lc_dispersion_scaling.dat +1000 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_lc_relative_covariance_01.dat +500 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_lc_relative_variance_0.dat +500 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_lc_relative_variance_1.dat +500 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_spec_covariance_01.dat +10000 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_spec_variance_0.dat +10000 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_spec_variance_1.dat +10000 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_template_0.dat +10426 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/data/truncated-salt2-h17/salt2_template_1.dat +10426 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/effects/test_basic_effects.py +89 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/effects/test_effect_model.py +24 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/effects/test_extinction.py +149 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/effects/test_microlensing.py +114 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/effects/test_white_noise.py +139 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/math_nodes/test_basic_math_node.py +182 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/math_nodes/test_bilby_priors.py +75 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/math_nodes/test_distribution_sampler.py +51 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/math_nodes/test_given_sampler.py +351 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/math_nodes/test_np_random.py +132 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/math_nodes/test_ra_dec_sampler.py +377 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/math_nodes/test_scipy_random.py +247 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/math_nodes/test_single_value_node.py +42 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_agn.py +241 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_bagle_model.py +333 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_basic_models.py +255 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_bayeSN.py +141 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_galaxy_models.py +61 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_lightcurve_template_model.py +876 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_model_extrapolation.py +336 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_multi_object_models.py +397 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_periodic_model.py +34 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_periodic_variable_star.py +176 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_physical_models.py +147 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_redback_models.py +166 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_salt2.py +58 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_sed_template_model.py +372 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_sncosmo_models.py +198 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_snia.py +29 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_snia_host.py +11 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_snia_rates.py +42 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/models/test_static_sed_model.py +370 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/obstable/test_fake_obs_table.py +307 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/obstable/test_obs_table.py +665 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/obstable/test_obs_table_params.py +162 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/obstable/test_opsim.py +667 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/obstable/test_roman_obstable.py +73 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/obstable/test_ztf_obstable.py +98 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/test_base_models.py +537 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/test_consts.py +26 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/test_graph_state.py +965 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/test_simulate.py +972 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/testing_utils/make_fake_opsim.py +113 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/testing_utils/make_fake_sfdmap2_data.py +69 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/testing_utils/make_opsim_shorten.py +108 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/testing_utils/make_truncated_salt2_table.py +57 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/utils/test_bicubic_interp.py +230 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/utils/test_data_download.py +40 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/utils/test_extrapolate.py +196 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/utils/test_io_utils.py +124 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/utils/test_plotting.py +79 -0
- lightcurvelynx-0.2.4/tests/lightcurvelynx/utils/test_post_process_results.py +486 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier
|
|
2
|
+
_commit: v2.1.1
|
|
3
|
+
_src_path: gh:lincc-frameworks/python-project-template
|
|
4
|
+
author_email: lincc-frameworks-team@lists.lsst.org
|
|
5
|
+
author_name: LINCC Frameworks
|
|
6
|
+
create_example_module: false
|
|
7
|
+
custom_install: true
|
|
8
|
+
enforce_style:
|
|
9
|
+
- ruff_lint
|
|
10
|
+
- ruff_format
|
|
11
|
+
failure_notification:
|
|
12
|
+
- slack
|
|
13
|
+
include_benchmarks: true
|
|
14
|
+
include_docs: true
|
|
15
|
+
include_notebooks: true
|
|
16
|
+
mypy_type_checking: none
|
|
17
|
+
package_name: lightcurvelynx
|
|
18
|
+
project_license: MIT
|
|
19
|
+
project_name: lightcurvelynx
|
|
20
|
+
project_organization: lincc-frameworks
|
|
21
|
+
python_versions:
|
|
22
|
+
- '3.10'
|
|
23
|
+
- '3.11'
|
|
24
|
+
- '3.12'
|
|
25
|
+
test_lowest_version: none
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# For explanation of this file and uses see
|
|
2
|
+
# https://git-scm.com/docs/gitattributes
|
|
3
|
+
# https://developer.lsst.io/git/git-lfs.html#using-git-lfs-enabled-repositories
|
|
4
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/git-lfs.html
|
|
5
|
+
#
|
|
6
|
+
# Used by https://github.com/lsst/afwdata.git
|
|
7
|
+
# *.boost filter=lfs diff=lfs merge=lfs -text
|
|
8
|
+
# *.dat filter=lfs diff=lfs merge=lfs -text
|
|
9
|
+
# *.fits filter=lfs diff=lfs merge=lfs -text
|
|
10
|
+
# *.gz filter=lfs diff=lfs merge=lfs -text
|
|
11
|
+
#
|
|
12
|
+
# apache parquet files
|
|
13
|
+
# *.parq filter=lfs diff=lfs merge=lfs -text
|
|
14
|
+
#
|
|
15
|
+
# sqlite files
|
|
16
|
+
# *.sqlite3 filter=lfs diff=lfs merge=lfs -text
|
|
17
|
+
#
|
|
18
|
+
# gzip files
|
|
19
|
+
# *.gz filter=lfs diff=lfs merge=lfs -text
|
|
20
|
+
#
|
|
21
|
+
# png image files
|
|
22
|
+
# *.png filter=lfs diff=lfs merge=lfs -text
|
|
23
|
+
|
|
24
|
+
.git_archival.txt export-subst
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Tell us about a problem to fix
|
|
4
|
+
title: 'Short description'
|
|
5
|
+
labels: 'bug'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
**Bug report**
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
**Environment Information**
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
**Before submitting**
|
|
16
|
+
Please check the following:
|
|
17
|
+
|
|
18
|
+
- [ ] I have described the situation in which the bug arose, including what code was executed, and any applicable data others will need to reproduce the problem.
|
|
19
|
+
- [ ] I have included information about my environment, including the version of this package (e.g. `lightcurvelynx.__version__`)
|
|
20
|
+
- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
|
|
21
|
+
- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: 'Short description'
|
|
5
|
+
labels: 'enhancement'
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Feature request**
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
**Before submitting**
|
|
14
|
+
Please check the following:
|
|
15
|
+
|
|
16
|
+
- [ ] I have described the purpose of the suggested change, specifying what I need the enhancement to accomplish, i.e. what problem it solves.
|
|
17
|
+
- [ ] I have included any relevant links, screenshots, environment information, and data relevant to implementing the requested feature, as well as pseudocode for how I want to access the new functionality.
|
|
18
|
+
- [ ] If I have ideas for how the new feature could be implemented, I have provided explanations and/or pseudocode and/or task lists for the steps.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Thank you for your contribution to the repo :)
|
|
3
|
+
|
|
4
|
+
Pull Request (PR) Instructions:
|
|
5
|
+
Provide a general summary of your changes in the Title above. Fill out each section of the template, and replace the space with an `x` in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help! Once you are satisfied with the pull request, click the "Create pull request" button to submit it for review.
|
|
6
|
+
|
|
7
|
+
Before submitting this PR, please ensure that your input and responses are entered in the designated space provided below each section to keep all project-related information organized and easily accessible.
|
|
8
|
+
|
|
9
|
+
How to link to a PR:
|
|
10
|
+
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
## Change Description
|
|
14
|
+
<!---
|
|
15
|
+
Describe your changes in detail. In your description, you should answer questions like "Why is this change required? What problem does it solve?".
|
|
16
|
+
|
|
17
|
+
If it fixes an open issue, please link to the issue here. If this PR closes an issue, put the word 'closes' before the issue link to auto-close the issue when the PR is merged.
|
|
18
|
+
-->
|
|
19
|
+
- [ ] My PR includes a link to the issue that I am addressing
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Solution Description
|
|
24
|
+
<!-- Please explain the technical solution that I have provided and how it addresses the issue or feature being implemented -->
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Code Quality
|
|
29
|
+
- [ ] I have read the Contribution Guide
|
|
30
|
+
- [ ] My code follows the code style of this project
|
|
31
|
+
- [ ] My code builds (or compiles) cleanly without any errors or warnings
|
|
32
|
+
- [ ] My code contains relevant comments and necessary documentation
|
|
33
|
+
|
|
34
|
+
## Project-Specific Pull Request Checklists
|
|
35
|
+
<!--- Please only use the checklist that apply to your change type(s) -->
|
|
36
|
+
|
|
37
|
+
### Bug Fix Checklist
|
|
38
|
+
- [ ] My fix includes a new test that breaks as a result of the bug (if possible)
|
|
39
|
+
- [ ] My change includes a breaking change
|
|
40
|
+
- [ ] My change includes backwards compatibility and deprecation warnings (if possible)
|
|
41
|
+
|
|
42
|
+
### New Feature Checklist
|
|
43
|
+
- [ ] I have added or updated the docstrings associated with my feature using the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html)
|
|
44
|
+
- [ ] I have updated the tutorial to highlight my new feature (if appropriate)
|
|
45
|
+
- [ ] I have added unit/End-to-End (E2E) test cases to cover my new feature
|
|
46
|
+
- [ ] My change includes a breaking change
|
|
47
|
+
- [ ] My change includes backwards compatibility and deprecation warnings (if possible)
|
|
48
|
+
|
|
49
|
+
### Documentation Change Checklist
|
|
50
|
+
- [ ] Any updated docstrings use the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html)
|
|
51
|
+
|
|
52
|
+
### Build/CI Change Checklist
|
|
53
|
+
- [ ] If required or optional dependencies have changed (including version numbers), I have updated the README to reflect this
|
|
54
|
+
- [ ] If this is a new CI setup, I have added the associated badge to the README
|
|
55
|
+
|
|
56
|
+
<!-- ### Version Change Checklist [For Future Use] -->
|
|
57
|
+
|
|
58
|
+
### Other Change Checklist
|
|
59
|
+
- [ ] Any new or updated docstrings use the [NumPy docstring format](https://numpydoc.readthedocs.io/en/latest/format.html).
|
|
60
|
+
- [ ] I have updated the tutorial to highlight my new feature (if appropriate)
|
|
61
|
+
- [ ] I have added unit/End-to-End (E2E) test cases to cover any changes
|
|
62
|
+
- [ ] My change includes a breaking change
|
|
63
|
+
- [ ] My change includes backwards compatibility and deprecation warnings (if possible)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# This workflow will run benchmarks with airspeed velocity (asv),
|
|
2
|
+
# store the new results in the "benchmarks" branch and publish them
|
|
3
|
+
# to a dashboard on GH Pages.
|
|
4
|
+
name: Run ASV benchmarks for main
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
PYTHON_VERSION: "3.11"
|
|
12
|
+
ASV_VERSION: "0.6.5"
|
|
13
|
+
WORKING_DIR: ${{github.workspace}}/benchmarks
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: ${{github.workflow}}-${{github.ref}}
|
|
17
|
+
cancel-in-progress: true
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
asv-main:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write
|
|
24
|
+
defaults:
|
|
25
|
+
run:
|
|
26
|
+
working-directory: ${{env.WORKING_DIR}}
|
|
27
|
+
steps:
|
|
28
|
+
- name: Set up Python ${{env.PYTHON_VERSION}}
|
|
29
|
+
uses: actions/setup-python@v6
|
|
30
|
+
with:
|
|
31
|
+
python-version: ${{env.PYTHON_VERSION}}
|
|
32
|
+
- name: Checkout main branch of the repository
|
|
33
|
+
uses: actions/checkout@v6
|
|
34
|
+
with:
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
- name: Install dependencies
|
|
37
|
+
run: pip install asv[virtualenv]==${{env.ASV_VERSION}}
|
|
38
|
+
- name: Configure git
|
|
39
|
+
run: |
|
|
40
|
+
git config user.name "github-actions[bot]"
|
|
41
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
42
|
+
- name: Create ASV machine config file
|
|
43
|
+
run: asv machine --machine gh-runner --yes
|
|
44
|
+
- name: Fetch previous results from the "benchmarks" branch
|
|
45
|
+
run: |
|
|
46
|
+
if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
|
|
47
|
+
git merge origin/benchmarks \
|
|
48
|
+
--allow-unrelated-histories \
|
|
49
|
+
--no-commit
|
|
50
|
+
mv ../_results .
|
|
51
|
+
fi
|
|
52
|
+
- name: Run ASV for the main branch
|
|
53
|
+
run: asv run ALL --skip-existing --verbose || true
|
|
54
|
+
- name: Submit new results to the "benchmarks" branch
|
|
55
|
+
uses: JamesIves/github-pages-deploy-action@v4
|
|
56
|
+
with:
|
|
57
|
+
branch: benchmarks
|
|
58
|
+
folder: ${{env.WORKING_DIR}}/_results
|
|
59
|
+
target-folder: _results
|
|
60
|
+
- name: Generate dashboard HTML
|
|
61
|
+
run: |
|
|
62
|
+
asv show
|
|
63
|
+
asv publish
|
|
64
|
+
- name: Deploy to Github pages
|
|
65
|
+
uses: JamesIves/github-pages-deploy-action@v4
|
|
66
|
+
with:
|
|
67
|
+
branch: gh-pages
|
|
68
|
+
folder: ${{env.WORKING_DIR}}/_html
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# This workflow will run daily at 06:45.
|
|
2
|
+
# It will run benchmarks with airspeed velocity (asv)
|
|
3
|
+
# and compare performance with the previous nightly build.
|
|
4
|
+
name: Run benchmarks nightly job
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: 45 6 * * *
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
PYTHON_VERSION: "3.11"
|
|
13
|
+
ASV_VERSION: "0.6.5"
|
|
14
|
+
WORKING_DIR: ${{github.workspace}}/benchmarks
|
|
15
|
+
NIGHTLY_HASH_FILE: nightly-hash
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
asv-nightly:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
defaults:
|
|
21
|
+
run:
|
|
22
|
+
working-directory: ${{env.WORKING_DIR}}
|
|
23
|
+
steps:
|
|
24
|
+
- name: Set up Python ${{env.PYTHON_VERSION}}
|
|
25
|
+
uses: actions/setup-python@v6
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{env.PYTHON_VERSION}}
|
|
28
|
+
- name: Checkout main branch of the repository
|
|
29
|
+
uses: actions/checkout@v6
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: pip install asv[virtualenv]==${{env.ASV_VERSION}}
|
|
34
|
+
- name: Configure git
|
|
35
|
+
run: |
|
|
36
|
+
git config user.name "github-actions[bot]"
|
|
37
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
38
|
+
- name: Create ASV machine config file
|
|
39
|
+
run: asv machine --machine gh-runner --yes
|
|
40
|
+
- name: Fetch previous results from the "benchmarks" branch
|
|
41
|
+
run: |
|
|
42
|
+
if git ls-remote --exit-code origin benchmarks > /dev/null 2>&1; then
|
|
43
|
+
git merge origin/benchmarks \
|
|
44
|
+
--allow-unrelated-histories \
|
|
45
|
+
--no-commit
|
|
46
|
+
mv ../_results .
|
|
47
|
+
fi
|
|
48
|
+
- name: Get nightly dates under comparison
|
|
49
|
+
id: nightly-dates
|
|
50
|
+
run: |
|
|
51
|
+
echo "yesterday=$(date -d yesterday +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
|
52
|
+
echo "today=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
|
53
|
+
- name: Use last nightly commit hash from cache
|
|
54
|
+
uses: actions/cache@v4
|
|
55
|
+
with:
|
|
56
|
+
path: ${{env.WORKING_DIR}}
|
|
57
|
+
key: nightly-results-${{steps.nightly-dates.outputs.yesterday}}
|
|
58
|
+
- name: Run comparison of main against last nightly build
|
|
59
|
+
run: |
|
|
60
|
+
HASH_FILE=${{env.NIGHTLY_HASH_FILE}}
|
|
61
|
+
CURRENT_HASH=${{github.sha}}
|
|
62
|
+
if [ -f $HASH_FILE ]; then
|
|
63
|
+
PREV_HASH=$(cat $HASH_FILE)
|
|
64
|
+
asv continuous $PREV_HASH $CURRENT_HASH --verbose || true
|
|
65
|
+
asv compare $PREV_HASH $CURRENT_HASH --sort ratio --verbose
|
|
66
|
+
fi
|
|
67
|
+
echo $CURRENT_HASH > $HASH_FILE
|
|
68
|
+
- name: Update last nightly hash in cache
|
|
69
|
+
uses: actions/cache@v4
|
|
70
|
+
with:
|
|
71
|
+
path: ${{env.WORKING_DIR}}
|
|
72
|
+
key: nightly-results-${{steps.nightly-dates.outputs.today}}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# This workflow will run benchmarks with airspeed velocity (asv) for pull requests.
|
|
2
|
+
# It will compare the performance of the main branch with the performance of the merge
|
|
3
|
+
# with the new changes. It then publishes a comment with this assessment by triggering
|
|
4
|
+
# the publish-benchmarks-pr workflow.
|
|
5
|
+
# Based on https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.
|
|
6
|
+
name: Run benchmarks for PR
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ main ]
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{github.workflow}}-${{github.ref}}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
env:
|
|
18
|
+
PYTHON_VERSION: "3.11"
|
|
19
|
+
ASV_VERSION: "0.6.5"
|
|
20
|
+
WORKING_DIR: ${{github.workspace}}/benchmarks
|
|
21
|
+
ARTIFACTS_DIR: ${{github.workspace}}/artifacts
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
asv-pr:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
defaults:
|
|
27
|
+
run:
|
|
28
|
+
working-directory: ${{env.WORKING_DIR}}
|
|
29
|
+
steps:
|
|
30
|
+
- name: Set up Python ${{env.PYTHON_VERSION}}
|
|
31
|
+
uses: actions/setup-python@v6
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{env.PYTHON_VERSION}}
|
|
34
|
+
- name: Checkout PR branch of the repository
|
|
35
|
+
uses: actions/checkout@v6
|
|
36
|
+
with:
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
- name: Display Workflow Run Information
|
|
39
|
+
run: |
|
|
40
|
+
echo "Workflow Run ID: ${{github.run_id}}"
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: pip install asv[virtualenv]==${{env.ASV_VERSION}} lf-asv-formatter
|
|
43
|
+
- name: Make artifacts directory
|
|
44
|
+
run: mkdir -p ${{env.ARTIFACTS_DIR}}
|
|
45
|
+
- name: Save pull request number
|
|
46
|
+
run: echo ${{github.event.pull_request.number}} > ${{env.ARTIFACTS_DIR}}/pr
|
|
47
|
+
- name: Get current job logs URL
|
|
48
|
+
uses: Tiryoh/gha-jobid-action@v1
|
|
49
|
+
id: jobs
|
|
50
|
+
with:
|
|
51
|
+
github_token: ${{secrets.GITHUB_TOKEN}}
|
|
52
|
+
job_name: ${{github.job}}
|
|
53
|
+
- name: Create ASV machine config file
|
|
54
|
+
run: asv machine --machine gh-runner --yes
|
|
55
|
+
- name: Save comparison of PR against main branch
|
|
56
|
+
run: |
|
|
57
|
+
git remote add upstream https://github.com/${{github.repository}}.git
|
|
58
|
+
git fetch upstream
|
|
59
|
+
asv continuous upstream/main HEAD --verbose || true
|
|
60
|
+
asv compare upstream/main HEAD --sort ratio --verbose | tee output
|
|
61
|
+
python -m lf_asv_formatter --asv_version "$(asv --version | awk '{print $2}')"
|
|
62
|
+
printf "\n\nClick [here]($STEP_URL) to view all benchmarks." >> output
|
|
63
|
+
mv output ${{env.ARTIFACTS_DIR}}
|
|
64
|
+
env:
|
|
65
|
+
STEP_URL: ${{steps.jobs.outputs.html_url}}#step:10:1
|
|
66
|
+
- name: Upload artifacts (PR number and benchmarks output)
|
|
67
|
+
uses: actions/upload-artifact@v5
|
|
68
|
+
with:
|
|
69
|
+
name: benchmark-artifacts
|
|
70
|
+
path: ${{env.ARTIFACTS_DIR}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# This workflow will install Python dependencies, build the package and then build the documentation.
|
|
3
|
+
|
|
4
|
+
name: Build documentation
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ main ]
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v6
|
|
24
|
+
- name: Set up Python 3.11
|
|
25
|
+
uses: actions/setup-python@v6
|
|
26
|
+
with:
|
|
27
|
+
python-version: '3.11'
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
sudo apt-get update
|
|
31
|
+
python -m pip install --upgrade pip
|
|
32
|
+
if [ -f docs/requirements.txt ]; then pip install -r docs/requirements.txt; fi
|
|
33
|
+
pip install .
|
|
34
|
+
- name: Install notebook requirements
|
|
35
|
+
run: |
|
|
36
|
+
sudo apt-get install pandoc
|
|
37
|
+
- name: Build docs
|
|
38
|
+
run: |
|
|
39
|
+
sphinx-build -T -E -b html -d docs/build/doctrees ./docs docs/build/html
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# This workflow runs pre-commit hooks on pushes and pull requests to main
|
|
2
|
+
# to enforce coding style. To ensure correct configuration, please refer to:
|
|
3
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_precommit.html
|
|
4
|
+
name: Run pre-commit hooks
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ main ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ main ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
pre-commit-ci:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
- name: Set up Python
|
|
20
|
+
uses: actions/setup-python@v6
|
|
21
|
+
with:
|
|
22
|
+
python-version: '3.11'
|
|
23
|
+
- name: Install uv
|
|
24
|
+
uses: astral-sh/setup-uv@v7
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
sudo apt-get update
|
|
28
|
+
uv pip install --system .[dev]
|
|
29
|
+
if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi
|
|
30
|
+
- uses: pre-commit/action@v3.0.1
|
|
31
|
+
with:
|
|
32
|
+
extra_args: --all-files --verbose
|
|
33
|
+
env:
|
|
34
|
+
SKIP: "check-lincc-frameworks-template-version,no-commit-to-branch,check-added-large-files,validate-pyproject,sphinx-build,pytest-check"
|
|
35
|
+
- uses: pre-commit-ci/lite-action@v1.1.0
|
|
36
|
+
if: failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# This workflow publishes a benchmarks comment on a pull request. It is triggered after the
|
|
2
|
+
# benchmarks are computed in the asv-pr workflow. This separation of concerns allows us limit
|
|
3
|
+
# access to the target repository private tokens and secrets, increasing the level of security.
|
|
4
|
+
# Based on https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.
|
|
5
|
+
name: Publish benchmarks comment to PR
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
workflow_run:
|
|
9
|
+
workflows: ["Run benchmarks for PR"]
|
|
10
|
+
types: [completed]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
upload-pr-comment:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
if: >
|
|
16
|
+
github.event.workflow_run.event == 'pull_request' &&
|
|
17
|
+
github.event.workflow_run.conclusion == 'success'
|
|
18
|
+
permissions:
|
|
19
|
+
issues: write
|
|
20
|
+
pull-requests: write
|
|
21
|
+
steps:
|
|
22
|
+
- name: Display Workflow Run Information
|
|
23
|
+
run: |
|
|
24
|
+
echo "Workflow Run ID: ${{ github.event.workflow_run.id }}"
|
|
25
|
+
echo "Head SHA: ${{ github.event.workflow_run.head_sha }}"
|
|
26
|
+
echo "Head Branch: ${{ github.event.workflow_run.head_branch }}"
|
|
27
|
+
echo "Conclusion: ${{ github.event.workflow_run.conclusion }}"
|
|
28
|
+
echo "Event: ${{ github.event.workflow_run.event }}"
|
|
29
|
+
- name: Download artifact
|
|
30
|
+
uses: dawidd6/action-download-artifact@v11
|
|
31
|
+
with:
|
|
32
|
+
name: benchmark-artifacts
|
|
33
|
+
run_id: ${{ github.event.workflow_run.id }}
|
|
34
|
+
- name: Extract artifacts information
|
|
35
|
+
id: pr-info
|
|
36
|
+
run: |
|
|
37
|
+
printf "PR number: $(cat pr)\n"
|
|
38
|
+
printf "Output:\n$(cat output)"
|
|
39
|
+
printf "pr=$(cat pr)" >> $GITHUB_OUTPUT
|
|
40
|
+
- name: Find benchmarks comment
|
|
41
|
+
uses: peter-evans/find-comment@v4
|
|
42
|
+
id: find-comment
|
|
43
|
+
with:
|
|
44
|
+
issue-number: ${{ steps.pr-info.outputs.pr }}
|
|
45
|
+
comment-author: 'github-actions[bot]'
|
|
46
|
+
body-includes: view all benchmarks
|
|
47
|
+
- name: Create or update benchmarks comment
|
|
48
|
+
uses: peter-evans/create-or-update-comment@v5
|
|
49
|
+
with:
|
|
50
|
+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
|
|
51
|
+
issue-number: ${{ steps.pr-info.outputs.pr }}
|
|
52
|
+
body-path: output
|
|
53
|
+
edit-mode: replace
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
# For more information see: https://github.com/pypa/gh-action-pypi-publish#trusted-publishing
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
deploy:
|
|
20
|
+
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
id-token: write
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v6
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v6
|
|
28
|
+
with:
|
|
29
|
+
python-version: '3.11'
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: |
|
|
32
|
+
python -m pip install --upgrade pip
|
|
33
|
+
pip install build
|
|
34
|
+
- name: Build package
|
|
35
|
+
run: python -m build
|
|
36
|
+
- name: Publish package
|
|
37
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# This workflow will run daily at 06:45.
|
|
2
|
+
# It will install Python dependencies and run tests with a variety of Python versions.
|
|
3
|
+
# See documentation for help debugging smoke test issues:
|
|
4
|
+
# https://lincc-ppt.readthedocs.io/en/latest/practices/ci_testing.html#version-culprit
|
|
5
|
+
|
|
6
|
+
name: Unit test smoke test
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
|
|
10
|
+
# Runs this workflow automatically
|
|
11
|
+
schedule:
|
|
12
|
+
- cron: 45 6 * * *
|
|
13
|
+
|
|
14
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
+
uses: actions/setup-python@v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
- name: Install uv
|
|
32
|
+
uses: astral-sh/setup-uv@v7
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
sudo apt-get update
|
|
36
|
+
uv pip install --system -e .[dev]
|
|
37
|
+
if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi
|
|
38
|
+
- name: List dependencies
|
|
39
|
+
run: |
|
|
40
|
+
pip list
|
|
41
|
+
- name: Run unit tests with pytest
|
|
42
|
+
run: |
|
|
43
|
+
python -m pytest
|
|
44
|
+
- name: Send status to Slack app
|
|
45
|
+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
|
|
46
|
+
id: slack
|
|
47
|
+
uses: slackapi/slack-github-action@v2
|
|
48
|
+
with:
|
|
49
|
+
# For posting a rich message using Block Kit
|
|
50
|
+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
51
|
+
webhook-type: webhook-trigger
|
|
52
|
+
payload: |
|
|
53
|
+
{
|
|
54
|
+
"blocks": [
|
|
55
|
+
{
|
|
56
|
+
"type": "header",
|
|
57
|
+
"text": {
|
|
58
|
+
"type": "plain_text",
|
|
59
|
+
"text": "${{ github.repository }}"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "section",
|
|
64
|
+
"text": {
|
|
65
|
+
"type": "mrkdwn",
|
|
66
|
+
"text": "GitHub Action build result: *${{ job.status }}* :${{ job.status }}:"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "divider"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "section",
|
|
74
|
+
"text": {
|
|
75
|
+
"type": "mrkdwn",
|
|
76
|
+
"text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# This workflow will install Python dependencies, run tests and report code coverage with a variety of Python versions
|
|
3
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
4
|
+
|
|
5
|
+
name: Unit test and code coverage
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ main ]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ['3.10', '3.11', '3.12']
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@v6
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v7
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
sudo apt-get update
|
|
32
|
+
uv pip install --system -e .[dev]
|
|
33
|
+
if [ -f requirements.txt ]; then uv pip install --system -r requirements.txt; fi
|
|
34
|
+
- name: Run unit tests with pytest
|
|
35
|
+
run: |
|
|
36
|
+
python -m pytest --cov=lightcurvelynx --cov-report=xml
|
|
37
|
+
- name: Upload coverage report to codecov
|
|
38
|
+
uses: codecov/codecov-action@v5
|
|
39
|
+
with:
|
|
40
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|