-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
212 additions
and
76 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,4 @@ | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
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,65 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- '**' | ||
pull_request: | ||
|
||
env: | ||
NUMBA_NUM_THREADS: 1 | ||
MPLBACKEND: Agg | ||
PYTEST_ADDOPTS: --color=yes | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
ctapipe-version: [v0.12.0] | ||
|
||
defaults: | ||
run: | ||
shell: bash -leo pipefail {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Python version | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
run: | | ||
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml | ||
- name: Create and activate env | ||
uses: mamba-org/provision-with-micromamba@v15 | ||
with: | ||
environment-name: "ci" | ||
environment-file: environment.yml | ||
|
||
- name: Install dependencies | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
CTAPIPE_VERSION: ${{ matrix.ctapipe-version }} | ||
|
||
run: | | ||
python --version | ||
echo "Installing additional pip packages" | ||
# we install ctapipe using pip to be able to select any commit, e.g. the current master | ||
pip install \ | ||
"git+https://github.com/cta-observatory/ctapipe@$CTAPIPE_VERSION" \ | ||
pytest-cov | ||
echo "pip install -e ." | ||
pip install -e . | ||
- name: Tests | ||
run: | | ||
pytest --cov=nectarchain --cov-report=xml | ||
- uses: codecov/codecov-action@v1 |
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,31 @@ | ||
name: Deploy to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# make sure we have version info | ||
- run: git fetch --tags | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python --version | ||
pip install -U pip setuptools wheel setuptools_scm[toml] | ||
python setup.py sdist bdist_wheel | ||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
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,14 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
update_release_draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 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
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,6 @@ | ||
[build-system] | ||
requires = ["setuptools >= 64.0.3", "setuptools_scm[toml]>=3.4"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "src/nectarchain/_version.py" |
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,57 @@ | ||
[metadata] | ||
name = nectarchain | ||
description = Analysis chain for the CTA MSTN NectarCAM prototype | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown; charset=UTF-8 | ||
author = NectarCAM collaboration | ||
license = BSD-3-Clause | ||
|
||
project_urls = | ||
Bug Tracker = https://github.com/cta-observatory/nectarchain/issues | ||
Source Code = https://github.com/cta-observatory/nectarchain | ||
|
||
classifiers = | ||
Development Status :: 3 - Alpha | ||
License :: OSI Approved :: BSD License | ||
Intended Audience :: Science/Research | ||
Topic :: Scientific/Engineering :: Astronomy | ||
Topic :: Scientific/Engineering :: Physics | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.8 | ||
|
||
[options] | ||
packages = find: | ||
package_dir = | ||
= src | ||
python_requires = ~=3.8 | ||
zip_safe = False | ||
install_requires = | ||
astropy~=4.2 | ||
ctapipe~=0.12 | ||
numpy~=1.22 | ||
protozfits~=2.0 | ||
tables>=3.7 | ||
|
||
[options.packages.find] | ||
where = src | ||
exclude = | ||
nectarchain._dev_version | ||
|
||
[options.extras_require] | ||
tests = | ||
pytest | ||
dev = | ||
setuptools_scm[toml] | ||
all = | ||
%(tests)s | ||
%(dev)s | ||
|
||
[tool:pytest] | ||
minversion = 3.0 | ||
addopts = -v | ||
|
||
[aliases] | ||
test = pytest | ||
|
||
[flake8] | ||
max-line-length = 88 |
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 |
---|---|---|
@@ -1,32 +1,2 @@ | ||
#!/usr/bin/env python | ||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | ||
|
||
from setuptools import setup, find_packages | ||
from os import path | ||
|
||
# read the contents of your README file | ||
this_directory = path.abspath(path.dirname(__file__)) | ||
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
|
||
setup( | ||
name='nectarchain', | ||
packages=find_packages(), | ||
version='0.1', | ||
description='', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
install_requires=[ | ||
'astropy~=4.2', | ||
'ctapipe~=0.12', | ||
'numpy~=1.22.4', | ||
'tables>=3.7', | ||
], | ||
tests_require=['pytest'], | ||
setup_requires=['pytest_runner'], | ||
author='NectarCAM collaboration', | ||
url='https://github.com/cta-observatory/nectarchain', | ||
license='' | ||
) | ||
|
||
from setuptools import setup | ||
setup() |
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,9 @@ | ||
# Try to use setuptools_scm to get the current version; this is only used | ||
# in development installations from the git repository. | ||
# see nectarchain/version.py for details | ||
try: | ||
from setuptools_scm import get_version | ||
|
||
version = get_version(root="..", relative_to=__file__) | ||
except Exception as e: | ||
raise ImportError(f"setuptools_scm broken or not installed: {e}") |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,21 @@ | ||
# this is adapted from https://github.com/astropy/astropy/blob/master/astropy/version.py | ||
# see https://github.com/astropy/astropy/pull/10774 for a discussion on why this needed. | ||
|
||
try: | ||
try: | ||
from ._dev_version import version | ||
except ImportError: | ||
from ._version import version | ||
except Exception: | ||
import warnings | ||
|
||
warnings.warn( | ||
"Could not determine nectarchain version; this indicates a broken installation." | ||
" Install nectarchain from PyPI, using conda or from a local git repository." | ||
" Installing github's autogenerated source release tarballs " | ||
" does not include version information and should be avoided." | ||
) | ||
del warnings | ||
version = "0.0.0" | ||
|
||
__version__ = version |