Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test pandoc github action deploy #59

Merged
merged 25 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,27 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://pandoc/core:2.9

# Install dependencies
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: "3.10"

- name: Install dependencies
run: |
pip install .
pip install -r ./docs/requirements.txt
pip install -r requirements.txt

# Build the book
- name: Build the book
- name: Sphinx build
run: |
jupyter-book build docs/
cd ./docs; make html; cd ..

# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
publish_dir: ./docs/build/html
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ dmypy.json
# Pyre type checker
.pyre/
*.DS_Store

*venv*
.idea
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,34 @@
`solpolpy` is a solar polarization resolver based on [Deforest et al. 2022](https://doi.org/10.3847/1538-4357/ac43b6).
It converts between various polarization formats, e.g. from the native three triple version from observations
(also known as the MZP convention) to polarization brightness (pB) and total polarization (B), Stokes I, Q and U, etc.
As it is in early development, breaking changes may be frequent.

An example of transforming the polarization basis using the LASCO/C2 images is
shown in the image below.
The images at polarizing angles of -60°, 0° and +60° is shown in the top panel as
Bm, Bz and Bp respectively.
The bottom panel shows the output of the `solpolpy` to convert the initial basis
shown in the image below. The images at polarizing angles of -60°, 0° and +60° is shown in the top panel as
Bm, Bz and Bp respectively. The bottom panel shows the output of the `solpolpy` to convert the initial basis
to the Stokes I, Q and U.
![Example result image](eg_image.png)

## Quickstart
`pip install solpolpy`

Note: We will be updating [the documentation](https://punch-mission.github.io/solpolpy/quickstart.html) soon!
We recommend following along the examples in [the documentation](https://punch-mission.github.io/solpolpy/quickstart.html)!

## Getting Help
Please open a discussion or issue for help.

## Features Coming Soon
- [x] core transformation capability
- [x] clearer examples in the documentation
- [ ] quantification and propagation of error
- [ ] additional plotting utilities
- [ ] more comprehensive support for 4-polarizer systems
- [ ] functions to deal with the IMAX effect in wide-field imagers

## Contributing
We encourage all contributions. If you have a problem with the code or would like to see a new feature, please open an issue. Or you can submit a pull request.
We encourage all contributions.
If you have a problem with the code or would like to see a new feature, please open an issue.
Or you can submit a pull request.

## Code of Conduct
[Access here](CODE_OF_CONDUCT.md)
Expand Down
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)
58 changes: 0 additions & 58 deletions docs/_config.yml

This file was deleted.

11 changes: 0 additions & 11 deletions docs/_toc.yml

This file was deleted.

1 change: 0 additions & 1 deletion docs/advanced_options.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/api.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/intro.md

This file was deleted.

Binary file removed docs/logo.png
Binary file not shown.
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

%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.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

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

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

:end
popd
39 changes: 0 additions & 39 deletions docs/quickstart.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/references.bib

This file was deleted.

8 changes: 5 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
jupyter-book
matplotlib
numpy
sphinx
pydata-sphinx-theme
sphinx-autoapi
nbsphinx
ipython
18 changes: 18 additions & 0 deletions docs/source/cite.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Cite
=======

To cite the software::

@software{marcus_hughes_2023_10076327,
author = {Marcus Hughes and
Ritesh Patel and
Dr Matthieu Wes and
Bryce-Walbridge},
title = {punch-mission/solpolpy: 0.0.1},
month = nov,
year = 2023,
publisher = {Zenodo},
version = {0.0.1},
doi = {10.5281/zenodo.10076327},
url = {https://doi.org/10.5281/zenodo.10076327}
}
80 changes: 80 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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 --------------------------------------------------------------

# 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.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


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

project = 'solpolpy'
copyright = '2023, PUNCH Science Operations Center'
author = 'PUNCH Science Operations Center'

# The full version, including alpha/beta/rc tags
release = '0.1.0'


# -- 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 = ['autoapi.extension',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'nbsphinx',
'IPython.sphinxext.ipython_console_highlighting']

# 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_show_sourcelink = False
html_static_path = ['_static']
html_theme_options = {
"use_edit_page_button": True,
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/punch-mission/solpolpy",
"icon": "fa-brands fa-github",
"type": "fontawesome",
}
],
"show_nav_level": 1,
"show_toc_level": 3
}
html_context = {
# "github_url": "https://github.com", # or your GitHub Enterprise site
"github_user": "punch-mission",
"github_repo": "solpolpy",
"github_version": "main",
"doc_path": "docs/source/",
}


autoapi_dirs = ['../../solpolpy']

232,924 changes: 232,924 additions & 0 deletions docs/source/data/stereo_0.fts

Large diffs are not rendered by default.

233,847 changes: 233,847 additions & 0 deletions docs/source/data/stereo_120.fts

Large diffs are not rendered by default.

230,889 changes: 230,889 additions & 0 deletions docs/source/data/stereo_240.fts

Large diffs are not rendered by default.

Loading