Skip to content

Commit

Permalink
Pulled doc changes from #228 (#234)
Browse files Browse the repository at this point in the history
* Make some updates for 0.14

* Add more packages to list

Fixes #227

* Add some more style

* Add more colours and testing element to test_package

* More work towards a sunpy colour scheme

* Precommit

* rando

* More tweaks to colors

* Copied from pydata

* Removed doc changes

* Remove update changes

* Fix nabil problems

* LMAO ROFL PARTY ROCK

---------

Co-authored-by: Stuart Mumford <[email protected]>
  • Loading branch information
nabobalis and Cadair authored Dec 31, 2023
1 parent 2b50dc4 commit dcf40a4
Show file tree
Hide file tree
Showing 40 changed files with 721 additions and 431 deletions.
22 changes: 5 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,13 @@ jobs:
# Needed to install mplcairo
- run: sudo apt install libcairo2-dev pkg-config
# the large resource_class has 4 CPUs but auto detection does not work
- run: python -m tox -e sunpy-docs -- -j 4
- run: python -m tox -e sunpy_docs -- -j 4
# Remove some parts of the build to speed up upload
- run: rm -r .tmp/sunpy-docs/sunpy/docs/_build/html/.doctrees
- run: rm -r .tmp/sunpy-docs/sunpy/docs/_build/html/_downloads
- run: rm -r .tmp/sunpy-docs/sunpy/docs/_build/html/_sources
- run: rm -r .tmp/sunpy_docs/sunpy/docs/_build/html/.doctrees
- run: rm -r .tmp/sunpy_docs/sunpy/docs/_build/html/_downloads
- run: rm -r .tmp/sunpy_docs/sunpy/docs/_build/html/_sources
- store_artifacts:
path: .tmp/sunpy-docs/sunpy/docs/_build/html
test_package:
resource_class: large
docker:
- image: cimg/python:3.11
steps:
- checkout
- run: *apt-install
- run: *tox
- run: python -m tox -e testpackage-docs -- -j 4
- store_artifacts:
path: test_package/docs/_build/html
path: .tmp/sunpy_docs/sunpy/docs/_build/html
css_linting:
resource_class: small
docker:
Expand All @@ -64,5 +53,4 @@ workflows:
jobs:
- css_linting
- sunpy
- test_package
- website
52 changes: 26 additions & 26 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U --user --force-reinstall pep517 setuptools_scm twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_TOKEN }}
run: |
python -m pep517.build --binary --source --out-dir wheelhouse .
python -m twine upload --skip-existing wheelhouse/*
- name: Install dependencies
run: |
pip install requests httpie
- name: Build all RTD versions
env:
RTD_AUTH_TOKEN: ${{ secrets.RTD_AUTH_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
python rebuild_all_rtd.py
http POST https://api.netlify.com/api/v1/sites/1ba3a6d4-f1ee-4524-bbec-3edc04720a48/builds "Authorization: Bearer $NETLIFY_AUTH_TOKEN"
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -U --user --force-reinstall pep517 setuptools_scm twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_TOKEN }}
run: |
python -m pep517.build --binary --source --out-dir wheelhouse .
python -m twine upload --skip-existing wheelhouse/*
- name: Install dependencies
run: |
pip install requests httpie
- name: Build all RTD versions
env:
RTD_AUTH_TOKEN: ${{ secrets.RTD_AUTH_TOKEN }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
python rebuild_all_rtd.py
http POST https://api.netlify.com/api/v1/sites/1ba3a6d4-f1ee-4524-bbec-3edc04720a48/builds "Authorization: Bearer $NETLIFY_AUTH_TOKEN"
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,19 @@ ENV/
# vim tmp files
*~

# test_package
test_package/docs/_build
test_package/docs/generated
test_package/docs/api
# vscode
.history
.vscode

# temp directory that tox uses
.tmp

# Docs
docs/generated/
docs/sg_execution_times.rst
docs/autoapi/
docs/api/

# node
node_modules
.nodeenv
72 changes: 41 additions & 31 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,54 @@ ci:
autofix_prs: false
autoupdate_schedule: "quarterly"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.5"
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=lf']
- id: trailing-whitespace

- repo: https://github.com/PyCQA/autoflake
- id: ruff
args: ["--fix"]
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']

- repo: https://github.com/PyCQA/docformatter
- id: autoflake
args:
[
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variable",
]
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
args: ['--make-summary-multi-line', '--pre-summary-newline', '-ri']

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
args: ["--make-summary-multi-line", "--pre-summary-newline", "-ri"]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.11.0
- id: isort
- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [css, scss, javascript]
types_or: [css, scss, javascript, rst, json, yaml, toml, markdown]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
args: ["--write-changes"]
8 changes: 4 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ formats:
- htmlzip

python:
install:
- method: pip
extra_requirements:
install:
- method: pip
extra_requirements:
- all
- docs
path: .
path: .
6 changes: 3 additions & 3 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "stylelint-config-recommended",
"rules": {
"no-descending-specificity": null,
"selector-pseudo-element-no-unknown": null
}
"no-descending-specificity": null,
"selector-pseudo-element-no-unknown": null
}
}
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
- 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.

Expand Down
5 changes: 3 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
recursive-include src/sunpy_sphinx_theme/sunpy/ *
exclude rebuild_all_rtd.py
exclude tox.ini
exclude .gitignore
exclude .pre-commit-config.yaml
exclude .stylelintrc
prune .circleci/
prune .github/
prune test_package/
prune docs/
prune examples/
recursive-include src/sunpy_sphinx_theme/sunpy/ *
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# SunPy Sphinx Theme
# SunPy Project Sphinx Theme

[![PyPI version](https://badge.fury.io/py/sunpy-sphinx-theme.svg)](https://badge.fury.io/py/sunpy-sphinx-theme)

This repository contains the sphinx theme used by the Sunpy Project for its website and documentation.
This repository contains the sphinx theme used by The Sunpy Project for all online resources.

This theme is a derivitive of the excellent [pydata-sphinx-theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html), customised to present a uniform navigation over all the sunpy projects.
This theme is a derivative of the excellent [pydata-sphinx-theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html), customised to present a uniform navigation over all the projects.

For more information see the [documentation](https://sunpy-sphinx-theme.readthedocs.io/).
5 changes: 5 additions & 0 deletions docs/code_ref/animals.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*******
Animals
*******

.. automodapi:: test_package.animals
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
.. _reference:

*************
API Reference
*************

.. toctree::
:maxdepth: 2
:maxdepth: 1

stuff
timerange
animals
timerange
File renamed without changes.
Loading

0 comments on commit dcf40a4

Please sign in to comment.