Skip to content

Commit e22fb74

Browse files
committed
Merge branch 'main' of https://github.com/sblunt/orbitize into plot_all_orbits
2 parents bff54ee + 1f91aac commit e22fb74

70 files changed

Lines changed: 366279 additions & 3713 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/joss-compile.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on: [push]
2+
3+
jobs:
4+
paper:
5+
runs-on: ubuntu-latest
6+
name: Paper Draft
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
- name: Build draft PDF
11+
uses: openjournals/openjournals-draft-action@master
12+
with:
13+
journal: joss
14+
# This should be the path to the paper within your repo.
15+
paper-path: paper/paper.md
16+
- name: Upload
17+
uses: actions/upload-artifact@v1
18+
with:
19+
name: paper
20+
# This is the output path where Pandoc will write the compiled
21+
# PDF. Note, this should be the same directory as the input
22+
# paper.md
23+
path: paper/paper.pdf
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
3+
name: CI tests
4+
5+
on:
6+
push:
7+
branches:
8+
- '*' # run on all
9+
pull_request:
10+
branches:
11+
- '*'
12+
13+
jobs:
14+
build:
15+
16+
runs-on: macos-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12"]
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v3
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install flake8 pytest pytest-cov
32+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33+
- name: Lint with flake8
34+
run: |
35+
# stop the build if there are Python syntax errors or undefined names
36+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
- name: Test with pytest
40+
run: |
41+
pytest --cov
42+
- name: Coveralls GitHub Action
43+
if: ${{ matrix.python-version }} == '3.12'
44+
uses: coverallsapp/github-action@v2
45+
with:
46+
parallel: true
47+
flag-name: run-$
48+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test jupyter notebook tutorials
2+
3+
on:
4+
push:
5+
branches:
6+
- main # only rerun tutorials when making PRs or changing main
7+
- v3
8+
pull_request:
9+
branches:
10+
- '*'
11+
12+
jobs:
13+
build:
14+
15+
runs-on: macos-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.12"]
20+
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install jupyter setuptools wheel nbmake
31+
python -m pip install -r requirements.txt
32+
python -m pip install . --no-build-isolation
33+
- name: Run tutorial notebooks
34+
run: |
35+
py.test --nbmake --nbmake-timeout=3000 docs/tutorials/*.ipynb
36+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ orbitize/example_data/rebound*.csv
33
orbitize/example_data/*test.hdf5
44
.vscode/launch.json
55
.vscode/settings.json
6+
*.DS_Store
67

78
# images & storage files generated by tutorials
89
*.hdf5
910
!orbitize/example_data/v1_posterior.hdf5
1011
*.fits
1112
*.png
13+
!docs/tutorials/eift_hd206893.png
1214
tests/test_results.h5
1315
tests/multiplanet*test.csv
1416

.readthedocs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.10"
7+
8+
sphinx:
9+
configuration: docs/conf.py
10+
11+
formats:
12+
- pdf
13+
- epub
14+
15+
python:
16+
install:
17+
- requirements: requirements.txt # orbitize requirements
18+
- requirements: docs/requirements.txt # docs-building requirements
19+
- method: pip
20+
path: . # install orbitize

.travis.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Orbit-fitting for directly imaged objects. For installation instructions, tutorials, and detailed documentation, start [here](http://orbitize.readthedocs.io/en/latest/).
66

7-
[![Build Status](https://app.travis-ci.com/sblunt/orbitize.svg?branch=main)](https://app.travis-ci.com/sblunt/orbitize)
7+
![Build Status](https://github.com/sblunt/orbitize/actions/workflows/python-package.yml/badge.svg)
88
[![Coverage Status](https://coveralls.io/repos/github/sblunt/orbitize/badge.svg?branch=main)](https://coveralls.io/github/sblunt/orbitize?branch=main)
99
[![Documentation Status](https://readthedocs.org/projects/orbitize/badge/?version=latest)](http://orbitize.readthedocs.io/en/latest/?badge=latest)
1010
[![PyPI version](https://badge.fury.io/py/orbitize.svg)](https://badge.fury.io/py/orbitize)

docs/conf.py

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@
2222
#
2323
import os
2424
import sys
25-
sys.path.insert(0, os.path.abspath('./../orbitize')) # location of orbitize files with docstrings
25+
26+
sys.path.insert(
27+
0, os.path.abspath("./../orbitize")
28+
) # location of orbitize files with docstrings
2629

2730

2831
# -- General configuration ------------------------------------------------
@@ -35,38 +38,41 @@
3538
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3639
# ones.
3740
extensions = [
38-
'sphinx_rtd_theme',
39-
'sphinx.ext.autodoc',
40-
'sphinx.ext.doctest',
41-
'sphinx.ext.todo',
42-
'sphinx.ext.mathjax',
43-
'sphinx.ext.napoleon', # allows Google style-guide docs to render more prettily
44-
'sphinx.ext.viewcode',
45-
'nbsphinx'
46-
]
41+
"sphinx_rtd_theme",
42+
"sphinx.ext.autodoc",
43+
"sphinx.ext.doctest",
44+
"sphinx.ext.todo",
45+
"sphinx.ext.mathjax",
46+
"sphinx.ext.napoleon", # allows Google style-guide docs to render more prettily
47+
"sphinx.ext.viewcode",
48+
"nbsphinx",
49+
]
4750

4851
# Disable notebook timeout
4952
nbsphinx_timeout = -1
5053

54+
# Only re-run notebooks that have no outputs
55+
nbsphinx_execute = "auto"
56+
5157
# Allow notebook errors
52-
nbsphinx_allow_errors = True
58+
nbsphinx_allow_errors = False
5359

5460
# Add any paths that contain templates here, relative to this directory.
55-
templates_path = ['_templates']
61+
templates_path = ["_templates"]
5662

5763
# The suffix(es) of source filenames.
5864
# You can specify multiple suffix as a list of string:
5965
#
6066
# source_suffix = ['.rst', '.md']
61-
source_suffix = '.rst'
67+
source_suffix = ".rst"
6268

6369
# The master toctree document.
64-
master_doc = 'index'
70+
master_doc = "index"
6571

6672
# General information about the project.
67-
project = 'orbitize'
68-
copyright = '2018, Sarah Blunt, Jason Wang, Isabel Angelo, Henry Ngo, et al'
69-
author = 'Sarah Blunt, Jason Wang, Isabel Angelo, Henry Ngo, et al'
73+
project = "orbitize"
74+
copyright = "2018, Sarah Blunt, Jason Wang, Isabel Angelo, Henry Ngo, et al"
75+
author = "Sarah Blunt, Jason Wang, Isabel Angelo, Henry Ngo, et al"
7076

7177
# The version info for the project you're documenting, acts as replacement for
7278
# |version| and |release|, also used in various other places throughout the
@@ -75,7 +81,7 @@
7581
# The short X.Y version.
7682
version = orbitize.__version__
7783
# The full version, including alpha/beta/rc tags.
78-
#release = '0.1'
84+
# release = '0.1'
7985

8086
# The language for content autogenerated by Sphinx. Refer to documentation
8187
# for a list of supported languages.
@@ -90,7 +96,7 @@
9096
exclude_patterns = []
9197

9298
# The name of the Pygments (syntax highlighting) style to use.
93-
pygments_style = 'sphinx'
99+
pygments_style = "sphinx"
94100

95101
# If true, `todo` and `todoList` produce output, else they produce nothing.
96102
todo_include_todos = True
@@ -101,7 +107,7 @@
101107
# The theme to use for HTML and HTML Help pages. See the documentation for
102108
# a list of builtin themes.
103109
#
104-
html_theme = 'sphinx_rtd_theme'
110+
html_theme = "sphinx_rtd_theme"
105111

106112
# Theme options are theme-specific and customize the look and feel of a theme
107113
# further. For a list of options available for each theme, see the
@@ -111,12 +117,12 @@
111117

112118
# The name of an image file (relative to this directory) to place at the top
113119
# of the sidebar.
114-
#html_logo = 'orbitize_logo_150.png'
120+
# html_logo = 'orbitize_logo_150.png'
115121

116122
# The name of an image file (within the static path) to use as favicon of the
117123
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
118124
# pixels large.
119-
html_favicon = 'favicon.ico'
125+
html_favicon = "favicon.ico"
120126

121127
# Add any paths that contain custom static files (such as style sheets) here,
122128
# relative to this directory. They are copied after the builtin static files,
@@ -129,17 +135,17 @@
129135
# This is required for the alabaster theme
130136
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
131137
html_sidebars = {
132-
'**': [
133-
'relations.html', # needs 'show_related': True theme option to display
134-
'searchbox.html',
138+
"**": [
139+
"relations.html", # needs 'show_related': True theme option to display
140+
"searchbox.html",
135141
]
136142
}
137143

138144

139145
# -- Options for HTMLHelp output ------------------------------------------
140146

141147
# Output file base name for HTML help builder.
142-
htmlhelp_basename = 'orbitizedoc'
148+
htmlhelp_basename = "orbitizedoc"
143149

144150

145151
# -- Options for LaTeX output ---------------------------------------------
@@ -148,15 +154,12 @@
148154
# The paper size ('letterpaper' or 'a4paper').
149155
#
150156
# 'papersize': 'letterpaper',
151-
152157
# The font size ('10pt', '11pt' or '12pt').
153158
#
154159
# 'pointsize': '10pt',
155-
156160
# Additional stuff for the LaTeX preamble.
157161
#
158162
# 'preamble': '',
159-
160163
# Latex figure (float) alignment
161164
#
162165
# 'figure_align': 'htbp',
@@ -166,19 +169,21 @@
166169
# (source start file, target name, title,
167170
# author, documentclass [howto, manual, or own class]).
168171
latex_documents = [
169-
(master_doc, 'orbitize.tex', 'orbitize Documentation',
170-
'Sarah Blunt, Jason Wang, Henry Ngo, et al.', 'manual'),
172+
(
173+
master_doc,
174+
"orbitize.tex",
175+
"orbitize Documentation",
176+
"Sarah Blunt, Jason Wang, Henry Ngo, et al.",
177+
"manual",
178+
),
171179
]
172180

173181

174182
# -- Options for manual page output ---------------------------------------
175183

176184
# One entry per manual page. List of tuples
177185
# (source start file, name, description, authors, manual section).
178-
man_pages = [
179-
(master_doc, 'orbitize', 'orbitize Documentation',
180-
[author], 1)
181-
]
186+
man_pages = [(master_doc, "orbitize", "orbitize Documentation", [author], 1)]
182187

183188

184189
# -- Options for Texinfo output -------------------------------------------
@@ -187,10 +192,13 @@
187192
# (source start file, target name, title, author,
188193
# dir menu entry, description, category)
189194
texinfo_documents = [
190-
(master_doc, 'orbitize', 'orbitize Documentation',
191-
author, 'orbitize', 'One line description of project.',
192-
'Miscellaneous'),
195+
(
196+
master_doc,
197+
"orbitize",
198+
"orbitize Documentation",
199+
author,
200+
"orbitize",
201+
"One line description of project.",
202+
"Miscellaneous",
203+
),
193204
]
194-
195-
196-

0 commit comments

Comments
 (0)