-
Notifications
You must be signed in to change notification settings - Fork 4
Template Repo #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '*' | ||
| - '!*backport*' | ||
| tags: | ||
| - 'v*' | ||
| - '!*dev*' | ||
| - '!*pre*' | ||
| - '!*post*' | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| core: | ||
| uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main | ||
| with: | ||
| submodules: false | ||
| coverage: codecov | ||
| toxdeps: tox-pypi-filter | ||
| posargs: -n auto | ||
| libraries: | | ||
| apt: | ||
| - libopenjp2-7 | ||
| envs: | | ||
| - linux: py310 | ||
| - linux: codestyle | ||
| test: | ||
| needs: [core] | ||
| uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main | ||
| with: | ||
| submodules: false | ||
| coverage: codecov | ||
| toxdeps: tox-pypi-filter | ||
| posargs: -n auto | ||
| libraries: | | ||
| apt: | ||
| - libopenjp2-7 | ||
| brew: | ||
| - openjpeg | ||
| envs: | | ||
| - macos: py38 | ||
| - windows: py39 | ||
| online: | ||
| needs: [core] | ||
| uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main | ||
| with: | ||
| default_python: '3.8' | ||
| submodules: false | ||
| coverage: codecov | ||
| toxdeps: tox-pypi-filter | ||
| libraries: | | ||
| apt: | ||
| - libopenjp2-7 | ||
| - linux: py39-online | ||
| - linux: build_docs | ||
| publish: | ||
| # Build wheels when pushing to any branch except main | ||
| # publish.yml will only publish if tagged ^v.* | ||
| if: | | ||
| ( | ||
| github.event_name != 'pull_request' && ( | ||
| github.ref_name != 'main' || | ||
| github.event_name == 'workflow_dispatch' | ||
| ) | ||
| ) || ( | ||
| github.event_name == 'pull_request' && | ||
| contains(github.event.pull_request.labels.*.name, 'Run publish') | ||
| ) | ||
| needs: [test] | ||
| uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish.yml@main | ||
| with: | ||
| test_extras: 'all tests' | ||
| test_command: 'pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs hvpy' | ||
| submodules: false | ||
| targets: | | ||
| - universal2 | ||
| secrets: | ||
| pypi_token: ${{ secrets.pypi_token }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| repos: | ||
| - repo: https://github.com/myint/docformatter | ||
| rev: v1.4 | ||
| hooks: | ||
| - id: docformatter | ||
| args: [--in-place, --pre-summary-newline, --make-summary-multi] | ||
| - repo: https://github.com/myint/autoflake | ||
| rev: v1.4 | ||
| hooks: | ||
| - id: autoflake | ||
| args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] | ||
| exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$" | ||
| - repo: https://github.com/psf/black | ||
| rev: 22.3.0 | ||
| hooks: | ||
| - id: black | ||
| exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" | ||
| - repo: https://github.com/timothycrosley/isort | ||
| rev: 5.10.1 | ||
| hooks: | ||
| - id: isort | ||
| exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.2.0 | ||
| hooks: | ||
| - id: check-ast | ||
| - id: check-case-conflict | ||
| - id: trailing-whitespace | ||
| exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" | ||
| - id: mixed-line-ending | ||
| exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" | ||
| - id: end-of-file-fixer | ||
| exclude: ".*(.fits|.fts|.fit|.txt|.csv)$" | ||
| - id: check-yaml | ||
| - id: debug-statements |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| version: 2 | ||
| build: | ||
| os: ubuntu-20.04 | ||
| tools: | ||
| python: "3.9" | ||
|
|
||
| sphinx: | ||
| builder: html | ||
| configuration: docs/conf.py | ||
| fail_on_warning: false | ||
|
|
||
| python: | ||
| install: | ||
| - method: pip | ||
| extra_requirements: | ||
| - all | ||
| - docs | ||
| path: . |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| v0.0.1 (2022-11-11) | ||
| =================== | ||
|
|
||
| Features | ||
| -------- | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Exclude specific files | ||
| # All files which are tracked by git and not explicitly excluded here are included by setuptools_scm | ||
| # Prune folders | ||
| prune build | ||
| prune docs/_build | ||
| prune docs/api | ||
| prune .circleci | ||
| prune .github | ||
| prune .jupyter | ||
| prune binder | ||
|
|
||
| # exclude a bunch of common hidden files, you probably want to add your own here | ||
| exclude .mailmap | ||
| exclude .gitignore | ||
| exclude .gitattributes | ||
| exclude .editorconfig | ||
| exclude .zenodo.json | ||
| exclude *.yml | ||
| exclude *.yaml |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Helioviewer Python API Wrapper | ||
| ------------------------------ | ||
|
|
||
| ``hvpy`` is a Python API wrapper around the formal `Helioviewer API <https://api.helioviewer.org/docs/v2/>`__. |
| 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 = . | ||
| 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) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| ************* | ||
| API Reference | ||
| ************* | ||
|
|
||
| .. automodapi:: hvpy | ||
| :inherited-members: | ||
| :include-all-objects: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| """ | ||
| Configuration file for the Sphinx documentation builder. | ||
| """ | ||
| from datetime import datetime | ||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
| project = "hvpy" | ||
| author = "The Helioviewer Project" | ||
| copyright = f"{datetime.now().year}, {author}" | ||
| from hvpy import __version__ | ||
|
|
||
| release = __version__ | ||
|
|
||
| # -- General configuration --------------------------------------------------- | ||
| extensions = [ | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.intersphinx", | ||
| "sphinx.ext.todo", | ||
| "sphinx.ext.coverage", | ||
| "sphinx.ext.inheritance_diagram", | ||
| "sphinx.ext.viewcode", | ||
| "sphinx.ext.napoleon", | ||
| "sphinx.ext.doctest", | ||
| "sphinx.ext.mathjax", | ||
| "sphinx_automodapi.automodapi", | ||
| "sphinx_automodapi.smart_resolver", | ||
| ] | ||
| exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] | ||
| source_suffix = ".rst" | ||
| master_doc = "index" | ||
|
|
||
| # Enable nitpicky mode, which forces links to be non-broken | ||
| nitpicky = True | ||
|
|
||
| # -- Options for intersphinx extension ----------------------------------------- | ||
| # Example configuration for intersphinx: refer to the Python standard library. | ||
| intersphinx_mapping = { | ||
| "python": ( | ||
| "https://docs.python.org/3/", | ||
| (None, "http://www.astropy.org/astropy-data/intersphinx/python3.inv"), | ||
| ), | ||
| "numpy": ( | ||
| "https://numpy.org/doc/stable/", | ||
| (None, "http://www.astropy.org/astropy-data/intersphinx/numpy.inv"), | ||
| ), | ||
| "scipy": ( | ||
| "https://docs.scipy.org/doc/scipy/reference/", | ||
| (None, "http://www.astropy.org/astropy-data/intersphinx/scipy.inv"), | ||
| ), | ||
| "matplotlib": ("https://matplotlib.org/stable", None), | ||
| "aiapy": ("https://aiapy.readthedocs.io/en/stable/", None), | ||
| "astropy": ("https://docs.astropy.org/en/stable/", None), | ||
| "requests": ("https://requests.readthedocs.io/en/stable/", None), | ||
| } | ||
|
|
||
| # -- Options for HTML output --------------------------------------------------- | ||
| # The theme to use for HTML and HTML Help pages. See the documentation for | ||
| # a list of builtin themes. | ||
| from sunpy_sphinx_theme.conf import * # NOQA |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ********** | ||
| User Guide | ||
| ********** | ||
|
|
||
| This is how you install and use ``hvpy``. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| ****************** | ||
| hvpy Documentation | ||
| ****************** | ||
|
|
||
| This is the documentation for ``hvpy``. | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 2 | ||
|
|
||
| guide | ||
| api |
| 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=. | ||
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| from .api import * # NOQA | ||
| from .version import __version__ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| __all__ = ["fake_api_call"] | ||
|
|
||
|
|
||
| def fake_api_call(): | ||
| """ | ||
| _summary_ | ||
|
|
||
| Returns | ||
| ------- | ||
| _type_ | ||
| _description_ | ||
| """ | ||
|
Comment on lines
+5
to
+12
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these comments get parsed into the docs?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They will be, I just created this to ensure the doc build works. |
||
| return {} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| from hvpy import fake_api_call | ||
|
|
||
|
|
||
| def test_test_fake(): | ||
| assert True | ||
|
|
||
|
|
||
| def test_fake_api_call(): | ||
| assert fake_api_call() == {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Copyright 2022 Helioviewer Project | ||
|
|
||
| Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
|
|
||
| 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
|
|
||
| 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
|
|
||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Licenses | ||
| ======== | ||
|
|
||
| This directory holds license and credit information for the package, | ||
| works the package is derived from, and/or datasets. | ||
|
|
||
| Ensure that you pick a package licence which is in this folder and it matches | ||
| the one mentioned in the top level README.rst file. If you are using the | ||
| pre-rendered version of this template check for the word 'Other' in the README. |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided that just manually editing a changelog file is probably all we need instead of a more complex system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's alright