haritsahm
commited on
Commit
·
0fd3229
0
Parent(s):
Add project configs
Browse files- .dockerignore +6 -0
- .gitignore +156 -0
- .pre-commit-config.yaml +127 -0
.dockerignore
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*
|
2 |
+
!models/
|
3 |
+
!weights/
|
4 |
+
!utils/
|
5 |
+
!main.py
|
6 |
+
!requirements.txt
|
.gitignore
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Byte-compiled / optimized / DLL files
|
2 |
+
__pycache__/
|
3 |
+
*.py[cod]
|
4 |
+
*$py.class
|
5 |
+
|
6 |
+
# C extensions
|
7 |
+
*.so
|
8 |
+
|
9 |
+
# Distribution / packaging
|
10 |
+
.Python
|
11 |
+
build/
|
12 |
+
develop-eggs/
|
13 |
+
dist/
|
14 |
+
downloads/
|
15 |
+
eggs/
|
16 |
+
.eggs/
|
17 |
+
lib/
|
18 |
+
lib64/
|
19 |
+
parts/
|
20 |
+
sdist/
|
21 |
+
var/
|
22 |
+
wheels/
|
23 |
+
share/python-wheels/
|
24 |
+
*.egg-info/
|
25 |
+
.installed.cfg
|
26 |
+
*.egg
|
27 |
+
MANIFEST
|
28 |
+
|
29 |
+
# PyInstaller
|
30 |
+
# Usually these files are written by a python script from a template
|
31 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
32 |
+
*.manifest
|
33 |
+
*.spec
|
34 |
+
|
35 |
+
# Installer logs
|
36 |
+
pip-log.txt
|
37 |
+
pip-delete-this-directory.txt
|
38 |
+
|
39 |
+
# Unit test / coverage reports
|
40 |
+
htmlcov/
|
41 |
+
.tox/
|
42 |
+
.nox/
|
43 |
+
.coverage
|
44 |
+
.coverage.*
|
45 |
+
.cache
|
46 |
+
nosetests.xml
|
47 |
+
coverage.xml
|
48 |
+
*.cover
|
49 |
+
*.py,cover
|
50 |
+
.hypothesis/
|
51 |
+
.pytest_cache/
|
52 |
+
cover/
|
53 |
+
|
54 |
+
# Translations
|
55 |
+
*.mo
|
56 |
+
*.pot
|
57 |
+
|
58 |
+
# Django stuff:
|
59 |
+
*.log
|
60 |
+
local_settings.py
|
61 |
+
db.sqlite3
|
62 |
+
db.sqlite3-journal
|
63 |
+
|
64 |
+
# Flask stuff:
|
65 |
+
instance/
|
66 |
+
.webassets-cache
|
67 |
+
|
68 |
+
# Scrapy stuff:
|
69 |
+
.scrapy
|
70 |
+
|
71 |
+
# Sphinx documentation
|
72 |
+
docs/_build/
|
73 |
+
|
74 |
+
# PyBuilder
|
75 |
+
.pybuilder/
|
76 |
+
target/
|
77 |
+
|
78 |
+
# Jupyter Notebook
|
79 |
+
.ipynb_checkpoints
|
80 |
+
|
81 |
+
# IPython
|
82 |
+
profile_default/
|
83 |
+
ipython_config.py
|
84 |
+
|
85 |
+
# pyenv
|
86 |
+
# For a library or package, you might want to ignore these files since the code is
|
87 |
+
# intended to run in multiple environments; otherwise, check them in:
|
88 |
+
# .python-version
|
89 |
+
|
90 |
+
# pipenv
|
91 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
92 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
93 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
94 |
+
# install all needed dependencies.
|
95 |
+
#Pipfile.lock
|
96 |
+
|
97 |
+
# poetry
|
98 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
99 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
100 |
+
# commonly ignored for libraries.
|
101 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
102 |
+
#poetry.lock
|
103 |
+
|
104 |
+
# pdm
|
105 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
106 |
+
#pdm.lock
|
107 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
108 |
+
# in version control.
|
109 |
+
# https://pdm.fming.dev/#use-with-ide
|
110 |
+
.pdm.toml
|
111 |
+
|
112 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
113 |
+
__pypackages__/
|
114 |
+
|
115 |
+
# Celery stuff
|
116 |
+
celerybeat-schedule
|
117 |
+
celerybeat.pid
|
118 |
+
|
119 |
+
# SageMath parsed files
|
120 |
+
*.sage.py
|
121 |
+
|
122 |
+
# Environments
|
123 |
+
.env
|
124 |
+
.venv
|
125 |
+
env/
|
126 |
+
venv/
|
127 |
+
ENV/
|
128 |
+
env.bak/
|
129 |
+
venv.bak/
|
130 |
+
|
131 |
+
# Spyder project settings
|
132 |
+
.spyderproject
|
133 |
+
.spyproject
|
134 |
+
|
135 |
+
# Rope project settings
|
136 |
+
.ropeproject
|
137 |
+
|
138 |
+
# mkdocs documentation
|
139 |
+
/site
|
140 |
+
|
141 |
+
# mypy
|
142 |
+
.mypy_cache/
|
143 |
+
.dmypy.json
|
144 |
+
dmypy.json
|
145 |
+
|
146 |
+
# Pyre type checker
|
147 |
+
.pyre/
|
148 |
+
|
149 |
+
# pytype static type analyzer
|
150 |
+
.pytype/
|
151 |
+
|
152 |
+
# Cython debug symbols
|
153 |
+
cython_debug/
|
154 |
+
|
155 |
+
# Gradio
|
156 |
+
flagged/
|
.pre-commit-config.yaml
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
default_language_version:
|
2 |
+
python: python3
|
3 |
+
|
4 |
+
repos:
|
5 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
6 |
+
rev: v4.4.0
|
7 |
+
hooks:
|
8 |
+
# list of supported hooks: https://pre-commit.com/hooks.html
|
9 |
+
- id: trailing-whitespace
|
10 |
+
- id: end-of-file-fixer
|
11 |
+
- id: check-docstring-first
|
12 |
+
- id: check-yaml
|
13 |
+
- id: debug-statements
|
14 |
+
- id: detect-private-key
|
15 |
+
- id: check-executables-have-shebangs
|
16 |
+
- id: check-toml
|
17 |
+
- id: check-case-conflict
|
18 |
+
- id: check-added-large-files
|
19 |
+
- id: double-quote-string-fixer
|
20 |
+
|
21 |
+
# python code formatting
|
22 |
+
- repo: https://github.com/pre-commit/mirrors-autopep8
|
23 |
+
rev: v2.0.2
|
24 |
+
hooks:
|
25 |
+
- id: autopep8
|
26 |
+
name: autopep8-default
|
27 |
+
args: [--max-line-length, "110", --in-place]
|
28 |
+
exclude: tests/.*
|
29 |
+
|
30 |
+
- repo: https://github.com/pre-commit/mirrors-autopep8
|
31 |
+
rev: v2.0.2
|
32 |
+
hooks:
|
33 |
+
- id: autopep8
|
34 |
+
name: autopep8-unit-tests
|
35 |
+
args: ["-i", "--ignore=E226,E24,W50,W690,E402"]
|
36 |
+
|
37 |
+
# python import sorting
|
38 |
+
- repo: https://github.com/PyCQA/isort
|
39 |
+
rev: 5.12.0
|
40 |
+
hooks:
|
41 |
+
- id: isort
|
42 |
+
args: ["--skip-gitignore", "--line-length", "110"]
|
43 |
+
|
44 |
+
# python upgrading syntax to newer version
|
45 |
+
- repo: https://github.com/asottile/pyupgrade
|
46 |
+
rev: v3.3.1
|
47 |
+
hooks:
|
48 |
+
- id: pyupgrade
|
49 |
+
args: [--py38-plus]
|
50 |
+
|
51 |
+
# python docstring formatting
|
52 |
+
- repo: https://github.com/myint/docformatter
|
53 |
+
rev: v1.5.1
|
54 |
+
hooks:
|
55 |
+
- id: docformatter
|
56 |
+
args: [--in-place, --wrap-summaries, "100", --wrap-descriptions, "110"]
|
57 |
+
|
58 |
+
# python check (PEP8), programming errors and code complexity
|
59 |
+
- repo: https://github.com/PyCQA/flake8
|
60 |
+
rev: 6.0.0
|
61 |
+
hooks:
|
62 |
+
- id: flake8
|
63 |
+
args: ["--extend-ignore", "E402,E501", "--exclude", "logs/*,data/*"]
|
64 |
+
|
65 |
+
# python security linter
|
66 |
+
- repo: https://github.com/PyCQA/bandit
|
67 |
+
rev: "1.7.5"
|
68 |
+
hooks:
|
69 |
+
- id: bandit
|
70 |
+
args: ["-s", "B101"]
|
71 |
+
|
72 |
+
# yaml formatting
|
73 |
+
- repo: https://github.com/pre-commit/mirrors-prettier
|
74 |
+
rev: v3.0.0-alpha.6
|
75 |
+
hooks:
|
76 |
+
- id: prettier
|
77 |
+
types: [yaml]
|
78 |
+
exclude: "environment.yaml"
|
79 |
+
|
80 |
+
# shell scripts linter
|
81 |
+
- repo: https://github.com/shellcheck-py/shellcheck-py
|
82 |
+
rev: v0.9.0.2
|
83 |
+
hooks:
|
84 |
+
- id: shellcheck
|
85 |
+
|
86 |
+
# md formatting
|
87 |
+
- repo: https://github.com/executablebooks/mdformat
|
88 |
+
rev: 0.7.16
|
89 |
+
hooks:
|
90 |
+
- id: mdformat
|
91 |
+
args: ["--number"]
|
92 |
+
additional_dependencies:
|
93 |
+
- mdformat-gfm
|
94 |
+
- mdformat-tables
|
95 |
+
- mdformat_frontmatter
|
96 |
+
# - mdformat-toc
|
97 |
+
# - mdformat-black
|
98 |
+
|
99 |
+
# word spelling linter
|
100 |
+
- repo: https://github.com/codespell-project/codespell
|
101 |
+
rev: v2.2.4
|
102 |
+
hooks:
|
103 |
+
- id: codespell
|
104 |
+
args:
|
105 |
+
- --skip=logs/**,data/**,*.ipynb
|
106 |
+
# - --ignore-words-list=abc,def
|
107 |
+
|
108 |
+
# jupyter notebook cell output clearing
|
109 |
+
- repo: https://github.com/kynan/nbstripout
|
110 |
+
rev: 0.6.1
|
111 |
+
hooks:
|
112 |
+
- id: nbstripout
|
113 |
+
|
114 |
+
# jupyter notebook linting
|
115 |
+
- repo: https://github.com/nbQA-dev/nbQA
|
116 |
+
rev: 1.6.3
|
117 |
+
hooks:
|
118 |
+
- id: nbqa-black
|
119 |
+
args: ["--line-length=110"]
|
120 |
+
- id: nbqa-isort
|
121 |
+
args: ["--profile=black"]
|
122 |
+
- id: nbqa-flake8
|
123 |
+
args:
|
124 |
+
[
|
125 |
+
"--extend-ignore=E203,E402,E501,F401,F841",
|
126 |
+
"--exclude=logs/*,data/*",
|
127 |
+
]
|