Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/exoplanet-dev/exoplanet int…
Browse files Browse the repository at this point in the history
…o main
  • Loading branch information
dfm committed Apr 22, 2021
2 parents b2d5ee4 + 9f76813 commit 5e63316
Show file tree
Hide file tree
Showing 40 changed files with 124 additions and 3,925 deletions.
37 changes: 34 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: ${{ matrix.python-version }}

# Setup
- name: Install dependencies
run: |
python -m pip install -U pip
Expand Down Expand Up @@ -74,3 +71,37 @@ jobs:
uses: AndreMiras/coveralls-python-action@v20201129
with:
parallel-finished: true

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.9"
- name: Build sdist and wheel
run: |
python -m pip install -U pip
python -m pip install -U build
python -m build .
- uses: actions/upload-artifact@v2
with:
path: dist/*

upload_pypi:
needs: [tests, build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: __token__
password: ${{ secrets.pypi_password }}
62 changes: 0 additions & 62 deletions .github/workflows/wheels.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/windows.yml.disabled

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

7 changes: 0 additions & 7 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
include README.md LICENSE *.rst *.toml *.yml *.yaml

graft src/exoplanet/theano_ops/lib/include
graft src/exoplanet/theano_ops/lib/vendor/eigen

recursive-include src/exoplanet/theano_ops *.cc
recursive-include src/exoplanet/theano_ops *.h
2 changes: 1 addition & 1 deletion docs/tutorials/citation.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
with pm.Model() as model:
u = xo.distributions.QuadLimbDark("u")
orbit = xo.orbits.KeplerianOrbit(period=10.0)
light_curve = xo.LimbDarkLightCurve(u)
light_curve = xo.LimbDarkLightCurve(u[0], u[1])
transit = light_curve.get_light_curve(r=0.1, orbit=orbit, t=[0.0, 0.1])

txt, bib = xo.citations.get_citations_for_model()
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/light-delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@

# No light delay
light_curve1 = (
xo.LimbDarkLightCurve([0.5, 0.25])
xo.LimbDarkLightCurve(0.5, 0.25)
.get_light_curve(orbit=orbit, r=0.1, t=t)
.eval()
)

# With light delay
light_curve2 = (
xo.LimbDarkLightCurve([0.5, 0.25])
xo.LimbDarkLightCurve(0.5, 0.25)
.get_light_curve(orbit=orbit, r=0.1, t=t, light_delay=True)
.eval()
)
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/transit.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
t = np.linspace(-0.1, 0.1, 1000)
u = [0.3, 0.2]
light_curve = (
xo.LimbDarkLightCurve(u)
xo.LimbDarkLightCurve(*u)
.get_light_curve(orbit=orbit, r=0.1, t=t, texp=0.02)
.eval()
)
Expand Down Expand Up @@ -98,7 +98,7 @@
orbit = xo.orbits.KeplerianOrbit(period=period, t0=t0, b=b)

# Compute the model light curve using starry
light_curves = xo.LimbDarkLightCurve(u).get_light_curve(
light_curves = xo.LimbDarkLightCurve(u[0], u[1]).get_light_curve(
orbit=orbit, r=r, t=t
)
light_curve = pm.math.sum(light_curves, axis=-1) + mean
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=40.6.0", "wheel", "setuptools_scm", "numpy>=1.13.0", "pybind11>=2.4"]
requires = ["setuptools>=40.6.0", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[tool.black]
Expand Down
36 changes: 3 additions & 33 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import os
import re

from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import find_packages, setup

# PROJECT SPECIFIC
Expand All @@ -24,34 +23,18 @@
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
INSTALL_REQUIRES = [
"numpy>=1.13.0",
"pymc3>=3.9",
"astropy>=3.1",
"pymc3-ext>=0.1.0",
"aesara-theano-fallback>=0.0.2",
]
INSTALL_REQUIRES = ["exoplanet-core[pymc]>=0.1", "astropy>=3.1"]
EXTRA_REQUIRE = {
"test": [
"scipy",
# "nose",
# "parameterized",
"pytest",
"pytest-cov>=2.6.1",
"pytest-env",
"batman-package",
],
"docs": [
"sphinx>=1.7.5",
"pandoc",
"jupyter",
"ipywidgets",
"sphinx-typlog-theme",
"nbformat",
"nbconvert",
"corner",
"lightkurve",
"jupytext",
"rtds_action",
"nbsphinx",
],
Expand All @@ -62,22 +45,10 @@
"matplotlib",
"corner",
"lightkurve",
"pymc3-ext>=0.1.0",
],
}

include_dirs = [
"src/exoplanet/theano_ops/lib/include",
"src/exoplanet/theano_ops/lib/vendor/eigen",
]
ext_modules = [
Pybind11Extension(
"exoplanet.theano_ops.driver",
["src/exoplanet/theano_ops/driver.cpp"],
include_dirs=include_dirs,
language="c++",
)
]

# END PROJECT SPECIFIC


Expand Down Expand Up @@ -119,10 +90,9 @@ def find_meta(meta, meta_file=read(META_PATH)):
packages=PACKAGES,
package_dir={"": "src"},
include_package_data=True,
python_requires=">=3.6",
install_requires=INSTALL_REQUIRES,
extras_require=EXTRA_REQUIRE,
classifiers=CLASSIFIERS,
zip_safe=False,
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
)

0 comments on commit 5e63316

Please sign in to comment.