Skip to content

Commit fc634ec

Browse files
authored
Merge pull request #15 from GernotMaier/pypi
pypi
2 parents 671b551 + 9053563 commit fc634ec

File tree

2 files changed

+49
-5
lines changed

2 files changed

+49
-5
lines changed

.github/workflows/pypi.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Derived from https://github.com/cta-observatory/project-template-python-pure/blob/main/.github/workflows/pypi.yml
2+
name: Deploy to PyPi
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v*'
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
# make sure we have version info
16+
- run: git fetch --tags
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.9"
22+
23+
- name: Install dependencies
24+
run: |
25+
python --version
26+
pip install -U build
27+
python -m build
28+
29+
- name: Publish package
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
with:
32+
user: __token__
33+
password: ${{ secrets.pypi_test_token }}
34+
# remove next line for actual publishing to real pypi
35+
repository_url: https://test.pypi.org/legacy/

pyproject.toml

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
[build-system]
2-
requires = ["setuptools>=65"]
2+
requires = ["setuptools>=65", "setuptools_scm[toml]>=6.2"]
33
build-backend = "setuptools.build_meta"
44

5+
[tool.setuptools]
6+
packages=["v2dl5"]
7+
8+
[tool.setuptools_scm]
9+
write_to = "v2dl5/_version.py"
10+
511
[project]
612
name = "v2dl5"
13+
dynamic = ["version"]
714
description = "High-level analysis for VERITAS with gammapy"
815
readme = "README.md"
916
license = { file="LICENSE" }
@@ -12,9 +19,11 @@ authors = [
1219
{ name="Gernot Maier", email="[email protected]" },
1320
]
1421
classifiers = [
22+
"Intended Audience :: Science/Research",
1523
"Programming Language :: Python :: 3",
16-
"License :: OSI Approved :: BSD-3-Clause",
24+
"License :: OSI Approved :: BSD License",
1725
"Operating System :: OS Independent",
26+
"Topic :: Scientific/Engineering :: Astronomy",
1827
]
1928
requires-python = ">=3.9"
2029
dependencies = [
@@ -28,12 +37,12 @@ dependencies = [
2837
"repository" = "https://github.com/GernotMaier/V2DL5"
2938
"bug tracker" = "https://github.com/GernotMaier/V2DL5/issues"
3039

40+
[project.scripts]
41+
v2dl5-1d-reflected-region = "v2dl5.scripts.1d_reflected_region:main"
42+
3143
[tool.black]
3244
line_length = 100
3345

3446
[tool.isort]
3547
profile = "black"
3648
filter_files = true
37-
38-
39-
[tool.setuptools.packages.find]

0 commit comments

Comments
 (0)