Skip to content

Commit 56fd431

Browse files
committed
Merge remote-tracking branch 'origin/main' into avoid_samp_obs
2 parents 9c02653 + 37b98b6 commit 56fd431

File tree

6 files changed

+113
-14
lines changed

6 files changed

+113
-14
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,37 @@ jobs:
3939
fetch-depth: 0
4040

4141
- name: Prepare mamba installation
42-
if: matrix.install-method == 'mamba'
42+
if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
4343
env:
4444
PYTHON_VERSION: ${{ matrix.python-version }}
4545
run: |
4646
# setup correct python version
4747
sed -i -e "s/- python.*/- python=$PYTHON_VERSION/g" environment.yml
4848
4949
- name: mamba setup
50-
if: matrix.install-method == 'mamba'
50+
if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false
5151
uses: mamba-org/setup-micromamba@v1
52+
with:
53+
environment-file: environment.yml
54+
cache-downloads: true
5255

5356
- name: Install dependencies
57+
env:
58+
PYTHON_VERSION: ${{ matrix.python-version }}
5459
run: |
5560
python --version
5661
pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0'
57-
pip install .[all]
62+
pip install -e .[all]
5863
pip freeze
64+
pip list
5965
6066
- name: List installed package versions (conda)
6167
if: matrix.environment-type == 'mamba'
6268
run: micromamba list
6369

6470
- name: Tests
6571
run: |
66-
py.test --cov --cov-report=xml
72+
pytest --cov --cov-report=xml
6773
6874
- name: Upload coverage to Codecov
6975
uses: codecov/codecov-action@v4

docs/changes/35.maintenance.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- switch from setup.py to pyproject.toml

environment.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
---
1+
# A conda environment with all useful packages for pyvisgen developers
22
name: pyvisgen
33
channels:
44
- pytorch
55
- defaults
66
- conda-forge
77
dependencies:
88
- python
9+
- astropy<=6.1.0
910
- pytorch
1011
- numpy
12+
- matplotlib
1113
- pip
12-
- pip:
13-
- towncrier
14-
- astropy==6.1.0
15-
- -e .
14+
- towncrier
15+
- jupyter
16+
- pytest
17+
- pytest-cov
18+
- pytest-runner

pyproject.toml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
[build-system]
2+
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pyvisgen"
7+
version = "0.2.0"
8+
description = "Simulate radio interferometer observations and visibility generation with the RIME formalism."
9+
readme = "README.md"
10+
authors = [
11+
{name = "Kevin Schmidt, Felix Geyer, Stefan Fröse"},
12+
]
13+
maintainers = [
14+
{name = "Kevin Schmidt", email = "[email protected]"},
15+
{name = "Felix Geyer", email = "[email protected]"},
16+
]
17+
license = {text = "MIT"}
18+
classifiers = [
19+
"Intended Audience :: Science/Research",
20+
"License :: OSI Approved :: MIT License",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
"Topic :: Scientific/Engineering :: Astronomy",
25+
"Topic :: Scientific/Engineering :: Physics",
26+
"Topic :: Scientific/Engineering :: Information Analysis",
27+
"Development Status :: 4 - Beta",
28+
]
29+
30+
requires-python = ">=3.10"
31+
32+
dependencies = [
33+
"numpy",
34+
"astropy<=6.1.0",
35+
"torch",
36+
"matplotlib",
37+
"ipython",
38+
"scipy",
39+
"pandas",
40+
"toml",
41+
"pytest",
42+
"pytest-cov",
43+
"jupyter",
44+
"astroplan",
45+
"torch",
46+
"tqdm",
47+
"numexpr",
48+
"click",
49+
"h5py",
50+
"natsort",
51+
"pre-commit",
52+
]
53+
54+
[project.scripts]
55+
pyvisgen_create_dataset = "pyvisgen.simulation.scripts.create_dataset:main"
56+
57+
[tool.setuptools.packages.find]
58+
where = ["pyvisgen"]
59+
60+
[tool.towncrier]
61+
package = "ctapipe"
62+
directory = "docs/changes"
63+
filename = "CHANGES.rst"
64+
template = "docs/changes/template.rst"
65+
# let towncrier create proper links to the merged PR
66+
issue_format = "`#{issue} <https://github.com/cta-observatory/ctapipe/pull/{issue}>`__"
67+
68+
[tool.towncrier.fragment.feature]
69+
name = "New Features"
70+
showcontent = true
71+
72+
[tool.towncrier.fragment.bugfix]
73+
name = "Bug Fixes"
74+
showcontent = true
75+
76+
[tool.towncrier.fragment.api]
77+
name = "API Changes"
78+
showcontent = true
79+
80+
[tool.towncrier.fragment.datamodel]
81+
name = "Data Model Changes"
82+
showcontent = true
83+
84+
[tool.towncrier.fragment.optimization]
85+
name = "Refactoring and Optimization"
86+
showcontent = true
87+
88+
[tool.towncrier.fragment.maintenance]
89+
name = "Maintenance"
90+
showcontent = true
91+
92+
[[tool.towncrier.section]]
93+
name = ""
94+
path = ""

setup.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)