Skip to content

Commit

Permalink
Fixes to docs and Actions (#3)
Browse files Browse the repository at this point in the history
Consolidate down to two workflow files and update docs so that Pages render correctly.

Signed-off-by: Brian Warner <[email protected]>
  • Loading branch information
brianwarner committed Oct 7, 2024
1 parent d4f7d71 commit 30c470f
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 60 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/lint-and-test.yml

This file was deleted.

29 changes: 28 additions & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,46 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Build and generate documentation
name: Test, build, and generate docs

on:
push:
branches:
- '**'
- '!main'

permissions:
contents: write
pull-requests: write

jobs:
test:
name: Test Python versions
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The project default is 100 char lines
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
- name: Test with pytest
run: |
pytest
build:
name: Build and generate documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
name: Publish to PyPI
name: Test, build, generate docs, and publish to PyPI

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
test:
name: Test Python versions
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The project default is 100 char lines
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
- name: Test with pytest
run: |
pytest
pypi-publish:
name: Upload release to PyPI and update documentation
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3465a6806a3b92c70a28cd34d52c2769
config: fe61de21a3a9d7528fb262fe40f5d7fe
tags: 645f666f9bcd5a90fca523b33c5a78b7
6 changes: 3 additions & 3 deletions docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; talkGooder 0.0.post1.dev1+g0b9d8fa documentation</title>
<title>Overview: module code &mdash; talkGooder 0.0.post1.dev1+g537ac29 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />

Expand All @@ -14,7 +14,7 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=d291d440"></script>
<script src="../_static/documentation_options.js?v=bc26ecae"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
Expand All @@ -36,7 +36,7 @@
talkGooder
</a>
<div class="version">
0.0.post1.dev1+g0b9d8fa
0.0.post1.dev1+g537ac29
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions docs/_modules/talkgooder.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>talkgooder &mdash; talkGooder 0.0.post1.dev1+g0b9d8fa documentation</title>
<title>talkgooder &mdash; talkGooder 0.0.post1.dev1+g537ac29 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />

Expand All @@ -14,7 +14,7 @@

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="../_static/documentation_options.js?v=d291d440"></script>
<script src="../_static/documentation_options.js?v=bc26ecae"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/js/theme.js"></script>
Expand All @@ -36,7 +36,7 @@
talkGooder
</a>
<div class="version">
0.0.post1.dev1+g0b9d8fa
0.0.post1.dev1+g537ac29
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
Expand Down
2 changes: 1 addition & 1 deletion docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const DOCUMENTATION_OPTIONS = {
VERSION: '0.0.post1.dev1+g0b9d8fa',
VERSION: '0.0.post1.dev1+g537ac29',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
6 changes: 3 additions & 3 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; talkGooder 0.0.post1.dev1+g0b9d8fa documentation</title>
<title>Index &mdash; talkGooder 0.0.post1.dev1+g537ac29 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />

Expand All @@ -14,7 +14,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d291d440"></script>
<script src="_static/documentation_options.js?v=bc26ecae"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand All @@ -36,7 +36,7 @@
talkGooder
</a>
<div class="version">
0.0.post1.dev1+g0b9d8fa
0.0.post1.dev1+g537ac29
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>talkGooder documentation &mdash; talkGooder 0.0.post1.dev1+g0b9d8fa documentation</title>
<title>talkGooder documentation &mdash; talkGooder 0.0.post1.dev1+g537ac29 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />

Expand All @@ -15,7 +15,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d291d440"></script>
<script src="_static/documentation_options.js?v=bc26ecae"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand All @@ -37,7 +37,7 @@
talkGooder
</a>
<div class="version">
0.0.post1.dev1+g0b9d8fa
0.0.post1.dev1+g537ac29
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
2 changes: 1 addition & 1 deletion docs/objects.inv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sphinx inventory version 2
# Project: talkGooder
# Version: 0.0.post1.dev1+g0b9d8fa
# Version: 0.0.post1.dev1+g537ac29
# The remainder of this file is compressed using zlib.
xڍ���0E�����D\�ce\����>�����R� �{��������p��v�2<H���5^�M��(�8c���-�� �!�*?�p��մj�4��Z,��q�:' G�Q 8� ɮ(��0�Ǹ$_��*B">���ˠP{��Y�l�vt,�J?�M��������v�l��Ŕ%��3���M��p
6 changes: 3 additions & 3 deletions docs/py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Module Index &mdash; talkGooder 0.0.post1.dev1+g0b9d8fa documentation</title>
<title>Python Module Index &mdash; talkGooder 0.0.post1.dev1+g537ac29 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />

Expand All @@ -14,7 +14,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d291d440"></script>
<script src="_static/documentation_options.js?v=bc26ecae"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand Down Expand Up @@ -43,7 +43,7 @@
talkGooder
</a>
<div class="version">
0.0.post1.dev1+g0b9d8fa
0.0.post1.dev1+g537ac29
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
6 changes: 3 additions & 3 deletions docs/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; talkGooder 0.0.post1.dev1+g0b9d8fa documentation</title>
<title>Search &mdash; talkGooder 0.0.post1.dev1+g537ac29 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />

Expand All @@ -15,7 +15,7 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=d291d440"></script>
<script src="_static/documentation_options.js?v=bc26ecae"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
Expand All @@ -39,7 +39,7 @@
talkGooder
</a>
<div class="version">
0.0.post1.dev1+g0b9d8fa
0.0.post1.dev1+g537ac29
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="#" method="get">
Expand Down
2 changes: 1 addition & 1 deletion docsrc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
sys.path.insert(0, os.path.abspath("../src/talkgooder"))
sys.path.insert(0, os.path.abspath(".."))

from _version import __version__ as version # noqa E402, must update path before use
from _version import __version__ as version # noqa E402 # type: ignore # won't exist until build

extensions = [
"sphinx.ext.autodoc",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

[project.urls]
Homepage = "https://github.com/brianwarner/indifferent"
Documentation = ""
Documentation = "https://bdwarner.com/talkgooder/"
Repository = "https://github.com/brianwarner/indifferent"
Issues = "https://github.com/brianwarner/indifferent/issues"

Expand Down

0 comments on commit 30c470f

Please sign in to comment.