Skip to content

Commit

Permalink
Merge branch 'master' of github.com:astro-transients/tilepy
Browse files Browse the repository at this point in the history
  • Loading branch information
mseglar committed Sep 18, 2024
2 parents b43be75 + 8bd1f3c commit 20ab9d6
Show file tree
Hide file tree
Showing 31 changed files with 606 additions and 88 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to PyPI

on:
push:
tags:
- 'v*'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install dependencies
run: |
python --version
pip install -U build
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ log
build
output/*
tools/analysisResults
include/__pycache__
.DS_Store
include/.DS_Store
tools/.DS_Store
submit_arrayjob.sh
CTA_simu_job.sh
test*
Expand All @@ -26,6 +23,9 @@ __pycache__
*.eggs
.vscode/
tilepy_venv
tilepy/include/ObservingTimes.py
tilepy/include/gwobserve.py
tilepy/dataset/*
src/tilepy/include/ObservingTimes.py
src/tilepy/include/gwobserve.py
src/tilepy/dataset/*
src/tilepy/_version.py
src/tilepy/_version_cache.py
GLADE+.txt
12 changes: 0 additions & 12 deletions .gitlab-ci.yml

This file was deleted.

8 changes: 5 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: tilepy
channels:
- default
- cta-observatory
- conda-forge
dependencies:
- python>=3.9
- pip
- astropy
- pytz
- scipy
- scipy<1.14.0
- ipython
- numpy
- pandas
Expand All @@ -22,3 +20,7 @@ dependencies:
- ligo.skymap>=2.0.0
- matplotlib<3.9.0
- mocpy
- setuptools
- pytest
- pytest-cov
- pytest-runner
84 changes: 84 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "tilepy"
description = "Computation of the tiling scheduling of large localization uncertainty region event with multi-wavelength pointing telescopes."
readme = "README.md"
authors = [
{name = "Monica Seglar-Arroyo, Halim Ashkar, Fabian Schussler, Mathieu de Bony", email = "[email protected]"},
]
maintainers = [
{name = "Monica Seglar-Arroyo", email = "[email protected]"},
{name = "Halim Ashkar", email = "[email protected]"},
{name = "Fabian Schussler", email = "[email protected]"},
{name = "Mathieu de Bony", email = "[email protected]"},
]
license = {file = "LICENSE.rst"}
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Astronomy",
"Development Status :: 5 - Production/Stable",
]

dynamic = ["version"]
requires-python = ">=3.9"

dependencies = [
"astropy",
"scipy <1.14.0",
"healpy",
"ipython",
"matplotlib <3.9.0",
"MOCpy",
"numpy",
"pandas",
"pytz",
"ephem",
"gdpyc",
"tables",
"fastparquet",
"skyfield",
"ligo.skymap >=2.0.0",
]

[project.optional-dependencies]
tests = [
"pytest >= 7.0",
"pytest-cov",
"tomli",
]

dev = [
"setuptools_scm[toml]",
]

all = [
# self-reference with all extras to simplify
"tilepy[tests,docs,dev]",
]

[project.scripts]
Tiling_Observations = "tilepy.scripts.Tiling_Observations:main"

[project.urls]
repository = "https://github.com/astro-transients/tilepy"
documentation = "https://github.com/astro-transients/tilepy"

[tool.setuptools]
include-package-data = false

[tool.setuptools.packages.find]
where = ["src"]
exclude = [
"tilepy._dev_version",
]

[tool.setuptools_scm]
write_to = "src/tilepy/_version.py"
41 changes: 0 additions & 41 deletions setup.py

This file was deleted.

3 changes: 3 additions & 0 deletions src/tilepy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .version import __version__

__all__ = ["__version__"]
9 changes: 9 additions & 0 deletions src/tilepy/_dev_version/__init__.py
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 tilepy/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}")
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
import time
import datetime

__all__ = [
"GetSchedule",
"GetUniversalSchedule",
]


def GetSchedule(obspar):
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
from astropy import units as u
from astropy.coordinates import EarthLocation

__all__ = [
"HESSObservatory",
"LST",
"CTASouthObservatory",
"CTANorthObservatory",
]


class HESSObservatory:

Expand Down
Loading

0 comments on commit 20ab9d6

Please sign in to comment.