Skip to content

Commit

Permalink
oof - pinning versions
Browse files Browse the repository at this point in the history
  • Loading branch information
adrn committed Jan 16, 2024
1 parent 7fbf20e commit cc7cf6a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
19 changes: 14 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ requires = [
"setuptools>=64",
"setuptools_scm>=8",
"wheel",
"numpy<1.22",
"extension-helpers==1.*",
"numpy",
"scipy",
"cython",
"twobody"
]
Expand All @@ -14,20 +16,20 @@ 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.7,<3.11"
requires-python = ">=3.7,<3.10"
license.file = "LICENSE"
dynamic = ["version"]
dependencies = [
"astropy",
"numpy<1.22",
"astropy<6.0",
"numpy",
"twobody>=0.9",
"scipy",
"h5py",
"schwimmbad>=0.3.1",
"pymc3",
"pymc_ext",
"exoplanet>=0.2.2",
"tables"
"tables",
]

[project.urls]
Expand Down Expand Up @@ -57,6 +59,9 @@ docs = [
[tool.setuptools_scm]
version_file = "thejoker/_version.py"

[tool.extension-helpers]
use_extension_helpers = true

[tool.pytest.ini_options]
testpaths = ["thejoker", "docs"]
doctest_plus = "enabled"
Expand All @@ -70,6 +75,10 @@ filterwarnings = [
"ignore:unclosed file:ResourceWarning",
"ignore:unclosed <socket:ResourceWarning",
"ignore:unclosed <ssl.SSLSocket:ResourceWarning",
"ignore:`np.bool` is a deprecated alias:DeprecationWarning",
"ignore:pkg_resources is deprecated as an API:DeprecationWarning",
"ignore:The register_cmap function",
"ignore:Call to deprecated Parameter testval:DeprecationWarning",
]
log_cli_level = "INFO"

Expand Down
2 changes: 1 addition & 1 deletion thejoker/prior.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

# Project
from .logging import logger
from .samples import JokerSamples
from .prior_helpers import (get_nonlinear_equiv_units,
get_linear_equiv_units,
validate_poly_trend,
Expand Down Expand Up @@ -292,6 +291,7 @@ def sample(self, size=1, generate_linear=False, return_logprobs=False,
The random samples.
"""
from .samples import JokerSamples
from pymc3.distributions import draw_values
import exoplanet.units as xu

Expand Down
3 changes: 3 additions & 0 deletions thejoker/src/setup_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ def get_extensions():
exts = []

import numpy as np
import scipy
import twobody

cfg = defaultdict(list)
cfg['include_dirs'].append(np.get_include())

twobody_path = os.path.dirname(twobody.__file__)
scipy_path = os.path.dirname(scipy.__file__)
cfg['include_dirs'].append(twobody_path)
cfg['include_dirs'].append(scipy_path)
cfg['sources'].append(os.path.join(twobody_path, 'src/twobody.c'))

cfg['extra_compile_args'].append('--std=gnu99')
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ deps =
oldestdeps: numpy==1.20.*
oldestdeps: matplotlib==3.4.*
oldestdeps: scipy==1.6.*
oldestdeps: astropy==5.2.*
oldestdeps: astropy==5.0.*

devdeps: git+https://github.com/astropy/astropy.git#egg=astropy

Expand All @@ -51,7 +51,7 @@ extras =
commands =
pip freeze
!cov: pytest --pyargs thejoker {toxinidir}/docs {posargs} --durations=16
cov: pytest --pyargs thejoker {toxinidir}/docs --cov thejoker --cov-config={toxinidir}/setup.cfg {posargs} --cov-report=xml:{toxinidir}/coverage.xml --durations=16
cov: pytest --pyargs thejoker {toxinidir}/docs --cov thejoker --cov-config={toxinidir}/pyproject.toml {posargs} --cov-report=xml:{toxinidir}/coverage.xml --durations=16

[testenv:build_docs]
changedir = docs
Expand Down

0 comments on commit cc7cf6a

Please sign in to comment.