-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update to 3.12 * fix: branch name in github validate workflow * add tests
- Loading branch information
Showing
12 changed files
with
923 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Defines the coding style for different editors and IDEs. | ||
# http://editorconfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Rules for source code. | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true | ||
|
||
# Rules for Python code. | ||
[*.py] | ||
indent_size = 4 | ||
|
||
# Rules for markdown documents. | ||
[*.md] | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
|
||
# Rules for makefile | ||
[Makefile] | ||
indent_style = tab | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools poetry tox-gh-actions | ||
poetry install | ||
- name: Build wheels and source tarball | ||
run: poetry build | ||
- name: publish to PyPi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
skip_existing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Validate | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
- main | ||
- 'release/**' | ||
pull_request: | ||
branches: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools poetry | ||
poetry install | ||
- name: Linting | ||
run: | | ||
poetry run isort . | ||
poetry run black . | ||
poetry run flake8 . --extend-ignore=D,E501,W601 --extend-exclude=docs/ --statistics --count | ||
- name: Security | ||
run: poetry run bandit -c pyproject.toml -r . | ||
- name: Testing | ||
run: python -m unittest discover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,58 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Pycharm | ||
.idea/ | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
*.py[co] | ||
*.swp | ||
*.bak | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
# docs | ||
_build | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.tox | ||
|
||
.idea | ||
|
||
# Translations | ||
.DS_Store | ||
|
||
#Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
#Mr Developer | ||
.mr.developer.cfg | ||
|
||
# Configuration | ||
sdelint.cnf | ||
|
||
#generated data | ||
usecases/output.csv | ||
|
||
# Test files | ||
info.log | ||
htmlcov/ | ||
|
||
#ides | ||
.idea | ||
.vscode | ||
|
||
#custom cert bundle | ||
my_root_certs.crt | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
# symbolic links | ||
.flake8 | ||
|
||
# PyBuilder | ||
target/ | ||
conf/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
repos: | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.1.13 | ||
hooks: | ||
- id: forbid-crlf | ||
- id: remove-crlf | ||
- id: forbid-tabs | ||
exclude_types: [csv] | ||
- id: remove-tabs | ||
exclude_types: [csv] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
args: [--unsafe] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.10.1 | ||
hooks: | ||
- id: isort | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
language_version: python3.12 | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-typing-imports==1.10.0] | ||
exclude: ^tests | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
lint: | ||
find . -name '*.py' | egrep -v './doc' | xargs flake8 --ignore=E501,W601 | ||
flake8 . --extend-ignore=D,E501,W601 --extend-exclude=docs/ --statistics --count |
Oops, something went wrong.