Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/pip/idna-3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ITProKyle authored Apr 16, 2024
2 parents 662ce49 + 4b7e978 commit d9cf87e
Show file tree
Hide file tree
Showing 13 changed files with 1,288 additions and 3,253 deletions.
38 changes: 0 additions & 38 deletions .flake8

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/label-maker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run Label Maker
uses: crazy-max/ghaction-github-labeler@v4 # cspell:ignore ghaction
uses: crazy-max/ghaction-github-labeler@v5 # cspell:ignore ghaction
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-pr-target-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: Label PR
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.20.1
- uses: release-drafter/release-drafter@v6.0.0
with:
disable-releaser: true
env:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
matrix:
python-version: [3.9, '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
Expand All @@ -36,8 +36,8 @@ jobs:
# v1.1.1 was tested but did not function as desired so we are using the CLI.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
Expand All @@ -50,7 +50,7 @@ jobs:
matrix:
python-version: [3.9, '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ITProKyle/[email protected]
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
name: Draft Release
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5.20.1
- uses: release-drafter/release-drafter@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
*$py.class
**/.secrets
*.cover
*.egg
*.egg-info/
Expand Down
30 changes: 14 additions & 16 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: '3.10'

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
install:
- method: pip
path: .
extra_requirements:
- docs
python: '3.12'
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
- poetry self add "poetry-dynamic-versioning[plugin]"
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
11 changes: 10 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@
}
],
"ignorePaths": [
"**/*.egg-info/**",
"**/*.css",
"**/*.egg-info/**",
"**/*.js",
"**/*.pyc",
"**/*.ts",
"**/.git",
"**/.github/labels.yml",
"**/.gitignore",
"**/.venv/**",
"**/.vscode/extensions.json",
"**/.vscode/settings.json",
"**/Pipfile.lock",
"**/__pycache__/**",
"**/build/**",
Expand Down Expand Up @@ -46,6 +51,7 @@
"words": [
"autofix",
"boto",
"botocore",
"direnv",
"docstrings",
"favicon",
Expand All @@ -57,6 +63,7 @@
"kwarg",
"labelmaker",
"maint",
"markdownlint",
"mdformat",
"noqa",
"overlining",
Expand All @@ -70,8 +77,10 @@
"subclassing",
"ungrouped",
"venv",
"venvpath",
"virtualenvs",
"winget",
"wontfix",
"xargs",
"yamlfmt"
]
Expand Down
59 changes: 19 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,84 +1,63 @@
.PHONY: docs

CI := $(if $(CI),yes,no)
SHELL := /bin/bash

help: ## show this message
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/:/'`); \
printf "%-30s %s\n" "target" "help" ; \
printf "%-30s %s\n" "------" "----" ; \
for help_line in $${help_lines[@]}; do \
IFS=$$':' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf '\033[36m'; \
printf "%-30s %s" $$help_command ; \
printf '\033[0m'; \
printf "%s\n" $$help_info; \
done
ifeq ($(CI), yes)
POETRY_OPTS = "-v"
PRE_COMMIT_OPTS = --show-diff-on-failure --verbose
endif

.PHONY: docs
docs: ## delete current HTML docs & build fresh HTML docs
@make -C docs docs
@$(MAKE) --no-print-directory -C docs docs

docs-changes: ## build HTML docs; only builds changes detected by Sphinx
@make -C docs html
@$(MAKE) --no-print-directory -C docs html

fix-black: ## automatically fix all black errors
@poetry run black .

fix-isort: ## automatically fix all isort errors
@poetry run isort .

fix-md: ## automatically fix markdown format errors
@poetry run pre-commit run mdformat --all-files

lint: lint-black lint-isort lint-pyright lint-flake8 ## run linters
lint: lint-black lint-pyright ## run linters

lint-black: ## run black
@echo "Running black... If this fails, run 'make fix-black' to resolve."
@poetry run black . --check --color --diff
@echo ""

lint-flake8: ## run flake8
@echo "Running flake8..."
@poetry run flake8
@echo ""

lint-isort: ## run isort
@echo "Running isort... If this fails, run 'make fix-isort' to resolve."
@poetry run isort . --check-only
@echo ""

lint-pyright: ## run pyright
@echo "Running pyright..."
@npx pyright --venv-path ./
@npm exec --no -- pyright --venvpath ./
@echo ""

open-docs: ## open docs (HTML files must already exists)
@make -C docs open
@$(MAKE) --no-print-directory -C docs open

run-pre-commit: ## run pre-commit for all files
@poetry run pre-commit run -a
@poetry run pre-commit run $(PRE_COMMIT_OPTS) \
--all-files \
--color always

setup: setup-poetry setup-pre-commit setup-npm ## setup dev environment

setup-npm: ## install node dependencies with npm
@npm ci

setup-poetry: ## setup python virtual environment
@poetry install \
--extras docs \
--remove-untracked
@poetry check
@poetry install $(POETRY_OPTS) --sync

setup-pre-commit: ## install pre-commit git hooks
@poetry run pre-commit install

spellcheck: ## run cspell
@echo "Running cSpell to checking spelling..."
@npx cspell "**/*" \
@npm exec --no -- cspell lint . \
--color \
--config .vscode/cspell.json \
--dot \
--gitignore \
--must-find-files \
--no-progress \
--relative \
Expand Down
Loading

0 comments on commit d9cf87e

Please sign in to comment.