Skip to content

Commit

Permalink
maint: use pyproject.toml solely
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed Jan 10, 2025
1 parent fb390ca commit f0948fd
Show file tree
Hide file tree
Showing 93 changed files with 209 additions and 290 deletions.
52 changes: 0 additions & 52 deletions .flake8

This file was deleted.

11 changes: 0 additions & 11 deletions .isort.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ repos:
hooks:
- id: rst-backticks

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.7.0
hooks:
- id: setup-cfg-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.6
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

113 changes: 96 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,103 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[tool.black]
line-length = 88
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[project]
name = "hera_sim"
description = "A collection of simulation routines describing the HERA instrument."
readme = "README.rst"
authors = [
{name="HERA Team"},
{name="Steven Murray", email="[email protected]"}
]
license = {text="MIT"}
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
]
dynamic=["version"]
requires-python = ">=3.10"

dependencies = [
"astropy",
"astropy-healpix",
"cached-property",
"deprecation",
"hera-cli-utils>=0.1.0",
"numpy>=2",
"pyuvdata>=3.1.2",
"pyuvsim>=1.4",
"pyyaml>=5.1",
"rich",
"scipy",
"typing-extensions;python_version<'3.11'",
]

[project.optional-dependencies]
all = [
"hera-sim[vis,bda,cal,gpu]",
]
bda = [
"bda"
]
cal = [
"hera-calibration>3.6.1"
]
dev = [
"hera-sim[docs,tests]",
]
docs = [
"fftvis",
"furo",
"ipython",
"matvis>=1.3.0",
"nbsphinx",
"numpydoc>=0.8",
"pyradiosky>=0.1.2",
"sphinx>=1.8,<7.2",
"sphinx-autorun",
]
tests = [
"coverage>=4.5.1",
"hera-sim[bda,cal,vis]",
"matplotlib>=3.4.2",
"pre-commit",
"pytest>=3.5.1",
"pytest-cov>=2.5.1",
"uvtools",
]
vis = [
"fftvis>=0.1.0",
"line-profiler",
"matvis>=1.2.1",
"mpi4py",
"pyradiosky>=0.1.2",
]

[project.urls]
Documentation = "https://hera_sim.readthedocs.org"
Repository = "https://github.com/HERA-Team/hera_sim"

[tool.setuptools]
script-files = ["scripts/hera-sim-simulate.py", "scripts/hera-sim-vis.py"]

[tool.pytest.ini_options]
addopts = "--cov hera_sim --cov-config=.coveragerc --cov-report xml:./coverage.xml --durations=25 --verbose"
norecursedirs = [
"dist",
"build",
".tox",
]
testpaths = "hera_sim/tests"

[tool.ruff]
line-length = 88
Expand All @@ -35,6 +113,7 @@ select = [
"E", # pycodestyle
"W", # pycodestyle warning
"NPY", # numpy-specific rules
"I", # isort
]

ignore = [
Expand Down
109 changes: 0 additions & 109 deletions setup.cfg

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
This may need to be updated if the :mod:`.interpolators` module is updated.
"""

import astropy.units as u
import inspect
import warnings

import astropy.units as u
import yaml

from . import antpos, interpolators
Expand Down
5 changes: 3 additions & 2 deletions hera_sim/adjustment.py → src/hera_sim/adjustment.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
"""Module providing tools for adjusting simulation data/metadata to a reference."""

import logging
import numpy as np
import os
import pathlib
from warnings import warn

import numpy as np
from pyuvdata import UVData
from pyuvdata.utils import polnum2str
from scipy.interpolate import RectBivariateSpline, interp1d
from warnings import warn

from .simulate import Simulator
from .utils import _listify
Expand Down
File renamed without changes.
7 changes: 5 additions & 2 deletions hera_sim/beams.py → src/hera_sim/beams.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
"""Module defining analytic polynomial beams."""

from dataclasses import dataclass, field

import numpy as np
import numpy.typing as npt
from numpy.polynomial.chebyshev import chebval
from pyuvdata.analytic_beam import AnalyticBeam
from dataclasses import dataclass, field

from . import utils
import numpy.typing as npt

try:
from typing import Self
except ImportError:
Expand Down
3 changes: 2 additions & 1 deletion hera_sim/cli_utils.py → src/hera_sim/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from __future__ import annotations

import itertools
import numpy as np
import os
import warnings

import numpy as np
from pyuvdata import UVData

from .defaults import SEASON_CONFIGS
Expand Down
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.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Script for making a mock point source catalog."""

import argparse

import numpy as np
from astropy import units
from astropy.coordinates import EarthLocation, Latitude, Longitude
Expand Down
3 changes: 2 additions & 1 deletion hera_sim/defaults.py → src/hera_sim/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import functools
import inspect
import warnings
import yaml
from os import path

import yaml

from .config import CONFIG_PATH

SEASON_CONFIGS = {
Expand Down
Loading

0 comments on commit f0948fd

Please sign in to comment.