Skip to content

Commit

Permalink
Merge branch 'v3' into obs-priors
Browse files Browse the repository at this point in the history
  • Loading branch information
sblunt committed Feb 29, 2024
2 parents e7b035e + af3ffa5 commit cbfd819
Show file tree
Hide file tree
Showing 40 changed files with 357,099 additions and 1,504 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions

name: CI tests

on:
push:
branches:
- '*' # run on all
pull_request:
branches:
- '*'

jobs:
build:

runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov
- name: Coveralls GitHub Action
if: ${{ matrix.python-version }} == '3.12'
uses: coverallsapp/github-action@v2
with:
parallel: true
flag-name: run-$

36 changes: 36 additions & 0 deletions .github/workflows/run-notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test jupyter notebook tutorials

on:
push:
branches:
- main # only rerun tutorials when making PRs or changing main
- v3
pull_request:
branches:
- '*'

jobs:
build:

runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install jupyter setuptools wheel nbmake
python -m pip install -r requirements.txt
python -m pip install . --no-build-isolation
- name: Run tutorial notebooks
run: |
py.test --nbmake --nbmake-timeout=3000 docs/tutorials/*.ipynb
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.10"

sphinx:
configuration: docs/conf.py

formats:
- pdf
- epub

python:
install:
- requirements: requirements.txt # orbitize requirements
- requirements: docs/requirements.txt # docs-building requirements
- method: pip
path: . # install orbitize
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

[![Build Status](https://app.travis-ci.com/sblunt/orbitize.svg?branch=main)](https://app.travis-ci.com/sblunt/orbitize)
![Build Status](https://github.com/sblunt/orbitize/actions/workflows/python-package.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/sblunt/orbitize/badge.svg?branch=main)](https://coveralls.io/github/sblunt/orbitize?branch=main)
[![Documentation Status](https://readthedocs.org/projects/orbitize/badge/?version=latest)](http://orbitize.readthedocs.io/en/latest/?badge=latest)
[![PyPI version](https://badge.fury.io/py/orbitize.svg)](https://badge.fury.io/py/orbitize)
Expand Down
90 changes: 49 additions & 41 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('./../orbitize')) # location of orbitize files with docstrings

sys.path.insert(
0, os.path.abspath("./../orbitize")
) # location of orbitize files with docstrings


# -- General configuration ------------------------------------------------
Expand All @@ -35,38 +38,41 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_rtd_theme',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.todo',
'sphinx.ext.mathjax',
'sphinx.ext.napoleon', # allows Google style-guide docs to render more prettily
'sphinx.ext.viewcode',
'nbsphinx'
]
"sphinx_rtd_theme",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.todo",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon", # allows Google style-guide docs to render more prettily
"sphinx.ext.viewcode",
"nbsphinx",
]

# Disable notebook timeout
nbsphinx_timeout = -1

# Only re-run notebooks that have no outputs
nbsphinx_execute = "auto"

# Allow notebook errors
nbsphinx_allow_errors = True
nbsphinx_allow_errors = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'orbitize'
copyright = '2018, Sarah Blunt, Jason Wang, Isabel Angelo, Henry Ngo, et al'
author = 'Sarah Blunt, Jason Wang, Isabel Angelo, Henry Ngo, et al'
project = "orbitize"
copyright = "2018, Sarah Blunt, Jason Wang, Isabel Angelo, Henry Ngo, et al"
author = "Sarah Blunt, Jason Wang, Isabel Angelo, Henry Ngo, et al"

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

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

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

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

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

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = 'orbitize_logo_150.png'
# html_logo = 'orbitize_logo_150.png'

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

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


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'orbitizedoc'
htmlhelp_basename = "orbitizedoc"


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -148,15 +154,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -166,19 +169,21 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'orbitize.tex', 'orbitize Documentation',
'Sarah Blunt, Jason Wang, Henry Ngo, et al.', 'manual'),
(
master_doc,
"orbitize.tex",
"orbitize Documentation",
"Sarah Blunt, Jason Wang, Henry Ngo, et al.",
"manual",
),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'orbitize', 'orbitize Documentation',
[author], 1)
]
man_pages = [(master_doc, "orbitize", "orbitize Documentation", [author], 1)]


# -- Options for Texinfo output -------------------------------------------
Expand All @@ -187,10 +192,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'orbitize', 'orbitize Documentation',
author, 'orbitize', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"orbitize",
"orbitize Documentation",
author,
"orbitize",
"One line description of project.",
"Miscellaneous",
),
]



23 changes: 23 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,29 @@ User Guide:
Changelog:
++++++++++

**3.0.0 (TBD)**

- discuss MCMC autocorrelation in MCMC tutorial (@michaelkmpoon)
- add time warning if OFTI doesn't accept an orbit in first 60 s (@michaelkmpoon)

**2.2.2 (2023-06-30)**

- tests now overwrite any generated text files (@sblunt)

**2.2.1 (2023-06-28)**

- tau_to_tp function now accepts array of after_date (@tomasstolker/@semaphoreP)

**2.2.0 (2023-06-21)**

- set up new CI system using GH actions (@sblunt)
- removed radvel as dependency, and moved radvel_utils subpackage to new dir (@sblunt). This is a breaking change for users of orbitize.radvel_utils.

**2.1.4 (2023-06-20)**

- unit tests hotfixes (@semaphoreP)
- use forked ptemcee (@sblunt)

**2.1.3 (2023-02-07)**

- Compatibility with numpy v1.24 (issue #330 and #331; @tomasstolker)
Expand Down
Loading

0 comments on commit cbfd819

Please sign in to comment.