Skip to content

Commit

Permalink
Update for newest release of towncrier (#23)
Browse files Browse the repository at this point in the history
* What would sutart do without nabil?

* Changelog

* Update setup.cfg and tox.ini

* Update tox.ini

Co-authored-by: Stuart Mumford <stuart@cadair.com>

* Update .readthedocs.yml

Co-authored-by: Stuart Mumford <stuart@cadair.com>

* Apply suggestions from code review

* Apply suggestions from code review

---------

Co-authored-by: Stuart Mumford <stuart@cadair.com>
  • Loading branch information
nabobalis and Cadair committed Jan 26, 2024
1 parent cc17da8 commit 05108d7
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 43 deletions.
9 changes: 4 additions & 5 deletions .github/dependabot.yml
@@ -1,11 +1,10 @@
# Configure dependabot to automatically open PRs for bumping the hard pin of towncrier.

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "pip"
directory: "/"
versioning-strategy: "increase"
schedule:
interval: "weekly"
allow:
- package-name: "towncrier"
- dependency-name: "towncrier"
dependency-type: "direct"
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Expand Up @@ -32,7 +32,6 @@ jobs:
- linux: build_docs
- linux: build_docs_devtowncrier
notify:
if: always() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
needs: [tests]
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -60,25 +60,25 @@ repos:
# W605 - Fix invalid escape sequence 'x'.
# W690 - Fix various deprecated code (via lib2to3).
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
args: ['--count', '--select', 'E101,E11,E111,E112,E113,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,E401,E402,E502,E701,E711,E712,E713,E714,E722,E731,E901,E902,F822,F823,W191,W291,W292,W293,W391,W601,W602,W603,W604,W605,W690']
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|docs/conf.py)$"
- repo: https://github.com/myint/autoflake
rev: v2.0.1
rev: v2.2.1
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|sunpy/extern|docs/conf.py)$"
- repo: https://github.com/timothycrosley/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ['--sp','setup.cfg']
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|cm/__init__.py|sunpy/extern|docs/conf.py)$"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-ast
- id: check-case-conflict
Expand Down
17 changes: 10 additions & 7 deletions .readthedocs.yml
@@ -1,19 +1,22 @@
# readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
post_checkout:
- git fetch --unshallow || true
pre_install:
- git update-index --assume-unchanged docs/conf.py

sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: true

python:
version: 3.8
install:
# Any extra pip dependencies not installed via extras should be specified
# in the conda environment file.
- method: pip
extra_requirements:
- docs
Expand Down
1 change: 1 addition & 0 deletions changelog/23.breaking.1.rst
@@ -0,0 +1 @@
Increased minimum Python version to 3.8 to match towncrier.
1 change: 1 addition & 0 deletions changelog/23.breaking.rst
@@ -0,0 +1 @@
Increased towncrier version to 23.11.0
6 changes: 2 additions & 4 deletions setup.cfg
Expand Up @@ -11,15 +11,13 @@ long_description = file: README.rst
[options]
zip_safe = False
packages = find:
python_requires = >=3.6
python_requires = >=3.8
setup_requires = setuptools_scm
install_requires =
sphinx
towncrier==23.6.0
importlib-resources>=5; python_version<'3.10'
towncrier==23.11.0

[options.extras_require]
all =
test =
pytest
pytest-cov
Expand Down
25 changes: 3 additions & 22 deletions tox.ini
@@ -1,36 +1,17 @@
[tox]
minversion = 4.0.0
envlist =
build_docs{,_latesttowncrier}
build_docs
build_docs{,_devtowncrier}
codestyle
isolated_build = true
# This is included for testing of the template. You can remove it safely.
skip_missing_interpreters = True

[testenv]
# Pass through the following environment variables which may be needed for the CI
passenv = HOME,WINDIR,LC_ALL,LC_CTYPE,CC,CI,TRAVIS

# Run the tests in a temporary directory to make sure that we don't import
# the package from the source tree
changedir = .tmp/{envname}

# tox environments are constructed with so-called 'factors' (or terms)
# separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor:
# will only take effect if that factor is included in the environment name. To
# see a list of example environments that can be run, along with a description,
# run:
#
# tox -l -v
#
description =
run tests

deps =
# The following indicates which extras_require from setup.cfg will be installed
extras =
test
alldeps: all
extras = test

[testenv:codestyle]
skip_install = true
Expand Down

0 comments on commit 05108d7

Please sign in to comment.