Skip to content

Commit

Permalink
update packaging
Browse files Browse the repository at this point in the history
numpy version
  • Loading branch information
adrn committed Jan 15, 2024
1 parent da06f90 commit 6441c02
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 215 deletions.
121 changes: 112 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,115 @@
[build-system]
requires = [
"setuptools>=64",
"setuptools_scm>=8",
"wheel",
"numpy<1.22",
"cython",
"twobody"
]
build-backend = 'setuptools.build_meta'

requires = ["setuptools",
"setuptools_scm",
"wheel",
"extension-helpers",
"scipy",
"numpy",
"cython",
"twobody"]
[project]
name = "thejoker"
authors = [{name = "Adrian Price-Whelan", email = "[email protected]"}]
description = "A custom Monte Carlo sampler for the two-body problem."
readme = "README.rst"
requires-python = ">=3.9"
license.file = "LICENSE"
dynamic = ["version"]
dependencies = [
"astropy",
"numpy<1.22",
"twobody>=0.9",
"scipy",
"h5py",
"schwimmbad>=0.3.1",
"pymc3",
"pymc_ext",
"exoplanet>=0.2.2",
"tables"
]

build-backend = 'setuptools.build_meta'
[project.urls]
Homepage = "https://github.com/adrn/thejoker"
"Bug Tracker" = "https://github.com/adrn/thejoker/issues"
Discussions = "https://github.com/adrn/thejoker/discussions"
Changelog = "https://github.com/adrn/thejoker/releases"

[project.optional-dependencies]
test = [
"pytest",
"pytest-astropy",
"ipython",
"jupyter_client",
"corner",
"astroML",
"pyyaml"
]
docs = [
"sphinx-astropy",
"nbsphinx",
"nbconvert",
"nbformat",
"ipykernel"
]

[tool.setuptools_scm]
version_file = "thejoker/_version.py"

[tool.pytest.ini_options]
testpaths = ["thejoker", "docs"]
doctest_plus = "enabled"
text_file_format = "rst"
addopts = [
"--doctest-rst", "-ra", "--showlocals", "--strict-markers", "--strict-config"
]
xfail_strict = true
filterwarnings = [
"error",
"ignore:unclosed file:ResourceWarning",
"ignore:unclosed <socket:ResourceWarning",
"ignore:unclosed <ssl.SSLSocket:ResourceWarning",
]
log_cli_level = "INFO"

[tool.coverage]
run.source = ["thejoker"]
port.exclude_lines = [
'pragma: no cover',
'\.\.\.',
'if typing.TYPE_CHECKING:',
]

[tool.ruff]
src = ["src"]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
ignore = [
"PLR09", # Too many <...>
"PLR2004", # Magic value used in comparison
"ISC001", # Conflicts with formatter
]
100 changes: 0 additions & 100 deletions setup.cfg

This file was deleted.

81 changes: 0 additions & 81 deletions setup.py

This file was deleted.

41 changes: 31 additions & 10 deletions thejoker/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
from ._astropy_init import * # noqa
from ._version import version as __version__
from .data import RVData
from .plot import plot_phase_fold, plot_rv_curves
from .prior import JokerPrior
from .samples import JokerSamples
from .samples_analysis import (
MAP_sample,
is_P_Kmodal,
is_P_unimodal,
max_phase_gap,
periods_spanned,
phase_coverage,
phase_coverage_per_period,
)
from .thejoker import TheJoker


# For egg_info test builds to pass, put package imports here.
if not _ASTROPY_SETUP_: # noqa
from .thejoker import TheJoker # noqa
from .data import RVData # noqa
from .samples import JokerSamples # noqa
from .prior import JokerPrior # noqa
from .plot import plot_rv_curves, plot_phase_fold # noqa
from .samples_analysis import * # noqa
__all__ = [
"__version__",
"TheJoker",
"RVData",
"JokerSamples",
"JokerPrior",
"plot_rv_curves",
"plot_phase_fold",
"MAP_sample",
"is_P_unimodal",
"is_P_Kmodal",
"max_phase_gap",
"phase_coverage",
"periods_spanned",
"phase_coverage_per_period",
]


__bibtex__ = __citation__ = """@ARTICLE{thejoker,
Expand Down
15 changes: 0 additions & 15 deletions thejoker/_astropy_init.py

This file was deleted.

0 comments on commit 6441c02

Please sign in to comment.