Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Merge branch 'camera-capture-split-cam-option' into More-capture-options
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Jun 15, 2022
2 parents c889f50 + 2cb3068 commit 6f4af3a
Show file tree
Hide file tree
Showing 17 changed files with 439 additions and 810 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -42,6 +42,7 @@ jobs:
pip install wheel
pip install -r "scripts/requirements.txt"
npm install -g pyright
npm list -g pyright
- run: scripts/compile_resources.bat
- name: Analysing the code with ${{ github.job }}
run: pyright --warnings
Expand All @@ -50,12 +51,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -71,12 +72,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -92,12 +93,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -113,12 +114,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -128,7 +129,7 @@ jobs:
pip install -r "scripts/requirements.txt"
- run: scripts/build.bat
- name: Upload Build Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: AutoSplit (Python ${{ matrix.python-version }})
path: dist/AutoSplit.exe
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ reportUnknownMemberType = "none"
# https://github.com/PyCQA/pylint/blob/main/examples/pylintrc
# https://pylint.pycqa.org/en/latest/technical_reference/features.html
[tool.pylint.REPORTS]
# Just like default but any error will make drop to 9 or less. warning and conventions are worth more
evaluation = "10.0 - error - ((float((warning + convention) * 10 + refactor ) / statement) * 10)"
# Just like default but any error, warning or convention will make drop to 9 or less. refactor are worth more
evaluation = "10.0 - error - warning - convention - ((10 * refactor) / statement) * 10"
[tool.pylint.MASTER]
fail-under = 9.0
# https://pylint.pycqa.org/en/latest/technical_reference/extensions.html
Expand Down Expand Up @@ -97,6 +97,9 @@ max-locals = 15
max-complexity = 15
# At least same as max-complexity
max-branches = 15
# https://github.com/PyCQA/pep8-naming/issues/164
# OR doesn't fit CaptureMethodMeta
valid-classmethod-first-arg = "self"
# https://pylint.pycqa.org/en/latest/user_guide/options.html#naming-styles
module-naming-style = "any"
# Can't make private class with PascalCase
Expand All @@ -120,6 +123,8 @@ disable = [
"R0801",
# False positives with PyQt .connect
"no-value-for-parameter",
# Not as long as we support Python 3.9
"consider-alternative-union-syntax",
]

[tool.pylint.TYPECHECK]
Expand Down
39 changes: 34 additions & 5 deletions res/settings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>289</width>
<height>572</height>
<height>621</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -19,13 +19,13 @@
<property name="minimumSize">
<size>
<width>289</width>
<height>572</height>
<height>621</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>289</width>
<height>572</height>
<height>621</height>
</size>
</property>
<property name="cursor">
Expand All @@ -46,7 +46,7 @@
<x>10</x>
<y>180</y>
<width>271</width>
<height>131</height>
<height>181</height>
</rect>
</property>
<property name="title">
Expand Down Expand Up @@ -138,12 +138,41 @@
<string>Capture method:</string>
</property>
</widget>
<widget class="QLabel" name="capture_device_label">
<property name="geometry">
<rect>
<x>6</x>
<y>126</y>
<width>151</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Capture device:</string>
</property>
</widget>
<widget class="QComboBox" name="capture_device_combobox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>6</x>
<y>148</y>
<width>251</width>
<height>22</height>
</rect>
</property>
<property name="placeholderText">
<string>Scanning for existing devices...</string>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="image_settings_groupbox">
<property name="geometry">
<rect>
<x>10</x>
<y>320</y>
<y>370</y>
<width>271</width>
<height>241</height>
</rect>
Expand Down
4 changes: 3 additions & 1 deletion scripts/compile_resources.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cd "%~dp0.."
md .\src\gen
@ if not exist .\src\gen (
md .\src\gen
)
pyuic6 ".\res\about.ui" -o ".\src\gen\about.py"
pyuic6 ".\res\design.ui" -o ".\src\gen\design.py"
pyuic6 ".\res\settings.ui" -o ".\src\gen\settings.py"
Expand Down
5 changes: 3 additions & 2 deletions scripts/install.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
py -m pip install wheel --upgrade
py -m pip install -r "%~p0requirements.txt" --upgrade
npm install -g pyright@latest
py -m pip install -r "%~p0requirements.txt"
CALL "%~p0compile_resources.bat"
CALL npm install -g pyright@latest
CALL npm list -g pyright
8 changes: 4 additions & 4 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Requirements file for AutoSplit
#
# Python: CPython 3.8+
# Python: CPython 3.9+
#
# Usage: .\scripts\install.bat
#
Expand All @@ -10,8 +10,8 @@
# Creating AutoSplit.exe with PyInstaller: .\scripts\build.bat
#
# Dependencies:
numpy>=1.22.0rc1
opencv-python>=4.5.4
numpy>=1.22.0rc1,<1.23
opencv-python-headless>=4.5.4,<4.6
PyQt6>=6.2.1
PySide6
ImageHash
Expand All @@ -34,7 +34,7 @@ flake8-pyi
flake8-quotes
flake8-isort
pylint>=2.13
git+https://github.com/Avasam/pywin32-stubs.git#egg=pywin32-stubs # https://github.com/kaluluosi/pywin32-stubs/pull/4
pywin32-stubs>=0.1.6
simplejson
types-simplejson>=3.17.2
types-requests
Expand Down
Loading

0 comments on commit 6f4af3a

Please sign in to comment.