Skip to content

Commit

Permalink
Merge pull request #328 from SNEWS2/JostMigenda/BuildDocs
Browse files Browse the repository at this point in the history
Fix docs build and add it to CI workflow
  • Loading branch information
Sheshuk committed May 3, 2024
2 parents d897a4d + 8d927e7 commit 34ef063
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ jobs:
python -m pip install --upgrade pip
- name: Install SNEWPY
run: |
pip install ".[dev]"
pip install ".[dev,docs]"
# Run the unit tests
- name: Test with pytest
- name: Run unit tests with pytest
run: |
pytest -m 'not snowglobes'
- name: Build HTML docs
run: |
cd doc/
make html
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
ALLSPHINXOPTS = -W --keep-going -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

Expand Down
16 changes: 8 additions & 8 deletions python/snewpy/models/presn.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
progenitor_mass = [15, 25]<<u.Msun
)
class Odrzywolek_2010(loaders.Odrzywolek_2010):
"""Presupernova model based on
"""Presupernova model based on
`A.Odrzywolek, Alexander Heger, Acta Phys.Polon.B 41 (2010) <https://inspirehep.net/literature/870759>`_
Dataset available at `website <http://th.if.uj.edu.pl/~odrzywolek/psns/index.html>`_
Dataset available on `Odrzywolek’s website <http://th.if.uj.edu.pl/~odrzywolek/psns/index.html>`_
"""
def __init__(self, progenitor_mass:u.Quantity):
filename=f"s{progenitor_mass.to_value('Msun'):.0f}_nuebar_data.txt"
Expand All @@ -24,10 +24,10 @@ def __init__(self, progenitor_mass:u.Quantity):
progenitor_mass = [15, 30]<<u.Msun
)
class Patton_2017(loaders.Patton_2017):
"""Presupernova model based on
`Kelly M. Patton et al 2017 ApJ 851 6 <https://iopscience.iop.org/article/10.3847/1538-4357/aa95c4>`_
"""Presupernova model based on
`Kelly M. Patton et al. 2017 ApJ 851 6 <https://iopscience.iop.org/article/10.3847/1538-4357/aa95c4>`_
Dataset available at `Zenodo <http://doi.org/10.5281/zenodo.2626645>`_
Dataset available on Zenodo (`DOI:10.5281/zenodo.2626645 <http://doi.org/10.5281/zenodo.2626645>`_)
"""
def __init__(self, progenitor_mass:u.Quantity):
filename=f"totalLuminosity_{progenitor_mass.to_value('Msun'):.0f}SolarMass.dat"
Expand All @@ -37,10 +37,10 @@ def __init__(self, progenitor_mass:u.Quantity):
progenitor_mass = [12, 15]<<u.Msun
)
class Kato_2017(loaders.Kato_2017):
"""Presupernova model based on
`Chinami Kato et al 2017 ApJ 848 48 <https://iopscience.iop.org/article/10.3847/1538-4357/aa8b72>`_
"""Presupernova model based on
`Chinami Kato et al. 2017 ApJ 848 48 <https://iopscience.iop.org/article/10.3847/1538-4357/aa8b72>`_
Dataset available at `Zenodo <https://zenodo.org/records/3768052>`_
Dataset available on `Zenodo <https://zenodo.org/records/3768052>`__
"""
def __init__(self, progenitor_mass:u.Quantity):
path=f"pre_collapse/m{progenitor_mass.to_value('Msun'):.0f}"
Expand Down

0 comments on commit 34ef063

Please sign in to comment.