forked from tardis-sn/tardis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix bot aliases in .mailmap (tardis-sn#2038) * Added v_inner and v_outer, enable_nonhomologous_expansion for future use in nonhomologous expansion (tardis-sn#2024) * added v_outer and v_inner to NumbaModel * defined default value for v_inner and v_outer in NumbaModel * added enable_nonhomologous_expansion to io/schemas/montecarlo.yml * added v_inner and v_outer to NumbaPlasma * added v_inner and v_outer as arguments for NumbaModel in run() in montecarlo_numba * added v_outer_cgs to MonteCarloRunner * removed a comment * ran black on the changed files * added right arguments in test * added v_inner, v_outer to tests * added temporary fix to formal_integral.py * ran black on modified files * changed dummy values in the test * Reverted content of file. * made needed change in test_cuda_formal_integral.py * made needed change in test_numba_formal_integral.py * Update README.rst in post-release (tardis-sn#2037) * Fix docs badge * Add license badge * First attempt of creating credits.rst and README.rst via templates * Working version * Restore old README.rst * Update post-release workflow * Change .gitignore * Various fixes * Check PEP8 on CI (tardis-sn#2039) * Add Flake8 job * Change to file description * Test payload Co-authored-by: Sona Chitchyan <[email protected]>
- Loading branch information
1 parent
af5ff83
commit 2a15557
Showing
19 changed files
with
264 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
"""Script for updating `credits.rst` and `README.rst` between releases, | ||
requires the `rst-include` package""" | ||
|
||
import pathlib | ||
import re | ||
import textwrap | ||
import warnings | ||
|
||
import requests | ||
from rst_include import rst_include | ||
|
||
|
||
def generate_zenodo(): | ||
"""Generates `zenodo.rst` file with BibTeX citation | ||
Adapted from: https://astrodata.nyc/posts/2021-04-23-zenodo-sphinx/""" | ||
|
||
CONCEPT_DOI = "592480" # See: https://help.zenodo.org/#versioning | ||
zenodo_path = pathlib.Path("docs/resources/zenodo.rst") | ||
|
||
try: | ||
headers = {"accept": "application/x-bibtex"} | ||
response = requests.get( | ||
f"https://zenodo.org/api/records/{CONCEPT_DOI}", headers=headers | ||
) | ||
response.encoding = "utf-8" | ||
citation = re.findall("@software{(.*)\,", response.text) | ||
zenodo_record = ( | ||
f".. |ZENODO| replace:: {citation[0]}\n\n" | ||
".. code-block:: bibtex\n\n" | ||
+ textwrap.indent(response.text, " " * 4) | ||
) | ||
|
||
except Exception as e: | ||
warnings.warn( | ||
"Failed to retrieve Zenodo record for TARDIS: " f"{str(e)}" | ||
) | ||
|
||
not_found_msg = """ | ||
Couldn"t retrieve the TARDIS software citation from Zenodo. Get it | ||
directly from `this link <https://zenodo.org/record/{CONCEPT_DOI}>`_ . | ||
""" | ||
|
||
zenodo_record = ( | ||
".. |ZENODO| replace:: <TARDIS SOFTWARE CITATION HERE> \n\n" | ||
".. warning:: \n\n" + textwrap.indent(not_found_msg, " " * 4) | ||
) | ||
|
||
with open(zenodo_path, "w") as f: | ||
f.write(zenodo_record) | ||
|
||
print(zenodo_record) | ||
|
||
|
||
def main(): | ||
generate_zenodo() | ||
|
||
rst_include.include( | ||
source="docs/resources/credits_template.rst", | ||
target="docs/resources/credits.rst", | ||
quiet=False, | ||
inplace=False, | ||
source_encoding="utf-8", | ||
target_encoding="utf-8", | ||
) | ||
|
||
rst_include.include( | ||
source="README_TEMPLATE.rst", | ||
target="README.rst", | ||
quiet=False, | ||
inplace=False, | ||
source_encoding="utf-8", | ||
target_encoding="utf-8", | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# For more information about TARDIS pipelines, please refer to: | ||
# | ||
# https://tardis-sn.github.io/tardis/development/continuous_integration.html | ||
|
||
name: codestyle | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
|
||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install Black | ||
run: pip install black==22.3 | ||
|
||
- name: Run Black | ||
run: black --check tardis | ||
|
||
flake8: | ||
if: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install Flake8 | ||
run: pip install flake8==4.0.1 pep8-naming==0.12.1 | ||
|
||
- name: Run Flake8 | ||
run: flake8 tardis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: payload | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo $PAYLOAD | ||
env: | ||
PAYLOAD: ${{ github.event }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -172,10 +172,11 @@ Stuart Sim <[email protected]> ssim <[email protected]> | |
Stuart Sim <[email protected]> Stuart Sim <[email protected]> | ||
Stuart Sim <[email protected]> Stuart Sim <[email protected]> | ||
|
||
tardis-bot <[email protected]> | ||
tardis-bot <[email protected]> tardis-bot <[email protected]> | ||
tardis-bot <[email protected]> tardis-bot <[email protected]> | ||
tardis-bot <[email protected]> tardis-bot <[email protected]> | ||
TARDIS Bot <[email protected]> | ||
TARDIS Bot <[email protected]> tardis-bot <[email protected]> | ||
TARDIS Bot <[email protected]> TARDIS Bot <[email protected]> | ||
TARDIS Bot <[email protected]> TARDIS Bot <[email protected]> | ||
TARDIS Bot <[email protected]> Azure Pipelines <[email protected]> | ||
|
||
Tomas Bylund <[email protected]> | ||
Tomas Bylund <[email protected]> Tobychev <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
====== | ||
TARDIS | ||
====== | ||
|
||
.. image:: https://img.shields.io/badge/Donate-to%20TARDIS-brightgreen.svg | ||
:target: https://numfocus.salsalabs.org/donate-to-tardis/index.html | ||
|
||
.. image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A | ||
:target: http://numfocus.org | ||
|
||
.. image:: https://badges.gitter.im/Join%20Chat.svg | ||
:target: https://gitter.im/tardis-sn/tardis | ||
|
||
.. image:: https://img.shields.io/static/v1?logo=visualstudiocode&label=&message=Open%20in%20Visual%20Studio%20Code&labelColor=2c2c32&color=007acc&logoColor=007acc | ||
:target: https://open.vscode.dev/tardis-sn/tardis | ||
| | ||
TARDIS is a tool that creates synthetic observations (*spectra*) for exploding | ||
stars (*supernovae*). | ||
|
||
.. image:: https://codecov.io/gh/tardis-sn/tardis/branch/master/graph/badge.svg | ||
:target: https://codecov.io/gh/tardis-sn/tardis | ||
|
||
.. image:: https://img.shields.io/endpoint?url=https://jsonbin.org/tardis-bot/tardis/badges/docstr-cov | ||
:target: https://github.com/tardis-sn/tardis/actions/workflows/docstr-cov.yml?query=branch%3Amaster | ||
|
||
.. image:: https://github.com/tardis-sn/tardis/actions/workflows/tests.yml/badge.svg | ||
:target: https://github.com/tardis-sn/tardis/actions/workflows/tests.yml | ||
|
||
.. image:: https://github.com/tardis-sn/tardis/actions/workflows/build-docs.yml/badge.svg | ||
:target: https://tardis-sn.github.io/tardis/index.html | ||
|
||
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg | ||
:target: https://github.com/psf/black | ||
| | ||
|
||
.. include:: docs/resources/credits.rst | ||
|
||
|
||
******* | ||
License | ||
******* | ||
|
||
.. image:: https://img.shields.io/conda/l/conda-forge/tardis-sn | ||
:target: https://github.com/tardis-sn/tardis/blob/master/licenses/LICENSE.rst | ||
|
||
.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat | ||
:target: http://www.astropy.org | ||
| | ||
This project is Copyright (c) TARDIS Collaboration and licensed under | ||
the terms of the BSD 3-Clause license. This package is based upon | ||
the `Astropy package template <https://github.com/astropy/package-template>`_ | ||
which is licensed under the BSD 3-clause license. See the licenses folder for | ||
more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.