-
Notifications
You must be signed in to change notification settings - Fork 114
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
Update, general cleanup and overall improvements #35
base: master
Are you sure you want to change the base?
Changes from 66 commits
d506024
8a6cb18
5a32898
cb7ef0c
0bd8d37
963c7b1
7234a88
552c1d5
fa247a0
c74049a
c639670
1f461e5
d38fe3c
6e6163f
6f8f1c5
9f4a8e4
09a59fc
8c8e673
628509b
eb3ce53
d48c248
ada781c
ccde2ac
9ddf7a8
ec5231f
2950a58
b0f29e2
1298138
38360d2
b150014
15b1fca
3e71c04
03f293e
b7d2533
4bdd63a
66778e4
c9f4e51
7fd6e73
ab9b9ac
27383e4
0befb31
aa1811b
a971431
3e53366
c3ee46d
7d6f3e7
b576312
fed6933
d28af7a
013d258
5d8a468
f69a8f4
395b2b6
82d2355
2af09a0
cb25f04
f7efcf5
38c6068
f1d1caf
a04e3ce
8bcc875
cc9a299
161b921
10145fd
fa07e9c
e55e48e
7f5b797
1ce407a
ff1d5a1
c898467
9436a14
3433381
d40c1ee
18c63ac
b8c4fca
75e672f
df0e0e3
40b0bba
209b469
429f9b6
a71bedc
214583f
f2088f9
1cf8876
ff4b462
90e4d49
c0d2172
63f2027
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,50 @@ | ||
# .gitattributes snippet to force users to use same line endings for project. | ||
# | ||
# Handle line endings automatically for files detected as text | ||
# and leave all files detected as binary untouched. | ||
* text=auto | ||
|
||
# | ||
# The above will handle all files NOT found below | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes | ||
|
||
|
||
|
||
# These files are text and should be normalized (Convert crlf => lf) | ||
*.php text | ||
*.css text | ||
*.js text | ||
*.json text | ||
*.htm text | ||
*.html text | ||
*.xml text | ||
*.txt text | ||
*.ini text | ||
*.inc text | ||
*.pl text | ||
*.rb text | ||
*.py text | ||
*.scm text | ||
*.sql text | ||
.htaccess text | ||
*.sh text | ||
|
||
# These files are binary and should be left untouched | ||
# (binary is a macro for -text -diff) | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.mov binary | ||
*.mp4 binary | ||
*.mp3 binary | ||
*.flv binary | ||
*.fla binary | ||
*.swf binary | ||
*.gz binary | ||
*.zip binary | ||
*.7z binary | ||
*.ttf binary | ||
*.pyc binary |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,41 @@ | ||||||||||||||||||||||
# This is a basic workflow to help you get started with Actions | ||||||||||||||||||||||
|
||||||||||||||||||||||
name: CI | ||||||||||||||||||||||
|
||||||||||||||||||||||
# Controls when the workflow will run | ||||||||||||||||||||||
on: # yamllint disable-line rule:truthy | ||||||||||||||||||||||
# Triggers the workflow on push or pull request events but only for the master branch | ||||||||||||||||||||||
push: | ||||||||||||||||||||||
branches: [master] | ||||||||||||||||||||||
pull_request: | ||||||||||||||||||||||
branches: [master] | ||||||||||||||||||||||
|
||||||||||||||||||||||
# Allows you to run this workflow manually from the Actions tab | ||||||||||||||||||||||
workflow_dispatch: | ||||||||||||||||||||||
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. Allow pushes/pr to all branches. Enough capacity to check everything.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||||||||||||||||||||||
jobs: | ||||||||||||||||||||||
# This workflow contains a single job called "build" | ||||||||||||||||||||||
build: | ||||||||||||||||||||||
# The type of runner that the job will run on | ||||||||||||||||||||||
runs-on: ${{ matrix.os }} | ||||||||||||||||||||||
strategy: | ||||||||||||||||||||||
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. add |
||||||||||||||||||||||
matrix: | ||||||||||||||||||||||
os: [ubuntu-latest, windows-latest] | ||||||||||||||||||||||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||||||||||||||||||||||
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. Extend to use 3.11 too |
||||||||||||||||||||||
# Steps represent a sequence of tasks that will be executed as part of the job | ||||||||||||||||||||||
steps: | ||||||||||||||||||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||||||||||||||||||||||
- uses: actions/checkout@v3 | ||||||||||||||||||||||
- name: Set up Python ${{ matrix.python-version }} | ||||||||||||||||||||||
uses: actions/setup-python@v3 | ||||||||||||||||||||||
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. Use v4 |
||||||||||||||||||||||
with: | ||||||||||||||||||||||
python-version: ${{ matrix.python-version }} | ||||||||||||||||||||||
- name: Display Python version | ||||||||||||||||||||||
run: python --version | ||||||||||||||||||||||
- name: Install dependencies | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
python -m pip install --upgrade pip | ||||||||||||||||||||||
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. No need to update pip |
||||||||||||||||||||||
pip install tox tox-gh-actions | ||||||||||||||||||||||
- name: Run tests | ||||||||||||||||||||||
run: tox -v |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
venv | ||
dist | ||
build | ||
*.py[co] | ||
*.egg-info | ||
__pycache__/ | ||
build/ | ||
.vscode/ | ||
.tox/ | ||
eggs/ | ||
.eggs/ | ||
*.egg-info/ | ||
~* | ||
.mypy_cache/ | ||
.pspp | ||
.cache/ | ||
.viminfo | ||
.idea/ | ||
desktop.ini | ||
.gitconfig | ||
.recommenders | ||
.metadata/ | ||
.venv/ | ||
venv/ | ||
__pycache__/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,233 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
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. Not needed |
||
minimum_pre_commit_version: 1.21.0 | ||
repos: | ||
- repo: https://github.com/ambv/black | ||
rev: stable | ||
- repo: meta | ||
hooks: | ||
- id: black | ||
args: [--line-length=79] | ||
language_version: python3.6 | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
types: [file, text] | ||
exclude_types: [html, javascript] | ||
- id: end-of-file-fixer | ||
types: [file, text] | ||
exclude_types: [html, javascript] | ||
- id: check-case-conflict | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
name: "Check for merge conflicts" | ||
- id: check-yaml | ||
name: "Yaml: Check files" | ||
types: [file, yaml] | ||
- id: check-toml | ||
name: "TOML: check toml syntax" | ||
types: [file, toml] | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.14.3 | ||
hooks: | ||
- id: check-github-workflows | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.26.3 # or higher tag | ||
hooks: | ||
- id: yamllint | ||
name: "Yaml: Linting files" | ||
args: [--format, parsable, --strict] | ||
types: [file, yaml] | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.1.13 | ||
hooks: | ||
- id: remove-tabs | ||
name: "Python: Convert Tabs to 4 spaces" | ||
args: ['--whitespaces-count', '4'] # defaults to: 4 | ||
types: [file, python] | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
hooks: | ||
- id: black | ||
name: "Python: Formating files" | ||
args: [--line-length=88, --preview, --safe] | ||
types: [file, python] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.32.1 | ||
hooks: | ||
- id: pyupgrade | ||
name: "Python: upgrade syntax" | ||
args: [--py37-plus] | ||
- repo: https://github.com/hadialqattan/pycln | ||
rev: v1.3.2 | ||
hooks: | ||
- id: pycln | ||
name: "Python: remove unused imports." | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.12.1 | ||
hooks: | ||
- id: blacken-docs | ||
name: "Python: Formating code in docstrings" | ||
additional_dependencies: [black==22.3] | ||
types: [file, python] | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: "Python: Sorting imports" | ||
types: [file, python] | ||
args: | ||
- "--multi-line=3" # makes this compatible with add-trailing-comma | ||
- "--trailing-comma" # makes this compatible with add-trailing-comma | ||
- "--profile" | ||
- "black" | ||
- repo: local | ||
hooks: | ||
- id: python_file_name_check | ||
name: "Python: File name check" | ||
entry: "python ./check_names.py" | ||
language: python | ||
pass_filenames: true | ||
types: [file, python] | ||
verbose: false | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: '4.0.1' # old 4.0.1 seem to freeze? | ||
hooks: | ||
- id: flake8 | ||
name: "Python: Linting files (flake8)" | ||
args: # arguments to configure flake8 | ||
# making isort line length compatible with black | ||
- "--max-line-length=88" | ||
- "--max-complexity=18" | ||
- "--kwargs-max-positional-arguments=4" | ||
# allowing these errors now that in the past we ignored. | ||
# D100 Missing docstring in public module | ||
# D103 Missing docstring in public function | ||
# D104 Missing docstring in public package | ||
# D105 Missing docstring in magic method | ||
# D107 Missing docstring in __init__ | ||
# D200 One-line docstring should fit on one line with quotes | ||
# D205 1 blank line required between summary line and description | ||
# D400 First line should end with a period | ||
# D401 First line should be in imperative mood | ||
# D403 First word of the first line should be properly capitalized | ||
# these are errors that will be ignored by flake8 | ||
# VNE002 variable name 'XXX' should be clarified | ||
# W503 see https://www.flake8rules.com/rules/W503.html no longer best practice | ||
# - "--ignore=VNE002,W503" | ||
# removed cohesion as it was causing issues with enum type classes | ||
# E203 spaces around ':' ignoring per https://github.com/psf/black/issues/315 | ||
# PD005 and PD011 falsely flag on other add or values methods | ||
- "--ignore=W503,E203, PD005, PD011" | ||
# when checking with wemake - "--ignore=W503,E203, PD005, PD011, WPS226, WPS112, WPS204, Q000, WPS421, WPS305, WPS237, WPS529, E800, C812, WPS110, WPS360, WPS323" | ||
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. Remove all these comments |
||
additional_dependencies: | ||
- flake8-blind-except | ||
- flake8-assert-msg | ||
- flake8-builtins | ||
- flake8-docstrings | ||
- flake8-implicit-str-concat | ||
- flake8-mock | ||
- flake8-variables-names | ||
- pep8-naming | ||
- flake8-bugbear | ||
- flake8-executable | ||
- flake8-raise | ||
- flake8-pytest | ||
- flake8-use-pathlib | ||
- flake8-string-format | ||
- flake8-colors | ||
- flake8-tuple | ||
- pandas-vet | ||
- flake8-length | ||
- flake8-assertive | ||
- flake8-warnings | ||
- flake8-comprehensions | ||
- flake8-simplify | ||
- flake8-noqa | ||
- flake8-force-keyword-arguments | ||
exclude: "setup[.]py|conf[.]py|__init__[.]py" | ||
types: [file, python] | ||
- repo: https://github.com/asottile/add-trailing-comma | ||
rev: v2.2.3 | ||
hooks: | ||
- id: add-trailing-comma | ||
name: "Python: Add trailing comma" | ||
args: [--py36-plus] | ||
types: [file, python] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v0.950' | ||
hooks: | ||
- id: mypy | ||
name: "Python: Checking variable types" | ||
args: [--ignore-missing-imports, --allow-redefinition] | ||
exclude: "setup[.]py|conf[.]py" | ||
additional_dependencies: | ||
- pydantic | ||
- types-all | ||
- pandas-stubs | ||
types: [file, python] | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: '1.7.4' | ||
hooks: | ||
- id: bandit | ||
name: "Python: Checking for potential security issues (bandit)" | ||
args: | ||
- "--skip=B404,B506,B607,B603,B701,B101,B602" | ||
- repo: https://github.com/jazzband/pip-tools | ||
rev: 6.6.0 | ||
hooks: | ||
- id: pip-compile | ||
name: "Python: Compile any requirements.in to requirements.txt" | ||
args: [--quiet, --no-allow-unsafe, requirements.in] | ||
files: requirements[.]in | ||
- id: pip-compile | ||
name: "Python: Compile any requirements_dev.in to requirements_dev.txt" | ||
args: [--quiet, --no-allow-unsafe, requirements_dev.in] | ||
files: requirements_dev[.]in | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety | ||
rev: v1.2.4 | ||
hooks: | ||
- id: python-safety-dependencies-check | ||
name: "Python: Checking requirements.txt files for vulnerablitites" | ||
always_run: true | ||
files: requirements.txt | ||
args: [requirements.txt] | ||
- id: python-safety-dependencies-check | ||
name: "Python: Checking requirements_dev.txt files for vulnerablitites" | ||
always_run: true | ||
files: requirements_dev.txt | ||
args: [requirements_dev.txt] | ||
- repo: local | ||
hooks: | ||
- id: remove-en-dashes | ||
name: Remove the EXTREMELY confusing unicode character U+2013 | ||
language: system | ||
entry: perl -pi* -e 's/\xe2\x80\x93/-/g && ($t = 1) && print STDERR $_; END{{exit $t}}' | ||
types: [file] | ||
types_or: [python, powershell, lua, jinja] | ||
- repo: https://github.com/sirosen/texthooks | ||
rev: 0.3.1 | ||
hooks: | ||
- id: fix-smartquotes | ||
types: [file] | ||
types_or: [python, powershell, lua, jinja] | ||
- id: fix-ligatures | ||
types: [file] | ||
types_or: [python, powershell, lua, jinja] | ||
- id: forbid-bidi-controls | ||
types: [file] | ||
types_or: [python, powershell, lua, jinja] | ||
- repo: local | ||
hooks: | ||
- id: pdoc | ||
name: "Generate Documentation" | ||
description: 'Auto generating documentation with PDOC' | ||
entry: pdoc | ||
args: [verbex, -o, docs] | ||
language: python | ||
language_version: python3 | ||
require_serial: true | ||
types: [python] | ||
pass_filenames: false | ||
additional_dependencies: | ||
- beartype |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"python.testing.unittestArgs": [ | ||
"-v", | ||
"-s", | ||
"./tests", | ||
"-p", | ||
"test*.py" | ||
], | ||
"python.testing.pytestEnabled": false, | ||
"python.testing.unittestEnabled": true, | ||
"cSpell.words": [ | ||
"pylance", | ||
"pyright", | ||
"Verbex" | ||
], | ||
"python.linting.flake8Enabled": true, | ||
"python.linting.flake8Args": [ | ||
"--ignore=E501" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
extends: default | ||
rules: | ||
comments-indentation: disable | ||
document-start: disable | ||
new-lines: disable | ||
line-length: disable |
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.
I would remove all the comments. When people don't understand the file, they should look at the GH documentation.