Skip to content

Commit

Permalink
Merge pull request #329 from SNEWS2/JostMigenda/v1.5release
Browse files Browse the repository at this point in the history
v1.5 release
  • Loading branch information
Sheshuk committed May 4, 2024
2 parents 34ef063 + 69f3172 commit 0dffd9c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 21 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,26 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Check and get Version Number
id: get_version
run: |
pip install .
PYTHON_VERSION=`python -c 'import snewpy; print(snewpy.__version__)'`
echo "PYTHON_VERSION=${PYTHON_VERSION}"
GIT_VERSION=${GITHUB_REF/refs\/tags\/v/}
echo "GIT_VERSION=${GIT_VERSION}"
if [ $PYTHON_VERSION != $GIT_VERSION ]; then exit 1; fi
echo "VERSION=${PYTHON_VERSION}" >> $GITHUB_OUTPUT
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_JM }}
run: |
pip install .
python -c 'import snewpy; print(snewpy.__version__)'
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Get Version Number
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Create Draft Release
# Go to https://github.com/SNEWS2/snewpy/releases to edit this draft release and publish it
# Once it is published, the release automatically is pushed to Zenodo: https://doi.org/10.5281/zenodo.4498940
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SNEWPY: Supernova Neutrino Early Warning Models for Python

<img src="/doc/source/snewpy-logo.png" alt="snewpy logo: The word 'snewpy' in a monospace font, with an explosion emoji inside the letter 'p'." style="width: 300px; max-width: 100%;" />
<img src="https://github.com/SNEWS2/snewpy/blob/v1.4/doc/source/snewpy-logo.png?raw=true" alt="snewpy logo: The word 'snewpy' in a monospace font, with an explosion emoji inside the letter 'p'." style="width: 300px; max-width: 100%;" />

[![DOI](https://zenodo.org/badge/221705586.svg)](https://zenodo.org/badge/latestdoi/221705586)
[![PyPI](https://img.shields.io/pypi/v/snewpy)](https://pypi.org/project/snewpy/)
Expand Down Expand Up @@ -53,9 +53,9 @@ flux = bollig.get_flux(distance=10*u.kpc, transformation=msw_nmo)

You can also calculate the observed event rate in all neutrino detectors supported by SNOwGLoBES, use the included SN models and flavor transformations in event generators like sntools, and much more.

Example scripts which show how SNEWPY can be used are available in the
`python/snewpy/scripts/` subfolder as well as notebooks in `doc/nb/`.
Most downloadable models also include a Jupyter notebook with simple usage examples.
Jupyter notebooks showcasing the downloadable supernova models available through SNEWPY and much of its functionality are available in the `doc/nb/` subfolder.
Additional example scripts are in the
`python/snewpy/scripts/` subfolder.

Papers describing SNEWPY and the underlying physics are published in the Astrophysical Journal ([DOI:10.3847/1538-4357/ac350f](https://dx.doi.org/10.3847/1538-4357/ac350f), [arXiv:2109.08188](https://arxiv.org/abs/2109.08188)) and the Journal of Open Source Software ([DOI:10.21105/joss.03772](https://dx.doi.org/10.21105/joss.03772)).

Expand Down
10 changes: 5 additions & 5 deletions doc/source/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ Download Supernova Models

SNEWPY includes a large number of supernova models from different simulation groups.
Since these models have a size of several 100 MB, they are not included in the initial install.
Instead, SNEWPY automatically loads these files the first time you use a model. By default,
they are downloaded to a hidden directory given by ``snewpy.model_path``.

Alternatively, you can run the following command to bulk download model files to the current directory:
Instead, SNEWPY automatically loads these files the first time you use a model.
Alternatively, you can run the following command to bulk download model files:

.. code-block:: console
$ python -c 'import snewpy; snewpy.get_models()'
Files are downloaded to a hidden directory given by ``snewpy.model_path``.

.. note::

Each model includes a README file with more information, usually including a reference to the corresponding publication
The documentation for each model includes more information, including a reference to the corresponding publication
(e.g. DOI or arXiv identifier). If you use one of these models, please always cite the appropriate reference.


Expand Down
2 changes: 1 addition & 1 deletion python/snewpy/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.4.1'
__version__ = '1.5'
8 changes: 4 additions & 4 deletions python/snewpy/test/_rate_crosscheck_table.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
#generated by "make_rate_table.py" on 2023-06-02 14:05:49.504799
rate_table= \
{('Bollig_2016', 's11.2c', 'AdiabaticMSW_IMO'): {'ar40kt': 2680.934960405018,
{('Bollig_2016', 's11.2c', 'AdiabaticMSW_IMO'): {'ar40kt': 2509.8697955822163,
'halo1': 3.7370536263087892,
'halo2': 47.30447628238974,
'icecube': 332587.17107218195,
'novaFD': 1955.8019842893325,
'novaND': 41.91004252048569,
'wc100kt30prct': 12723.21134007678},
('Bollig_2016', 's11.2c', 'AdiabaticMSW_NMO'): {'ar40kt': 2860.015571948873,
('Bollig_2016', 's11.2c', 'AdiabaticMSW_NMO'): {'ar40kt': 2696.396378383758,
'halo1': 4.261668358305819,
'halo2': 53.94516909247873,
'icecube': 320766.2999953658,
'novaFD': 1947.9479073661355,
'novaND': 41.741740872131466,
'wc100kt30prct': 12645.788228369147},
('Bollig_2016', 's27.0c', 'AdiabaticMSW_IMO'): {'ar40kt': 5465.621983231249,
('Bollig_2016', 's27.0c', 'AdiabaticMSW_IMO'): {'ar40kt': 5192.001233928208,
'halo1': 8.180298088573792,
'halo2': 103.54807707055436,
'icecube': 659449.9649827218,
'novaFD': 3638.7825760092305,
'novaND': 77.97391234305493,
'wc100kt30prct': 23596.070817047243},
('Bollig_2016', 's27.0c', 'AdiabaticMSW_NMO'): {'ar40kt': 5785.497035954946,
('Bollig_2016', 's27.0c', 'AdiabaticMSW_NMO'): {'ar40kt': 5520.903869068218,
'halo1': 9.105675711861647,
'halo2': 115.2617178716664,
'icecube': 661517.4858901916,
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy >= 1.16
numpy
scipy
astropy >=4.3
pandas
Expand All @@ -7,5 +7,5 @@ matplotlib
h5py
requests
pyyaml
snowglobes_data == 1.3.1
snowglobes_data == 1.3.2
importlib_resources; python_version < "3.9"

0 comments on commit 0dffd9c

Please sign in to comment.