Skip to content

Commit

Permalink
Merge pull request #113 from rasg-affiliates/use-pyproject
Browse files Browse the repository at this point in the history
maint: re-structure to src layout
  • Loading branch information
steven-murray authored Apr 22, 2024
2 parents 28ac509 + 2caa9b1 commit e5bc368
Show file tree
Hide file tree
Showing 247 changed files with 612 additions and 681 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/test-deploy.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/testsuite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.9, "3.10"]
python-version: [3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@master
with:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Run Tests
run: |
python -m pytest --cov=py21cmsense --cov-config=.coveragerc --cov-report xml:./coverage.xml --junitxml=test-reports/xunit.xml
python -m pytest --cov=py21cmsense --cov-config=.coveragerc --cov-report xml:./coverage.xml
- uses: codecov/codecov-action@v4
if: success()
Expand Down
83 changes: 82 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,92 @@
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "21cmSense"
description = "Compute sensitivies of radio interferometers to the cosmic 21cm signal."
readme = "README.rst"
authors = [
{name="Jonathan Pober", email="[email protected]"},
{name="Steven Murray", email="[email protected]"},
{name="Matt Kolopanis", email="[email protected]"},
]
requires-python = ">=3.9"
# Add here all kinds of additional classifiers as defined under
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
]
dynamic = ['version']


# Add here dependencies of your project (semicolon/line-separated), e.g.
dependencies = [
"numpy",
"scipy",
"future",
"click",
"tqdm",
"pyyaml",
"astropy>=5",
"methodtools",
"pyuvdata",
"cached_property",
"rich",
"attrs",
"hickleable>=0.1.1",
]

[project.optional-dependencies]
docs = [
"sphinx>=1.3",
"sphinx-rtd-theme",
"numpydoc",
"nbsphinx",
"ipython",
]
test = [
"pre-commit",
"pytest",
"matplotlib",
"pytest-cov",
"pytest-xdist",
]
dev = [
"21cmSense[docs,test]",
"pre-commit",
"commitizen",
]

[project.scripts]
sense = "py21cmsense.cli:main"


[tool.setuptools_scm]


[tool.pytest.ini_options]
# Options for py.test:
# Specify command line options as you would do when invoking py.test directly.
# e.g. --cov-report html (or xml) for html/xml output or --junitxml junit.xml
# in order to write a coverage file that can be read by Jenkins.
addopts = "--cov py21cmsense --cov-report term-missing --verbose"
norecursedirs = [
"dist",
"build",
".tox",
]
testpaths = "tests"

[tool.black]
line-length = 88
py36 = true
exclude = '''
/(
\.eggs
Expand Down
107 changes: 0 additions & 107 deletions setup.cfg

This file was deleted.

4 changes: 0 additions & 4 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion py21cmsense/antpos.py → src/py21cmsense/antpos.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from astropy import units as un
from typing import Sequence

from . import types as tp
from . import units as tp
from . import yaml


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from astropy import units as un
from pathlib import Path

from . import types as tp
from . import units as tp

_ALL_BASELINE_FILTERS = {}

Expand Down
2 changes: 1 addition & 1 deletion py21cmsense/beam.py → src/py21cmsense/beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from hickleable import hickleable

from . import _utils as ut
from . import types as tp
from . import units as tp


@hickleable(evaluate_cached_properties=True)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from astropy.cosmology.units import littleh
from typing import Union

from . import types as tp
from . import units as tp

# The frequency of the 21cm line emission.
f21 = 1.42040575177 * un.GHz
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit e5bc368

Please sign in to comment.