Skip to content

Commit

Permalink
Merge pull request #112 from ewjoachim/upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ewjoachim authored Jul 25, 2023
2 parents e1fc2a0 + 30a0b62 commit 239f652
Show file tree
Hide file tree
Showing 11 changed files with 815 additions and 883 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ on:
pull_request:
push:
branches:
- 'main'
- "main"
tags:
- '*'
- "*"

jobs:
build:

strategy:
matrix:
include:
- python_version: 3.7
- python_version: "3.8"
script: tests
- python_version: "3.9"
script: tests
- python_version: 3.8
- python_version: "3.10"
script: tests
- python_version: 3.9
- python_version: "3.11"
script: tests

name: "py${{ matrix.python_version }} / ${{ matrix.script }}"
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: "22.6.0"
rev: "23.7.0"
hooks:
- id: black

Expand All @@ -29,14 +29,14 @@ repos:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.961"
rev: "v1.4.1"
hooks:
- id: mypy
files: ^sphinx_github_changelog/
additional_dependencies: ["types-requests", "types-docutils"]

- repo: https://github.com/asottile/pyupgrade
rev: "v3.3.1"
rev: "v3.9.0"
hooks:
- id: pyupgrade

Expand All @@ -46,6 +46,6 @@ repos:
- id: doc8

- repo: https://github.com/floatingpurr/sync_with_poetry
rev: 0.4.0
rev: 1.1.0
hooks:
- id: sync_with_poetry
12 changes: 9 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ version: 2
sphinx:
fail_on_warning: true

python:
install:
- requirements: docs/requirements.txt
build:
os: ubuntu-20.04
tools:
python: "3.10"
jobs:
post_install:
- pip install -U poetry
- poetry config virtualenvs.create false
- poetry install --with docs
21 changes: 4 additions & 17 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,15 @@ Contributing

You're welcome to come and bake delicious macaroons with us :)

This project uses Poetry_, pre-commit_ and tox_. We recommand installing those with
This project uses Poetry_ and pre-commit_. We recommand installing those with
pipx_.

.. _Poetry: https://python-poetry.org/
.. _pre-commit: https://pre-commit.com
.. _pipx: https://pipxproject.github.io/pipx/installation/
.. _tox: https://tox.readthedocs.io/en/latest/

There are multiple ways of interacting with the project.

I just want to run the CI checks locally
----------------------------------------

.. code-block:: console
$ tox
Of course, you can launch a single environment (see ``tox.ini`` for details on each
environment). For a full run, you'll need to have all the Python versions that this lib
supports, installed locally (but it's ok to do a partial run, that's why the CI is for).

I want to run the code quality tools
------------------------------------

Expand Down Expand Up @@ -68,15 +56,15 @@ Build with:

.. code-block:: console
$ tox -e docs
$ scripts/docs
$ python -m webbrowser docs/_build/html/index.html
Run spell checking on the documentation (optional):

.. code-block:: console
$ sudo apt install enchant
$ tox -e docs-spelling
$ scripts/docs-spelling
Because of outdated software and version incompatibilities, spell checking is not
checked in the CI, and we don't require people to run it in their PR. Though, it's
Expand All @@ -87,8 +75,7 @@ If you need to add words to the spell checking dictionary, it's in
``docs/spelling_wordlist.txt``. Make sure the file is alphabetically sorted.

If Sphinx's console output is localized and you would rather have it in English,
use the environment variable ``LC_ALL=C.utf-8`` (either exported or attached to the
``tox`` process)
use the environment variable ``LC_ALL=C.utf-8``.

I want to hack around
---------------------
Expand Down
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ Extension options (``conf.py``)
-------------------------------

- ``sphinx_github_changelog_token``: GitHub API token.
If the repository is public, the token doesn't need any special access (you can uncheck
eveything). If the repository is private, you'll need to give your token enough access
to read the releases.
Defaults to the value of the environment variable ``SPHINX_GITHUB_CHANGELOG_TOKEN``.
If no value is provided, the build will still pass but the changelog will not be
built, and a link to the ``changelog-url`` will be displayed (if provided).
If the repository is public, the token doesn't need any special access (you
can uncheck eveything). If the repository is private, you'll need to give
your token enough access to read the releases. Defaults to the value of the
environment variable ``SPHINX_GITHUB_CHANGELOG_TOKEN``. If no value is
provided, the build will still pass but the changelog will not be built, and
a link to the ``changelog-url`` will be displayed (if provided).

.. _ReadTheDocs: https://readthedocs.org/

Expand Down
7 changes: 0 additions & 7 deletions docs/requirements.txt

This file was deleted.

Loading

0 comments on commit 239f652

Please sign in to comment.