-
Notifications
You must be signed in to change notification settings - Fork 6
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
Theme update #58
Merged
Merged
Theme update #58
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
814301c
Update Python to 3.11, Sphinx to 5.0, sphinx_book_theme to 1.0.0
erogluorhan 2c661e2
Updated RTD Python to 3.11
erogluorhan 66ebce0
Update sphinx-book-theme to 1.0.0. (1.1.0 is not yet supported by lat…
erogluorhan 4046c93
Update Copyright year in docs/_config.yml and docs/conf.py
erogluorhan fe07c7c
Add sphinx-design and change 'tabbed' directives to 'tab-set-code'
erogluorhan 4b164a0
Fix the depreations, layout changes since book-theme 0.1.10
erogluorhan 050ceb9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] be8c865
Remove sphinx-book-theme upper version pinning
erogluorhan cffb2aa
Merge branch 'theme-update' of github.com:ProjectPythia/sphinx-pythia…
erogluorhan 003b14c
Fix RTD
erogluorhan ff7377d
Fix sphinx-tabs
erogluorhan abc529b
Fix RTD by removing conda
erogluorhan 81e5f35
Add ci fodler and docs.yml
erogluorhan 510ea1c
Fix docs
erogluorhan 400c9af
Add environment.yml fil
erogluorhan 70e7d8a
Fix publish
erogluorhan e30967c
Remove environment and update ci.yml a bit
erogluorhan 190c200
Change conda list to pip list
erogluorhan eaff689
Remove sphinx inline tabs per review suggestion
erogluorhan a89e2d4
Separate pypi publishing from ci.yaml
erogluorhan b06f514
Migrate PyPI publishing to build invocations
erogluorhan 94b1403
Update MANIFEST.in
erogluorhan b60dea0
Theme update - Update all the layout sections/components and css feat…
erogluorhan ae0cc04
Fix navbar colors
erogluorhan fab3fd8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 28544bf
Fix navbar colors
erogluorhan 5eb07cd
Fix navbar colors
erogluorhan 29af999
Update layout and theme.scss to fix issues on foundations pages
erogluorhan 9283653
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 792875d
Move pypi.yaml to under github/workflows
erogluorhan 9d898e6
Correct an email to projectpythia's
erogluorhan fd5ebd8
Change pst-color-text-muted to fix too light navbar links
erogluorhan c76471f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,63 +7,48 @@ on: | |
tags: | ||
- '*' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
jupyterbook: | ||
name: Build Jupyter Book | ||
name: Build Jupyter Book and Sphinx Docs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ github.token }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
python-version: 3.11 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -e . | ||
python -m pip install . --no-deps | ||
|
||
- name: pip list | ||
run: | | ||
pip list | ||
|
||
- name: Download references from Sphinx Book Theme | ||
run: python docs/getreferences.py docs/references | ||
- name: Build Jupyter Book | ||
run: jupyter-book build docs | ||
run: | | ||
python docs/getreferences.py docs/references | ||
|
||
sphinx: | ||
name: Build Sphinx Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
- name: Build Jupyter Book | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -e . | ||
jupyter-book build docs | ||
|
||
- name: Build Sphinx documentation | ||
run: sphinx-build -b html docs docs/_build/html | ||
|
||
publish: | ||
name: Publish to PyPI | ||
needs: [jupyterbook, sphinx] | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install build dependecies | ||
run: pip install setuptools setuptools-scm wheel | ||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
- name: Publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Upload to PyPI | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
test-build: | ||
if: github.repository == 'ProjectPythia/sphinx-pythia-theme' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install build twine | ||
|
||
- name: Build tarball and wheels | ||
run: | | ||
git clean -xdf | ||
git restore -SW . | ||
python -m build | ||
|
||
- name: Test the built artifacts | ||
run: | | ||
python -m twine check --strict dist/* | ||
pwd | ||
if [ -f dist/sphinx-pythia-theme-0.0.0.tar.gz ]; then | ||
echo "❌ INVALID VERSION NUMBER" | ||
exit 1 | ||
else | ||
echo "✅ Looks good" | ||
fi | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: releases | ||
path: dist | ||
|
||
publish: | ||
needs: test-build | ||
if: github.event_name == 'release' | ||
runs-on: ubuntu-latest | ||
|
||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/sphinx-pythia-theme | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: releases | ||
path: dist | ||
|
||
- name: Publish package to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: sphinx-pythia-theme-docs | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python<3.12 | ||
- pip | ||
- pip: | ||
- -r ../requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This can be replaced by built in
concurrency
- https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/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.
Thanks a lot; wasn't aware of this key. Just went over its docs and found it a bit more complicated than what is currently here (e.g. defining groups, specifying if concurrency for PR numbers, etc.), though please feel free to push the change if you'd like that better (and maybe find it more useful than the one here).
If I were to implement it, should it look something like this:
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.
Sorry, I didn't see this outstanding question. Yes, the concurrency group just needs to be non-unique for the same PR e.g.
This ensures that if the run doesn't have a
head_ref
(non-PRs), then it falls back to a unique identifier.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.
No worries! FYI: The theme update is working now, and its proper functioning (with a few non-vital issues) has been confirmed through tests by a few team members. It is a bit time sensitive before our upcoming community event; hence, I'd like to get it merged and go forward to be used by our portal.
I've created a new issue though to address this suggestion.
Thanks very much for all your help and review!