Skip to content
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

Warning if AutoSplit is already open + Build number + Splash Screen + Doc update #152

Closed
wants to merge 129 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
0b267a6
hooked new settings window to actual values
Avasam Dec 15, 2021
f0149f5
Implemented image specific comparison method and default delay time.
Avasam Dec 15, 2021
4f89007
Better "seconds remaining" text
Avasam Dec 16, 2021
2eee9de
Support modifiers the same way LiveSplit does. Closes #34
Avasam Dec 16, 2021
33a49c6
Linted pyi files
Avasam Dec 16, 2021
9be8afc
Initial UI update for 2.0.0. Add settings window.
Toufool Dec 14, 2021
2d8cb6b
hooked new settings window to actual values
Avasam Dec 15, 2021
5838931
Better "seconds remaining" text
Avasam Dec 16, 2021
0399bbc
Merge branch '2.0.0' of https://github.com/Toufool/Auto-Split into 2.0.0
Avasam Dec 17, 2021
21947d0
Undo split goes to the end of the group
Avasam Dec 22, 2021
a196113
Merge branch '2.0.0' into image-comparison-method-and-default-delay-time
Avasam Dec 29, 2021
ff97b81
Merge branch '2.0.0' into support-hotkeys-with-modifiers
Avasam Dec 29, 2021
ef26562
Merge branch '2.0.0' into Linted-pyi-files
Avasam Dec 29, 2021
b8c1bbe
Turn off pyright(reportFunctionMemberAccess) in favor of pylint(no-me…
Avasam Dec 29, 2021
509274c
Merge branch 'support-hotkeys-with-modifiers' into complete
Avasam Dec 29, 2021
e00cacd
Merge branch 'Linted-pyi-files' into complete
Avasam Dec 29, 2021
83039c6
Fixed images comparison method defaulting to 0 rather than none
Avasam Dec 29, 2021
15b4c13
Merge branch 'image-comparison-method-and-default-delay-time' into co…
Avasam Dec 29, 2021
7e5004d
Fixed start image comparison not starting when loading settings from …
Avasam Jan 3, 2022
c7af588
Fixed threshold_from_filename to support 0.0 and 1.0
Avasam Jan 26, 2022
660276d
Reset similarity labels
Avasam Jan 27, 2022
a7b07f7
Visually update threshold labels when changed from settings
Avasam Mar 12, 2022
c831838
Keep pause timer running when undoing split
Avasam Mar 12, 2022
714c8cc
Prevent text flash when reloading start image
Avasam Mar 12, 2022
23b0206
Reverted pause before start image
Avasam Mar 12, 2022
c2deb11
TOML Settings
Avasam Mar 13, 2022
048b948
Trying out Python 3.10 build
Avasam Mar 13, 2022
17e3e81
Further pyi linting
Avasam Mar 13, 2022
125d4b2
Updated some messages
Avasam Apr 2, 2022
a64c5ce
Implement D3D Desktop Duplication
Avasam Apr 3, 2022
6d334c3
d3dshot stub
Avasam Apr 3, 2022
7d4f860
Split dropdown for supported imread filetypes
Avasam Apr 3, 2022
54c68c0
Finished implementing desktop duplicaton
Avasam Apr 3, 2022
886b596
Fixed dropdown height on first open and added tooltip
Avasam Apr 3, 2022
a7a1308
Prevent some infinite error loops
Avasam Apr 4, 2022
fa6037b
Massively sped up Flake tests
Avasam Apr 4, 2022
9398787
Merge branch 'use-pywin32-stubs-fork' of https://github.com/Avasam/Au…
Avasam Apr 4, 2022
834ad36
WIP camera capture
Avasam Apr 5, 2022
f4b64b0
Merge branch 'use-pywin32-stubs-fork' of https://github.com/Avasam/Au…
Avasam Apr 4, 2022
d29a450
wip WindowsGraphicsCapture, missing bindings
Avasam Apr 7, 2022
784a9fe
Working WindowsGraphicsCapture picker
Avasam Apr 7, 2022
274cef1
Completed WindowsGraphicsApi support
Avasam Apr 8, 2022
e5a185d
Merge pull request #19 from Avasam/wip-WindowsGraphicsCapture
Avasam Apr 8, 2022
7bfd7e1
Merge branch 'More-capture-options' of https://github.com/Avasam/Auto…
Avasam Apr 8, 2022
1f50eb1
Cleaner capture device selection
Avasam Apr 9, 2022
6df5975
Specify OBS' Virtualcam plugin and pickup cam on load
Avasam Apr 9, 2022
993e077
Fixed WindowsGraphicsCapture max FPS detection
Avasam Apr 9, 2022
3a8e9e3
Massively sped up Flake tests
Avasam Apr 4, 2022
4f20ef1
Turn off pyright(reportFunctionMemberAccess) in favor of pylint(no-me…
Avasam Dec 29, 2021
0003771
Centralized qWait typing fix
Avasam Apr 8, 2022
74b58e8
Autosort imports
Avasam Apr 8, 2022
3f9254b
Resynced settings
Avasam Apr 11, 2022
b2d2174
Merge branch 'toml-settings' into More-capture-options
Avasam Apr 11, 2022
724149e
post-merge fix linting
Avasam Apr 11, 2022
abf49e7
Merge branch 'toml-settings' into More-capture-options
Avasam Apr 11, 2022
24df1a3
post-merge linting fixes
Avasam Apr 11, 2022
1cf68dd
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam Apr 11, 2022
23694d9
Re-introduced region selection for WGC API.
Avasam Apr 13, 2022
74edfc2
Fixed linting with updated pyright
Avasam Apr 13, 2022
81da593
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam Apr 13, 2022
fece8e7
Fixed linting with updated pyright
Avasam Apr 13, 2022
87c7ac6
Restored all functionalities for CaptureMethod.WINDOWS_GRAPHICS_CAPTURE
Avasam May 1, 2022
500dd37
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam May 1, 2022
17afb4f
Updated pyi linting
Avasam May 1, 2022
bc16b8c
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam May 1, 2022
063595f
Include backend in camera name
Avasam May 1, 2022
53004fd
Restored all functionalities for CaptureMethod.WINDOWS_GRAPHICS_CAPTURE
Avasam May 1, 2022
a8f89cb
Updated pyi linting
Avasam May 1, 2022
4cc5d7a
Fixed an error when changing similarity while the comparison is not r…
Avasam May 3, 2022
68128c5
More constants for image comparison
Avasam May 3, 2022
d91ce2f
Parallel device scan and attempt at adding some names
Avasam May 4, 2022
20100ee
Merge branch 'More-capture-options' into camera-capture-split-cam-option
Avasam May 4, 2022
9710e61
Fixed error when CaptureDevices haven't loaded yet
Avasam May 4, 2022
0c5c107
Constants and more specific ignores
Avasam May 4, 2022
7bfd2f7
More accurate filename
Avasam May 7, 2022
2bc112b
Test for MediaCapture and simplified coroutine
Avasam May 7, 2022
0e53b59
Updated README and some messages
Avasam May 7, 2022
0f63e69
Fixed a few issues with the video capture device implementation
Avasam Jun 2, 2022
2ecfa85
Updated some text
Avasam Jun 3, 2022
59f7dd0
Fixed start images threshold
Avasam Jun 6, 2022
a91323c
Updated typings
Avasam Jun 6, 2022
3a88ae6
Fixes #22
Avasam Jun 10, 2022
51888f3
Reset image now indicates that its paused when starting a run
Avasam Jun 10, 2022
8027d1f
Updated pyright and some scripts
Avasam Jun 11, 2022
fc21a2b
headless opencv is enough
Avasam Jun 11, 2022
a4dda9d
Updated versioning
Avasam Jun 15, 2022
0e6ce0b
Set camera size
Avasam Jun 15, 2022
2cb3068
enumarate cameras using pygrabber
Avasam Jun 15, 2022
46e5392
Don't pickup inexistant window on load
Avasam Jun 15, 2022
cbf489e
Updated pylint, python job, and split requireemnts
Avasam Jun 16, 2022
b5aa78f
Add splash screen. Closes Avasam#25
Avasam Jun 16, 2022
74a538a
Check version for is_border_required
Avasam Jun 16, 2022
391cbe4
Fix a handful of Win11 high DPI scaling issues + Build task
Avasam Jun 16, 2022
ad72917
Fix yet another issue on Windows Graphics Capture + oopsie
Avasam Jun 16, 2022
3ca7dbe
bugfix: get_method_by_index should return first element with negative…
Avasam Jun 17, 2022
dc1e9dd
Properly fix region alignement
Avasam Jun 17, 2022
0ad99bf
Removed simplejson
Avasam Jun 17, 2022
0af8ce3
More capture method readme update
Avasam Jun 17, 2022
97fbe26
Fix #27
Avasam Jun 17, 2022
a1c1dd9
round down floats shown in UI
Avasam Jun 19, 2022
45aab97
disable unused hotkeys when autocontrolled
Avasam Jun 19, 2022
920fcfd
Allow to move / set an existing hotkey
Avasam Jun 19, 2022
2587fd3
don't double send skip and undo splits hotkey
Avasam Jun 19, 2022
c3ac350
Extract all constants and shared utils methods
Avasam Jun 19, 2022
33c46d4
Better guards
Avasam Jun 25, 2022
37f3173
Windows Graphics Capture border doc update
Avasam Jul 3, 2022
1c2b3fc
Update codeql-action to v2
Avasam Jul 3, 2022
c006826
Updated Scripts to OS agnostic powershell
Avasam Jul 12, 2022
e555479
Abstracted all capture methods to its own module
Avasam Jul 13, 2022
3d72389
Optimized VideoCaptureDevice by threading it
Avasam Jul 13, 2022
b0a1c39
CI: Install wheel
Avasam Jul 13, 2022
96d707a
Some UI fixes
Avasam Jul 14, 2022
38930a4
Show a warning if AutoSplit is already open
Avasam Jul 14, 2022
9fe46c4
Fixed linting
Avasam Jul 14, 2022
d6f394f
Add version number
Avasam Jul 14, 2022
57a9c80
Updated doc for per-image comparison method
Avasam Jul 15, 2022
723bdda
Added workflow_dispatch for manual triggers
Avasam Jul 16, 2022
c2b1324
update comparison_method_from_filename symbol
Avasam Jul 22, 2022
3894896
Extract hwnd validation
Avasam Jul 16, 2022
6a1349a
Fixed window recovery from loading profile and WGC
Avasam Jul 22, 2022
7410a9f
Updated build scripts
Avasam Jul 23, 2022
0aed849
Fixed crashes when opening from LiveSplit
Avasam Jul 23, 2022
09b5c81
Completed cv2 error type stubs
Avasam Jul 23, 2022
8581fcb
Fixed error from trying to capture occupied capture device
Avasam Jul 24, 2022
4ce5a73
Updated some settigns and linters
Avasam Jul 24, 2022
0d26e58
Completed fire_and_forget implementation
Avasam Jul 24, 2022
7eed444
Fixed a few focus and tabstop issues
Avasam Jul 25, 2022
3683954
Fix numpy typing
Avasam Jul 25, 2022
f534734
Bumped numpy
Avasam Jul 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
color=always
max-line-length=120
; Auto generated
exclude=src/gen/
; Linebreak before binary operator
; Allow default value other than "..."
; Allow imports at the bottom of file
ignore=W503,Y015,E402
exclude=src/gen/, typings/cv2-stubs/__init__.pyi
ignore=
W503, ; Linebreak before binary operator
E402, ; Allow imports at the bottom of file
Y026, ; Not using typing_extensions
per-file-ignores=
; Docstrings in type stubs
; Function bodys contain other than just ... (eg: raise)
; Single quote docstrings
typings/cv2-stubs/__init__.pyi: Q000,E704,E501,N8, Y021,Y010,Q002

; Quotes
__init__.pyi:Q000
; Allow ... on same line as def
; Line too long
; Naming conventions can't be controlled for external libraries
typings/**: Q000,E704,E501,N8
; PyQt methods
ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
; McCabe max-complexity is also taken care of by Pylint and doesn't fail teh build there
; McCabe max-complexity is also taken care of by Pylint and doesn't fail the build there
; So this is the hard limit
max-complexity=32
inline-quotes="
inline-quotes=double
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
119 changes: 61 additions & 58 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: Lint and build
on:
workflow_dispatch: # Allows manual builds
push:
branches:
- main
- master
- 2.0.0
paths:
- '**.py'
- '**.pyi'
Expand All @@ -25,106 +25,109 @@ jobs:
Pyright:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
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
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r "scripts/requirements.txt"
npm install -g pyright
- run: scripts/compile_resources.bat
- name: Analysing the code with ${{ job.name }}
cache: 'pip'
cache-dependency-path: 'scripts/requirements*.txt'
- run: scripts/install.ps1
shell: pwsh
- name: Analysing the code with Pyright
run: pyright --warnings
Pylint:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
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
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r "scripts/requirements.txt"
- run: scripts/compile_resources.bat
- name: Analysing the code with ${{ job.name }}
run: pylint --reports=y --output-format=colorized $(git ls-files '**/*.py*')
cache: 'pip'
cache-dependency-path: 'scripts/requirements*.txt'
- run: scripts/install.ps1
shell: pwsh
- name: Analysing the code with Pylint
run: pylint --reports=y --output-format=colorized src/
Flake8:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
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
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r "scripts/requirements.txt"
- run: scripts/compile_resources.bat
- name: Analysing the code with ${{ job.name }}
cache: 'pip'
cache-dependency-path: 'scripts/requirements*.txt'
- run: scripts/install.ps1
shell: pwsh
- name: Analysing the code with Flake8
run: flake8
Bandit:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
fail-fast: false
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r "scripts/requirements.txt"
- run: scripts/compile_resources.bat
- name: Analysing the code with ${{ job.name }}
python-version: "3.10"
cache: 'pip'
cache-dependency-path: 'scripts/requirements*.txt'
- run: scripts/install.ps1
shell: pwsh
- name: Analysing the code with Bandit
run: bandit -n 1 --severity-level medium --recursive src
Build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
python-version: ["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
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r "scripts/requirements.txt"
- run: scripts/build.bat
cache: 'pip'
- run: scripts/install.ps1
shell: pwsh
- run: scripts/build.ps1
shell: pwsh
- 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
path: dist/AutoSplit*
if-no-files-found: error
- name: Upload Build logs
uses: actions/upload-artifact@v3
with:
name: Build logs (Python ${{ matrix.python-version }})
path: |
build/AutoSplit/*.toc
build/AutoSplit/*.txt
build/AutoSplit/*.html
if-no-files-found: error
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Caches
.cache/

# Byte-compiled / optimized / DLL files
__pycache__/

# Distribution / packaging
env/
build/
dist/
*.prof
# Generated
**/gen/*.py
!**/gen/*.pyi
Expand All @@ -19,3 +23,4 @@ dist/

# Dev settings
*.pkl
settings.toml
2 changes: 0 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@
"ms-vscode.vscode-typescript-tslint-plugin",
// Obsoleted by Pylance
"ms-pyright.pyright",
// The ESLint plugin is sufficient in JS-only projects
"sonarsource.sonarlint-vscode",
]
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: AutoSplit",
"type": "python",
"request": "launch",
"program": "src/AutoSplit.py",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
39 changes: 24 additions & 15 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.markdownlint": true,
"source.organizeImports": true,
},
"files.insertFinalNewline": true,
"trailing-spaces.includeEmptyLines": true,
Expand All @@ -22,6 +22,9 @@
"markdown"
],
"files.associations": {
"*.json": "json",
"extensions.json": "jsonc",
"settings.json": "jsonc",
"*.qrc": "xml",
"*.ui": "xml"
},
Expand All @@ -37,9 +40,9 @@
"**/__pycache__": true,
},
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"*.lock": true,
"typings": true,
},
"[python]": {
Expand All @@ -50,14 +53,25 @@
// 88, // Black default
99, // PEP8-17 acceptable max
120, // Our hard rule
]
],
"editor.codeActionsOnSave": {
// This removes "unused" imports. https://github.com/microsoft/pylance-release/issues/3091
"source.fixAll": false,
},
},
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintCategorySeverity.convention": "Warning",
"python.linting.pylintCategorySeverity.refactor": "Warning",
"python.linting.flake8Enabled": true,
// pycodestyles
"python.linting.flake8CategorySeverity.E": "Warning",
// Pyflakes
"python.linting.flake8CategorySeverity.F": "Warning",
// PEP8 Naming convention
"python.linting.flake8CategorySeverity.N": "Warning",
// PYI
"python.linting.flake8CategorySeverity.Y": "Warning",
// PyRight obsoletes mypy
"python.linting.mypyEnabled": false,
// Is already wrapped by Flake8, prospector and pylama
Expand All @@ -67,16 +81,11 @@
// Just another wrapper, use Flake8 OR this
"python.linting.pylamaEnabled": false,
"python.linting.banditEnabled": true,
// Copy those over to your user settings
"sonarlint.rules": {
"python:S1192": {
"level": "off"
},
"python:S3776": {
"level": "off"
},
"python:S107": {
"level": "off"
},
},
"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline",
"powershell.codeFormatting.autoCorrectAliases": true,
"powershell.codeFormatting.trimWhitespaceAroundPipe": true,
"powershell.codeFormatting.useConstantStrings": true,
"powershell.codeFormatting.useCorrectCasing": true,
"powershell.codeFormatting.whitespaceBetweenParameters": true,
"powershell.integratedConsole.showOnStartup": false,
}
14 changes: 14 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build AutoSplit",
"type": "shell",
"command": "scripts/build.ps1",
"group": {
"kind": "build",
"isDefault": true
}
}
],
}
Loading