Skip to content

Commit

Permalink
Merge branch 'dev' into all-contributors/add-bourque
Browse files Browse the repository at this point in the history
  • Loading branch information
bourque authored Jul 12, 2023
2 parents 04eea50 + 41e114d commit e1fc757
Show file tree
Hide file tree
Showing 17 changed files with 952 additions and 19 deletions.
51 changes: 48 additions & 3 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,64 @@
"commitType": "docs",
"commitConvention": "angular",
"contributors": [
{
"login": "greglucas",
"name": "Greg Lucas",
"avatar_url": "https://avatars.githubusercontent.com/u/12417828?v=4",
"profile": "http://greglucas.github.io",
"contributions": [
"code",
"doc",
"ideas",
"infra",
"maintenance"
]
},
{
"login": "tech3371",
"name": "Tenzin Choedon",
"avatar_url": "https://avatars.githubusercontent.com/u/36522642?v=4",
"profile": "https://github.com/tech3371",
"contributions": [
"code",
"ideas",
"infra",
"example",
"maintenance"
]
},
{
"login": "sdhoyt",
"name": "Sean Hoyt",
"avatar_url": "https://avatars.githubusercontent.com/u/7146374?v=4",
"profile": "https://github.com/sdhoyt",
"contributions": [
"code",
"ideas",
"infra"
]
},
{
"login": "GFMoraga",
"name": "Gabriel M.",
"avatar_url": "https://avatars.githubusercontent.com/u/104743000?v=4",
"profile": "https://github.com/GFMoraga",
"contributions": [
"code",
"ideas",
"infra
]
},
{
"login": "bourque",
"name": "Matthew Bourque",
"avatar_url": "https://avatars.githubusercontent.com/u/2250769?v=4",
"profile": "https://github.com/bourque",
"contributions": [
"code",
"bug",
"data",
"doc",
"ideas",
"infra",
"maintenance"
]
}
],
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "Documentation Build"
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on:
- pull_request
- release

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[doc]
- name: Build documentation
run: |
make -C docs html
- uses: actions/upload-artifact@v2
with:
name: DocumentationHTML
path: docs/build/html/

# Publish built docs to gh-pages branch
- name: Commit documentation changes
# push docs only when a GitHub Release is made
if: github.event_name == 'release' && github.event.action == 'published'
run: |
git clone https://github.com/IMAP-Science-Operations-Center/imap_processing.git --branch gh-pages --single-branch gh-pages
cp -r docs/build/html/* gh-pages/
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore that.
- name: Publish docs
# push docs only when a GitHub Release is made
if: github.event_name == 'release' && github.event.action == 'published'

uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Documentation ignore
docs/source/reference/generated

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IMAP (Interstellar Mapping and Acceleration Probe)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
The Interstellar Mapping and Acceleration Probe (IMAP) is an exciting project aimed at studying the interstellar medium and investigating the acceleration mechanisms of particles within our galaxy. IMAP utilizes cutting-edge technology and advanced instrumentation to gather valuable data and expand our understanding of space.

Expand All @@ -14,6 +14,7 @@ Join the IMAP Git repository to be part of an exciting scientific endeavor, cont

# Credits
[LASP (Laboratory of Atmospheric and Space Physics)](https://lasp.colorado.edu/)

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand All @@ -24,7 +25,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bourque"><img src="https://avatars.githubusercontent.com/u/2250769?v=4?s=100" width="100px;" alt="Matthew Bourque"/><br /><sub><b>Matthew Bourque</b></sub></a><br /><a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=bourque" title="Code">💻</a> <a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/issues?q=author%3Abourque" title="Bug reports">🐛</a> <a href="#data-bourque" title="Data">🔣</a> <a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=bourque" title="Documentation">📖</a> <a href="#ideas-bourque" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-bourque" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-bourque" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://greglucas.github.io"><img src="https://avatars.githubusercontent.com/u/12417828?v=4?s=100" width="100px;" alt="Greg Lucas"/><br /><sub><b>Greg Lucas</b></sub></a><br /><a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=greglucas" title="Code">💻</a> <a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=greglucas" title="Documentation">📖</a> <a href="#ideas-greglucas" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-greglucas" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-greglucas" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tech3371"><img src="https://avatars.githubusercontent.com/u/36522642?v=4?s=100" width="100px;" alt="Tenzin Choedon"/><br /><sub><b>Tenzin Choedon</b></sub></a><br /><a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=tech3371" title="Code">💻</a> <a href="#ideas-tech3371" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-tech3371" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#example-tech3371" title="Examples">💡</a> <a href="#maintenance-tech3371" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sdhoyt"><img src="https://avatars.githubusercontent.com/u/7146374?v=4?s=100" width="100px;" alt="Sean Hoyt"/><br /><sub><b>Sean Hoyt</b></sub></a><br /><a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=sdhoyt" title="Code">💻</a> <a href="#ideas-sdhoyt" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-sdhoyt" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/GFMoraga"><img src="https://avatars.githubusercontent.com/u/104743000?v=4?s=100" width="100px;" alt="Gabriel M."/><br /><sub><b>Gabriel M.</b></sub></a><br /><a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=GFMoraga" title="Code">💻</a> <a href="#ideas-GFMoraga" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-GFMoraga" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bourque"><img src="https://avatars.githubusercontent.com/u/2250769?v=4?s=100" width="100px;" alt="Matthew Bourque"/><br /><sub><b>Matthew Bourque</b></sub></a><br /><a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=bourque" title="Code">💻</a> <a href="https://github.com/IMAP-Science-Operations-Center/imap_processing/commits?author=bourque" title="Documentation">📖</a> <a href="#ideas-bourque" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-bourque" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
</tbody>
</table>
Expand All @@ -34,4 +39,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
29 changes: 29 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Documentation

## Building documentation

1. Install the documentation dependencies
2. Build the html documents under the `docs` directory

Using poetry:

```bash
# Install the optional documentation dependencies
poetry install --extras "doc"
# Make the html documentation
cd docs/source
poetry run sphinx-build . build
# View the documentation
open build/html/index.html
```

Using pip:

```bash
# Install the optional documentation dependencies
pip install .[doc]
# Make the html documentation
make -C docs html
# View the documentation
open docs/build/html/index.html
```
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Empty file added docs/source/.nojekyll
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
"""
Configuration file for the Sphinx documentation builder.
This file only contains a selection of the most common options. For a full
list see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

# -- Path setup --------------------------------------------------------------

import sys

# 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 resolve() to make it absolute, like shown here.
#
from pathlib import Path

import imap_processing

sys.path.insert(0, Path("../../imap_processing").resolve())

# -- Project information -----------------------------------------------------

project = "imap_processing"
copyright = "2023, Regents of the University of Colorado"
author = "IMAP Science Operations Center"

# The full version, including alpha/beta/rc tags
release = imap_processing.__version__


# -- General configuration ---------------------------------------------------

# 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.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.githubpages", # Helpful for publishing to gh-pages
"sphinx.ext.napoleon",
]

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

# 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 = []


# -- 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 = "pydata_sphinx_theme"

html_logo = "_static/imap-mark-hor-multicolor-dark.png"

html_theme_options = {
"github_url": "https://github.com/IMAP-Science-Operations-Center/imap_processing",
}

# 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"]

# Autosummary
autosummary_generate = True
35 changes: 35 additions & 0 deletions docs/source/development/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. _development:

Development
===========

To contribute to imap_processing, you can fork the GitHub repository,
add your code, and make a pull request. If you are adding additional functionality,
you should also include a test with your enhancement.

imap_processing is designed to be run in a containerized environment, so
the dependencies will be locked in after a release and the data products will
be versioned appropriately to correspond with the code that produced them.

A typical development workflow might look like the following:

.. code:: bash
# Install the development dependencies
pip install .[dev]
# Install the pre-commit hooks
pre-commit install
# Update the code on a feature branch
git checkout -b my-cool-feature
# Run the tests
pytest
# Commit the changes and push to your remote repository
git add my-file
git commit
git push -u origin my-cool-feature
# Go to GitHub and open a pull request!
Loading

0 comments on commit e1fc757

Please sign in to comment.