Skip to content

Commit a4c7185

Browse files
committed
make quality-scaler command plus lazy ai model download. pip install . && quality-scaler
1 parent cb461d1 commit a4c7185

37 files changed

+3015
-2384
lines changed

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Linting
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
python-version: [3.10.4]
11+
os: [ubuntu-latest]
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- uses: actions/cache@v3
19+
name: Configure pip caching
20+
with:
21+
path: ~/.cache/pip
22+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
23+
restore-keys: |
24+
${{ runner.os }}-pip-
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install .
29+
python -m pip install -r requirements.testing.txt
30+
- name: Run Linting
31+
run: |
32+
flake8 src
33+
pylint src
34+
mypy src

.github/workflows/push_macos.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: MacOS_Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
python-version: [3.10.4]
11+
os: [macos-latest]
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- uses: actions/cache@v3
19+
name: Configure pip caching
20+
with:
21+
path: ~/.cache/pip
22+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
23+
restore-keys: |
24+
${{ runner.os }}-pip-
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install .
29+
python -m pip install pytest
30+
- name: Run Tests
31+
run: |
32+
pytest tests

.github/workflows/push_ubuntu.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Ubuntu_Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
python-version: [3.10.4]
11+
os: [ubuntu-latest]
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- uses: actions/cache@v3
19+
name: Configure pip caching
20+
with:
21+
path: ~/.cache/pip
22+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
23+
restore-keys: |
24+
${{ runner.os }}-pip-
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install .
29+
python -m pip install pytest
30+
- name: Run Tests
31+
run: |
32+
pytest tests

.github/workflows/push_win.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Win_Tests
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
python-version: [3.10.4]
11+
os: [windows-latest]
12+
steps:
13+
- uses: actions/checkout@v3
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- uses: actions/cache@v3
19+
name: Configure pip caching
20+
with:
21+
path: ~/.cache/pip
22+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
23+
restore-keys: |
24+
${{ runner.os }}-pip-
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install .
29+
python -m pip install pytest
30+
- name: Run Test
31+
run: |
32+
pytest tests

.gitignore

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.pyc
6+
7+
# Generated commands
8+
/zcmds/bin/
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
prod_env/
16+
data/
17+
build/
18+
develop-eggs/
19+
dist/
20+
downloads/
21+
eggs/
22+
.eggs/
23+
lib/
24+
lib64/
25+
parts/
26+
sdist/
27+
var/
28+
wheels/
29+
pip-wheel-metadata/
30+
share/python-wheels/
31+
*.egg-info/
32+
.installed.cfg
33+
*.egg
34+
MANIFEST
35+
36+
# PyInstaller
37+
# Usually these files are written by a python script from a template
38+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
39+
*.manifest
40+
*.spec
41+
42+
# Installer logs
43+
pip-log.txt
44+
pip-delete-this-directory.txt
45+
46+
# Unit test / coverage reports
47+
htmlcov/
48+
.tox/
49+
.nox/
50+
.coverage
51+
.coverage.*
52+
.cache
53+
nosetests.xml
54+
coverage.xml
55+
*.cover
56+
*.py,cover
57+
.hypothesis/
58+
.pytest_cache/
59+
60+
# Translations
61+
*.mo
62+
*.pot
63+
64+
# Django stuff:
65+
*.log
66+
local_settings.py
67+
db.sqlite3
68+
db.sqlite3-journal
69+
70+
# Flask stuff:
71+
instance/
72+
.webassets-cache
73+
74+
# Scrapy stuff:
75+
.scrapy
76+
77+
# Sphinx documentation
78+
docs/_build/
79+
80+
# PyBuilder
81+
target/
82+
83+
# Jupyter Notebook
84+
.ipynb_checkpoints
85+
86+
# IPython
87+
profile_default/
88+
ipython_config.py
89+
90+
# pyenv
91+
.python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
101+
__pypackages__/
102+
103+
# Celery stuff
104+
celerybeat-schedule
105+
celerybeat.pid
106+
107+
# SageMath parsed files
108+
*.sage.py
109+
110+
# Environments
111+
.env
112+
.venv
113+
env/
114+
venv/
115+
ENV/
116+
env.bak/
117+
venv.bak/
118+
119+
# Spyder project settings
120+
.spyderproject
121+
.spyproject
122+
123+
# Rope project settings
124+
.ropeproject
125+
126+
# mkdocs documentation
127+
/site
128+
129+
# mypy
130+
.mypy_cache/
131+
.dmypy.json
132+
dmypy.json
133+
134+
# Pyre type checker
135+
.pyre/
136+
.activate.sh
137+
138+
# Generated by mac
139+
**/.DS_Store

.vscode/launch.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python: Current File (Integrated Terminal)",
9+
"type": "python",
10+
"request": "launch",
11+
"subProcess": true,
12+
"program": "${file}",
13+
"console": "integratedTerminal",
14+
"justMyCode": false
15+
},
16+
{
17+
"name": "Python: Remote Attach",
18+
"type": "python",
19+
"request": "attach",
20+
"port": 5678,
21+
"host": "localhost",
22+
"pathMappings": [
23+
{
24+
"localRoot": "${workspaceFolder}",
25+
"remoteRoot": "."
26+
}
27+
]
28+
},
29+
{
30+
"name": "Python: Module",
31+
"type": "python",
32+
"request": "launch",
33+
"module": "enter-your-module-name-here",
34+
"console": "integratedTerminal"
35+
},
36+
{
37+
"name": "Python: Current File (External Terminal)",
38+
"type": "python",
39+
"request": "launch",
40+
"program": "${file}",
41+
"console": "externalTerminal"
42+
}
43+
]
44+
}

.vscode/settings.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"python.autoComplete.extraPaths": [
3+
"."
4+
],
5+
"python.linting.pylintEnabled": true,
6+
"python.linting.enabled": true,
7+
"terminal.integrated.defaultProfile.windows": "Git Bash",
8+
"terminal.integrated.profiles.windows": {
9+
"Git Bash": {
10+
"path": "C:\\Program Files\\Git\\bin\\bash.exe"
11+
}
12+
},
13+
// adds activate virtualenv to terminal
14+
"terminal.integrated.env.windows": {
15+
"VIRTUAL_ENV": "${workspaceFolder}/venv"
16+
},
17+
"files.eol": "\n", // Unix
18+
"editor.tabSize": 4,
19+
"editor.insertSpaces": true,
20+
"editor.detectIndentation": false,
21+
"editor.formatOnSave": false,
22+
"python.formatting.provider": "black",
23+
"python.formatting.blackArgs": [
24+
"--line-length=100"
25+
],
26+
"python.analysis.extraPaths": [
27+
"."
28+
]
29+
}

.vscode/tasks.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Lint",
8+
"type": "shell",
9+
"command": ". ./activate.sh && ./lint.sh",
10+
"group": "build",
11+
"options": {
12+
"cwd": "${workspaceRoot}"
13+
},
14+
"presentation": {
15+
"echo": true,
16+
"reveal": "always",
17+
"focus": true,
18+
"panel": "shared",
19+
"clear": true
20+
},
21+
"problemMatcher": []
22+
},
23+
{
24+
"label": "Tox",
25+
"type": "shell",
26+
"command": "tox",
27+
"group": "build",
28+
"options": {
29+
"cwd": "${workspaceRoot}"
30+
},
31+
"presentation": {
32+
"echo": true,
33+
"reveal": "always",
34+
"focus": true,
35+
"panel": "shared",
36+
"clear": true
37+
},
38+
"problemMatcher": []
39+
},
40+
]
41+
}

0 commit comments

Comments
 (0)