From 499adbd7f2658f75026cf6b50d7a31ad5ef07bc7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 21:17:28 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](https://github.com/PyCQA/isort/compare/5.12.0...5.13.2) - [github.com/psf/black: 23.9.1 → 24.3.0](https://github.com/psf/black/compare/23.9.1...24.3.0) - [github.com/mwouts/jupytext: v1.15.2 → v1.16.1](https://github.com/mwouts/jupytext/compare/v1.15.2...v1.16.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac31d86b..f54fa7c3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace exclude: src/exoplanet/theano_ops/lib/vendor @@ -14,7 +14,7 @@ repos: exclude: docs/tutorials - repo: https://github.com/PyCQA/isort - rev: "5.12.0" + rev: "5.13.2" hooks: - id: isort args: [] @@ -22,7 +22,7 @@ repos: exclude: docs/tutorials - repo: https://github.com/psf/black - rev: "23.9.1" + rev: "24.3.0" hooks: - id: black @@ -32,7 +32,7 @@ repos: - id: black_nbconvert - repo: https://github.com/mwouts/jupytext - rev: v1.15.2 + rev: v1.16.1 hooks: - id: jupytext files: | From 42da2dcc7f07841ac28521fb1c5ce1d585c0cbcf Mon Sep 17 00:00:00 2001 From: Dan Foreman-Mackey Date: Mon, 15 Apr 2024 10:24:42 -0400 Subject: [PATCH 2/3] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f54fa7c3..6e8e4943 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - id: black_nbconvert - repo: https://github.com/mwouts/jupytext - rev: v1.16.1 + rev: v1.15.2 hooks: - id: jupytext files: | From dc3738b9400b393908a7a75142b4e0a2e21aadd0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:27:05 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/exoplanet/orbits/constants.py | 6 +----- src/exoplanet/orbits/dur_to_ecc.py | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/exoplanet/orbits/constants.py b/src/exoplanet/orbits/constants.py index 9249e884..0b508fea 100644 --- a/src/exoplanet/orbits/constants.py +++ b/src/exoplanet/orbits/constants.py @@ -22,11 +22,7 @@ day_per_yr_over_2pi = ( (1.0 * u.au) ** (3 / 2) - / ( - np.sqrt( - c.G.to(u.au**3 / (u.M_sun * u.day**2)) * (1.0 * u.M_sun) - ) - ) + / (np.sqrt(c.G.to(u.au**3 / (u.M_sun * u.day**2)) * (1.0 * u.M_sun))) ).value except TypeError: diff --git a/src/exoplanet/orbits/dur_to_ecc.py b/src/exoplanet/orbits/dur_to_ecc.py index 82f7128d..066fd2cd 100644 --- a/src/exoplanet/orbits/dur_to_ecc.py +++ b/src/exoplanet/orbits/dur_to_ecc.py @@ -39,9 +39,7 @@ def duration_to_eccentricity( s = tt.sin(kwargs["omega"]) umax_inv = tt.switch(tt.lt(s, 0), tt.sqrt(1 - s**2), 1.0) - const = ( - period * tt.shape_padright(r_star) * tt.sqrt((1 + ror) ** 2 - b**2) - ) + const = period * tt.shape_padright(r_star) * tt.sqrt((1 + ror) ** 2 - b**2) const /= np.pi * a u = duration / const