Skip to content

Commit

Permalink
adopt 2023-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
relleums committed Sep 7, 2023
1 parent 3a0089b commit 54bfb08
Show file tree
Hide file tree
Showing 9 changed files with 790 additions and 33 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

on:
release:
types: [published]

permissions:
contents: read

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/airshower_template_generator_cherenkov-plenoscope/
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API }}
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: test

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install -r requirements.txt
python -m pip install .
- name: Test with pytest
run: |
pytest .
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions README.md

This file was deleted.

27 changes: 27 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
############################
Airshower-Template-Generator
############################
|TestStatus| |PyPiStatus| |BlackStyle|

|FigImageOfShower|

Generate Cherenkov-light-templates of airshowers induced by cosmic-rays. Create a look-up-table binned in:

- Energy of primary particle
- Altitude of airshower's maximum
- Azimuth of observer w.r.t. airshower-axis
- Radial distance of observer w.r.t. airshower-axis

This uses KIT's CORSIKA to simulate the Cherenkov-emission in airshowers.


.. |BlackStyle| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

.. |TestStatus| image:: https://github.com/cherenkov-plenoscope/airshower_template_generator/actions/workflows/test.yml/badge.svg?branch=main
:target: https://github.com/cherenkov-plenoscope/airshower_template_generator/actions/workflows/test.yml

.. |PyPiStatus| image:: https://img.shields.io/pypi/v/airshower_template_generator_cherenkov-plenoscope
:target: https://pypi.org/project/airshower_template_generator_cherenkov-plenoscope/

.. |FigImageOfShower| image:: https://github.com/cherenkov-plenoscope/airshower_template_generator/blob/main/airshower_template_generator/readme/view.jpg?raw=True
1 change: 1 addition & 0 deletions airshower_template_generator/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.3.3"
3 changes: 3 additions & 0 deletions project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=42"]
build-backend = "setuptools.build_meta"
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy
scipy
36 changes: 23 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
import setuptools
import os

with open("README.md", "r") as f:

with open("README.rst", "r") as f:
long_description = f.read()


with open(os.path.join("airshower_template_generator", "version.py")) as f:
txt = f.read()
last_line = txt.splitlines()[-1]
version_string = last_line.split()[-1]
version = version_string.strip("\"'")


setuptools.setup(
name="airshower_template_generator",
version="0.3.2",
name="airshower_template_generator_cherenkov-plenoscope",
version=version,
description="Generate Cherenkov-light-templates of cosmic-ray airshowers.",
long_description=long_description,
long_description_content_type="text/markdown",
long_description_content_type="text/x-rst",
url="https://github.com/cherenkov-plenoscope/airshower_template_generator.git",
author="Sebastian Achim Mueller",
author_email="sebastian-achim.mueller@mpi-hd.mpg.de",
packages=["airshower_template_generator",],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Natural Language :: English",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Astronomy",
],
package_data={"airshower_template_generator": []},
install_requires=[
"json_utils_sebastian-achim-mueller",
"binning_utils_sebastian-achim-mueller",
Expand All @@ -33,4 +34,13 @@
"network_file_system_sebastian-achim-mueller",
"scipy",
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
"Natural Language :: English",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Astronomy",
],
)

0 comments on commit 54bfb08

Please sign in to comment.