-
Notifications
You must be signed in to change notification settings - Fork 10
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
FEAT: Initial migration to the present 🏃 #25
base: master
Are you sure you want to change the base?
Changes from all commits
88b0420
ca1a75a
20f7058
c86275d
8a02a5a
a26c2c9
add0f19
bbabc50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Python CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
#---------------------------------------------- | ||
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.6.1 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root -E develop | ||
|
||
- name: Run tests with pytest | ||
run: poetry run pytest | ||
|
||
- name: Run type checks with mypy | ||
run: poetry run mypy sphinxcontrib | ||
|
||
- name: Run style checks | ||
run: | | ||
poetry run isort --check-only --diff sphinxcontrib tests | ||
poetry run yapf --diff sphinxcontrib tests | ||
poetry run flake8 sphinxcontrib tests |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 # Use the latest version from the pre-commit-hooks repository | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 4.0.1 # Use the latest version of flake8 | ||
hooks: | ||
- id: flake8 | ||
|
||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.10.1 # Use the latest version of isort | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/asottile/black | ||
rev: 22.3.0 # Use the latest version of black | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.931 # Use the latest version of mypy | ||
hooks: | ||
- id: mypy |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# {{ cookiecutter.project_name }} | ||
|
||
{{ cookiecutter.short_description}} | ||
|
||
## Overview | ||
|
||
Add a longer description here. | ||
|
||
## Links | ||
|
||
- Source: <https://github.com/{{ cookiecutter.github_org }}/{{ cookiecutter.project_name }} /> | ||
- Bugs: <https://github.com/{{ cookiecutter.github_org }}/{{ cookiecutter.project_name }}/issues /> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
[tool.poetry] | ||
name = "{{ cookiecutter.project_name }}" | ||
version = "{{cookiecutter.version}}" | ||
description = "{{ cookiecutter.short_description }}" | ||
authors = ["{{ cookiecutter.author_name }} <{{ cookiecutter.author_email }}>"] | ||
homepage = "{{ cookiecutter.home_page }}" | ||
license = "BSD" # Replace with your project's license, if different | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Environment :: Console", | ||
"Environment :: Web Environment", | ||
"Framework :: Sphinx :: Extension", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: BSD License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These don't match the CI configuration. Could you update? |
||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Topic :: Documentation", | ||
"Topic :: Documentation :: Sphinx", | ||
"Topic :: Utilities" | ||
] | ||
|
||
|
||
[tool.poetry.dependencies] | ||
python = "^3.6" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 3.8? |
||
pbr = "^5.5.1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tbh, pbr probably isn't the best horse to back now. Could we use setuptools here? Later actually you us poetry so this should be wholly unnecessary? |
||
|
||
pytest = {version="*", optional=true} | ||
sphinx = {version="*", optional=true} | ||
mypy = {version="*", optional=true} | ||
flake8 ={version="*", optional=true} | ||
|
||
[tool.poetry.extras] | ||
develop = [ | ||
"pytest", | ||
"sphinx", | ||
"mypy", | ||
"flake8" | ||
] | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.mypy] | ||
python_version = "3.8" | ||
show_column_numbers = true | ||
show_error_context = true | ||
ignore_missing_imports = true | ||
follow_imports = "skip" | ||
incremental = true | ||
check_untyped_defs = true | ||
warn_unused_ignores = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd drop this. I suspect mypy is rarely used in most sphinx extensions. |
||
|
||
[tool.flake8] | ||
show-source = true | ||
builtins = "unicode" |
This file was deleted.
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 isn't the latest (none of these are). Could you bump?