Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Commit

Permalink
Updates (#41)
Browse files Browse the repository at this point in the history
* pre-commit autoupdate

* pre-commit run --all-files

* updated configuration

* updated autodoc pydantic details

* updated readme

* support bump workflow
  • Loading branch information
yarnabrina authored Apr 6, 2024
1 parent c2d0b07 commit 8850fd9
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 16 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: bump-workflow-name
run-name: bump workflow run name
on:
workflow_dispatch:
inputs:
semantic-version-identifier:
description: name of protected semantic version
required: true
type: choice
options:
- major
- minor
- patch
defaults:
run:
shell: bash
jobs:
bump-job-identifier:
name: bump job name
runs-on: ubuntu-latest
environment: ${{ inputs.github-environment-identifier }}
steps:
- name: checkout commit
uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v5
with:
python-version: "3.10"
check-latest: true
architecture: x64
cache: pip
- id: install-step-identifier
name: install bump-my-version
run: python3 -m pip install bump-my-version
shell: bash
- id: branch-step-identifier
name: create new branch
run: git switch --create bump-package-version
shell: bash
- id: bump-step-identifier
name: bump package version
env:
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER_NAME }}
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
run: bump-my-version bump ${{ inputs.semantic-version-identifier }}
shell: bash
- id: pull-request-step-identifier
name: create new pull-request
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr create --base main --fill --head bump-package-version --label maintenance --label bump-package
shell: bash
32 changes: 21 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,45 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.15.2
hooks:
- id: pyupgrade
args:
- --keep-runtime-typing
- --py310-plus
stages:
- manual
- repo: https://github.com/pycqa/autoflake
rev: v2.2.1
rev: v2.3.1
hooks:
- id: autoflake
args:
- src
pass_filenames: false
stages:
- manual
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args:
- src
pass_filenames: false
stages:
- manual
- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.3.0
hooks:
- id: black
additional_dependencies:
- .[jupyter]
args:
- src
pass_filenames: false
stages:
- manual
- repo: https://github.com/pycqa/bandit
rev: 1.7.7
rev: 1.7.8
hooks:
- id: bandit
args:
Expand All @@ -76,8 +84,10 @@ repos:
args:
- src
pass_filenames: false
stages:
- manual
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
Expand All @@ -89,7 +99,7 @@ repos:
stages:
- manual
- repo: https://github.com/PyCQA/pylint
rev: v3.0.3
rev: v3.1.0
hooks:
- id: pylint
args:
Expand All @@ -100,14 +110,14 @@ repos:
stages:
- manual
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.350
rev: v1.1.357
hooks:
- id: pyright
pass_filenames: false
stages:
- manual
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.1
rev: v0.3.5
hooks:
- id: ruff
args:
Expand All @@ -118,7 +128,7 @@ repos:
- src
pass_filenames: false
- repo: https://github.com/jendrikseipp/vulture
rev: v2.10
rev: v2.11
hooks:
- id: vulture
pass_filenames: false
Expand Down Expand Up @@ -149,7 +159,7 @@ repos:
- src
pass_filenames: false
- repo: https://github.com/numpy/numpydoc
rev: v1.6.0
rev: v1.7.0
hooks:
- id: numpydoc-validation
stages:
Expand All @@ -173,7 +183,7 @@ repos:
stages:
- manual
- repo: https://github.com/crate-ci/typos
rev: v1.18.2
rev: v1.20.4
hooks:
- id: typos
args:
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
- [x] ~~Hypotheses Testing~~
- [x] ~~Pydantic Validation~~
- [x] ~~Support Expressions~~
- [ ] Bump Workflow
- [x] ~~Bump Workflow~~

## Tools Used

Expand Down Expand Up @@ -64,10 +64,16 @@
- [Hypothesis](https://hypothesis.works/)
- [pytest](https://docs.pytest.org/en/latest/)
- Documentation
- [autodoc_pydantic](https://github.com/mansenfranzen/autodoc_pydantic)
- [Furo](https://github.com/pradyunsg/furo)
- [Read the Docs](https://readthedocs.org/)
- [Sphinx](https://www.sphinx-doc.org/)
- [sphinx-copybutton](https://github.com/executablebooks/sphinx-copybutton)
- Release
- [Bump My Version](https://github.com/callowayproject/bump-my-version)
- [build](https://build.pypa.io/)
- [setuptools](https://github.com/pypa/setuptools)
- [Twine](https://twine.readthedocs.io/)

[bandit-badge-image]: https://img.shields.io/badge/security-bandit-yellow.svg
[bandit-badge-url]: https://github.com/PyCQA/bandit
Expand Down
24 changes: 22 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ dependencies = [
]
[project.optional-dependencies]
all = [
"autodoc-pydantic",
"autodoc_pydantic",
"autoflake",
"bandit",
"black",
"blacken-docs",
"build",
"bump-my-version",
"codespell[toml]",
"coverage[toml]",
"docformatter[tomli]",
Expand Down Expand Up @@ -99,7 +100,7 @@ dev = [
"typos",
]
doc = [
"autodoc-pydantic",
"autodoc_pydantic",
"furo",
"myst-parser[linkify]",
"Sphinx",
Expand All @@ -126,6 +127,7 @@ lint = [
]
release = [
"build",
"bump-my-version",
"twine",
]
test = [
Expand Down Expand Up @@ -387,6 +389,24 @@ directory = "coverage_html_report"
[tool.coverage.xml]
output = "coverage_xml_report.xml"

[tool.bumpversion]
allow_dirty = false
commit = true
current_version = "0.0.5"
ignore_missing_files = false
ignore_missing_version = false
message = "Bump version: {current_version} → {new_version}"
parse = "(?P<major>0|[1-9]\\d*)\\.(?P<minor>0|[1-9]\\d*)\\.(?P<patch>0|[1-9]\\d*)"
regex = false
replace = "{new_version}"
search = "{current_version}"
serialize = [
"{major}.{minor}.{patch}",
]
tag = false
[[tool.bumpversion.files]]
filename = "src/package_name_to_import_with/metadata.json"

[tool.mypy]
files = [
"src",
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.doc.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
autodoc-pydantic
autodoc_pydantic
furo
myst-parser[linkify]
Sphinx
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements.release.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
bump-my-version
twine
2 changes: 1 addition & 1 deletion src/package_name_to_import_with/simplify.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Evaluate simplification expressions."""

import collections.abc # noqa: TCH003
import collections.abc
import enum
import re
import string
Expand Down

0 comments on commit 8850fd9

Please sign in to comment.