Skip to content

Commit

Permalink
Merge pull request #718 from spacetelescope/develop
Browse files Browse the repository at this point in the history
V1.2.0 Release
  • Loading branch information
BradleySappington committed Aug 11, 2023
2 parents ed0309a + 33a94a9 commit 4c33808
Show file tree
Hide file tree
Showing 43 changed files with 5,799 additions and 1,767 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:

- name: Coverage test in Python 3
os: ubuntu-latest
python: '3.10'
toxenv: py310-poppydev-pysiafdev-cov
python: '3.11'
toxenv: py311-poppydev-pysiafdev-cov

- name: Check for Sphinx doc build errors
os: ubuntu-latest
Expand All @@ -28,28 +28,28 @@ jobs:

- name: Try latest versions of all dependencies
os: ubuntu-latest
python: '3.10'
toxenv: py310-latest-test
python: '3.11'
toxenv: py311-latest-test

- name: Try minimum supported versions
os: ubuntu-latest
python: 3.8
toxenv: py38-legacy-test
python: 3.9
toxenv: py39-legacy-test

- name: Try released POPPY and PySIAF
os: ubuntu-latest
python: 3.8
toxenv: py38-stable-test
python: 3.9
toxenv: py39-stable-test
continue-on-error: 'true'

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

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

Expand All @@ -58,7 +58,7 @@ jobs:

- name: Get WebbPSF Data
run: | # Get WebbPSF data files (just a subset of the full dataset!) and set up environment variable
wget https://stsci.box.com/shared/static/n1fealx9q0m6sdnass6wnyfikvxtc0zz.gz -O /tmp/minimal-webbpsf-data.tar.gz
wget https://stsci.box.com/shared/static/ykkvequ9cbble6qg88ldhjoep4m9ey6x.gz -O /tmp/minimal-webbpsf-data.tar.gz
tar -xzvf /tmp/minimal-webbpsf-data.tar.gz
echo "WEBBPSF_PATH=${{github.workspace}}/webbpsf-data" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ WebbPSF: Simulated Point Spread Functions for the James Webb and Nancy Grace Rom
.. image:: https://img.shields.io/badge/ascl-1504.007-blue.svg?colorB=262255
:target: http://ascl.net/1504.007

WebbPSF produces simulated PSFs for the James Webb Space Telescope, NASA's next
WebbPSF produces simulated PSFs for the James Webb Space Telescope, NASA's
flagship infrared space telescope. WebbPSF can simulate images for any of the
four science instruments plus the fine guidance sensor, including both direct
imaging and coronagraphic modes.
Expand All @@ -37,4 +37,4 @@ Documentation can be found online at https://webbpsf.readthedocs.io
WebbPSF requires input data for its simulations, including optical path
difference (OPD) maps, filter transmission curves, and coronagraph Lyot mask
shapes. These data files are not included in this source distribution.
Please see the documentation to download the required data files.
Please see the documentation to download the required data files.
368 changes: 89 additions & 279 deletions dev_utils/Get Throughputs from Pandeia.ipynb

Large diffs are not rendered by default.

Binary file added dev_utils/MIMF_FP_Table_From_WAG.xlsx
Binary file not shown.
1,346 changes: 1,346 additions & 0 deletions dev_utils/Plot SI MIMF Field Point Locations Wall Chart.ipynb

Large diffs are not rendered by default.

1,453 changes: 1,453 additions & 0 deletions dev_utils/Plot SI WFE Field Dependence.ipynb

Large diffs are not rendered by default.

158 changes: 76 additions & 82 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,39 @@

import os
import sys
import datetime
from datetime import datetime
from pathlib import Path
import stsci_rtd_theme

try:
import tomllib
except ImportError:
import tomli as tomllib

try:
from sphinx_astropy.conf.v1 import * # noqa
except ImportError:
print('ERROR: the documentation requires the sphinx-astropy package to be installed')
print(
"ERROR: the documentation requires the sphinx-astropy package to be installed"
)
sys.exit(1)

# -- Project information -----------------------------------------------------
# Get configuration information from setup.cfg
from configparser import ConfigParser
conf = ConfigParser()

conf.read([os.path.join(os.path.dirname(__file__), '..', 'setup.cfg')])
setup_cfg = dict(conf.items('metadata'))

project = setup_cfg['name']
author = setup_cfg['author']
copyright = '{0}, {1}'.format(
datetime.datetime.now().year, author)

# Also read version and release from the setup_cfg, for use throughout the
# built documents.

__import__(setup_cfg['name'])
package = sys.modules[setup_cfg['name']]

# The short X.Y version.
try:
version = package.__version__.split('-', 1)[0]
# The full version, including alpha/beta/rc tags.
release = package.__version__
except AttributeError:
version = 'dev'
release = 'dev'
with open(Path(__file__).parent.parent / "pyproject.toml", "rb") as metadata_file:
configuration = tomllib.load(metadata_file)
metadata = configuration["project"]
project = metadata["name"]
author = metadata["authors"][0]["name"]
copyright = f"{datetime.now().year}, {author}"

# The short X.Y version.
try:
version = project.__version__.split("-", 1)[0]
# The full version, including alpha/beta/rc tags.
release = project.__version__
except AttributeError:
version = "dev"
release = "dev"


# -- General configuration ---------------------------------------------------
Expand All @@ -62,42 +59,42 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../webbpsf/'))
sys.path.insert(0, os.path.abspath('exts/'))
sys.path.insert(0, os.path.abspath("../"))
sys.path.insert(0, os.path.abspath("../webbpsf/"))
sys.path.insert(0, os.path.abspath("exts/"))


# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.mathjax',
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.viewcode',
'sphinx.ext.autosummary',
'sphinx_automodapi.automodapi',
'sphinx_issues',
'nbsphinx',
'numpydoc'

"sphinx.ext.mathjax",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx_automodapi.automodapi",
"sphinx_issues",
"nbsphinx",
"numpydoc",
"astroquery",
]

numpydoc_show_class_members = 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"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -109,21 +106,29 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '_templates', '**.ipynb_checkpoints']
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"_templates",
"**.ipynb_checkpoints",
]

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

intersphinx_mapping.update({
'poppy': ('http://poppy-optics.readthedocs.io/', None),
})
intersphinx_mapping.update(
{
"poppy": ("http://poppy-optics.readthedocs.io/", None),
}
)


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'stsci_rtd_theme'
html_theme = "stsci_rtd_theme"
html_theme_path = [stsci_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
Expand All @@ -134,8 +139,8 @@
# 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,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_css_files = ['_static/style.css', 'stsci.css']
html_static_path = ["_static"]
html_css_files = ["_static/style.css", "stsci.css"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -149,13 +154,13 @@

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
html_title = '{0} v{1}'.format(project, release)
html_title = "{0} v{1}".format(project, release)


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

# Output file base name for HTML help builder.
htmlhelp_basename = project + 'doc'
htmlhelp_basename = project + "doc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -164,32 +169,29 @@
# 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',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [('index', project + '.tex', project + u' Documentation',
author, 'manual')]
latex_documents = [
("index", project + ".tex", project + " Documentation", author, "manual")
]


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

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


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -198,9 +200,15 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'webbpsf', 'webbpsf Documentation',
author, 'webbpsf', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"webbpsf",
"webbpsf Documentation",
author,
"webbpsf",
"One line description of project.",
"Miscellaneous",
),
]


Expand All @@ -219,24 +227,10 @@
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
epub_exclude_files = ["search.html"]


# -- Extension configuration -------------------------------------------------
## -- Options for the edit_on_github extension ----------------------------------------

if eval(setup_cfg.get('edit_on_github')):
extensions += ['astropy.sphinx.ext.edit_on_github']

versionmod = __import__(setup_cfg['name'] + '.version')
edit_on_github_project = setup_cfg['github_project']
if versionmod.version.release:
edit_on_github_branch = "v" + versionmod.version.version
else:
edit_on_github_branch = "stable"

edit_on_github_source_root = ""
edit_on_github_doc_root = "docs"

# -- Resolving issue number to links in changelog -----------------------------
# Github integration via sphinx-issues plugin
Expand All @@ -245,4 +239,4 @@
# Github repo
issues_github_path = "spacetelescope/webbpsf"

github_issues_url = 'https://github.com/{0}/issues/'.format(setup_cfg['github_project'])
github_issues_url = "https://github.com/{0}/issues/".format(issues_github_path)

0 comments on commit 4c33808

Please sign in to comment.