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

QThread for fire_and_forget #156

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3f23c55
First linting pass
Avasam Nov 29, 2021
667696c
Merge pull request #92 from Avasam/linting
Toufool Nov 29, 2021
13b4d43
Moved most settings to pyproject.toml and ran autopep8
Avasam Nov 29, 2021
9840fd9
Removed mypy and Fixed import-outside-toplevel
Avasam Nov 29, 2021
feda2ad
Double quotes and pylint complete linting
Avasam Nov 29, 2021
09b34fc
Configured linting workflow
Avasam Nov 30, 2021
4edbef5
add pause after start image tip
Toufool Dec 1, 2021
4cd2b9e
Merge pull request #122 from Avasam/github-actions
Toufool Dec 3, 2021
3602d5f
Fix crash on LiveSplit open and missing link in error message
Avasam Dec 3, 2021
fd0721e
Merge branch '2.0.0' of https://github.com/Toufool/Auto-Split into li…
Avasam Dec 3, 2021
cb4b293
Merge pull request #121 from Avasam/linting
Toufool Dec 3, 2021
002b097
Merge
Avasam Dec 3, 2021
6bfd4cb
Merge branch 'dev' of https://github.com/Toufool/Auto-Split into 2.0.0
Avasam Dec 3, 2021
0b704d6
Merge branch '2.0.0' into Save-'Check-For-Updates-On-Open'-immediatly
Avasam Dec 3, 2021
fdcffa9
Fixed certificate error and random crash on open when compiled
Avasam Dec 5, 2021
a2b1f3c
Merge pull request #125 from Avasam/2.0.0
Toufool Dec 5, 2021
f621fac
Using python/typeshed/pull/6492
Avasam Dec 5, 2021
f0fa0e2
PEP8 naming convention
Avasam Dec 5, 2021
fd97eba
Added build artifact
Avasam Dec 6, 2021
7c92122
AutoSplitImage Class and simplified code
Avasam Dec 6, 2021
e1e77ea
Average FPS over all images with all actions
Avasam Dec 6, 2021
0686ea4
Merge pull request #124 from Avasam/Save-'Check-For-Updates-On-Open'-…
Toufool Dec 6, 2021
b2e4e2a
Merge pull request #126 from Avasam/naming-convention
Toufool Dec 6, 2021
1663465
Merge pull request #127 from Avasam/SplitImage-as-class
Toufool Dec 6, 2021
e4566ea
Added badges
Avasam Dec 7, 2021
82a2d05
Merge pull request #128 from Avasam/main
Toufool Dec 7, 2021
c07b771
Fixed "Select Window" not working for windows with negative coordinates
Avasam Dec 8, 2021
84a5bb4
Ability to recover window
Avasam Dec 8, 2021
f234fe9
Merge branch 'master' of https://github.com/Toufool/Auto-Split into R…
Avasam Dec 8, 2021
709e6c1
Merge pull request #129 from Avasam/Recover-from-closed-capture-window
Toufool Dec 10, 2021
69ffb11
Differentiate "undo/skip split" from "previous/next image"
Avasam Dec 10, 2021
822c8aa
Merge pull request #131 from Avasam/Feature-Request--Previous/Next-Im…
Toufool Dec 11, 2021
93b089f
Make Save Settings more intuitive
Avasam Dec 11, 2021
1736443
Merge pull request #132 from Avasam/Make-Save-Settings-more-intuitive
Toufool Dec 14, 2021
bbb257f
Initial UI update for 2.0.0. Add settings window.
Toufool Dec 14, 2021
65441ba
Hooked new settings window to actual values (#151)
Avasam Aug 6, 2022
86351fa
Image comparison method and default delay time (#135)
Avasam Sep 2, 2022
60a1277
Support hotkeys with modifiers (#136)
Avasam Sep 2, 2022
88d7d6a
Linted pyi files (#137)
Avasam Sep 3, 2022
6b928ca
Toml profiles + Python 3.10 (#140)
Avasam Sep 3, 2022
3b39fa1
Added new Capture Method system for more capture options + utils (#141)
Avasam Sep 3, 2022
537f8bf
Warning if AutoSplit is already open + Build number + Splash Screen +…
Avasam Sep 3, 2022
72883d4
QThread fire_and_forget + toggle auto reset image
Avasam Sep 3, 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
31 changes: 31 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[flake8]
color=always
max-line-length=120
; Auto generated
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
SIM105, ; contextlib.suppress is roughly 3x slower than try/except
CCE001, ; False positives for attribute docstrings
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,A002,A003,CCE002,F401, Y021,Y010,Q002
; Quotes
; Allow ... on same line as def
; Line too long
; Naming conventions can't be controlled for external libraries
; Argument names can't be controlled for external libraries
; attribute names can't be controlled for external libraries
; False positive Class level expression with elipsis
; Type re-exports
*.pyi: Q000,E704,E501,N8,A002,A003,CCE002,F401
; PyQt methods
ignore-names=closeEvent,paintEvent,keyPressEvent,mousePressEvent,mouseMoveEvent,mouseReleaseEvent
; 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=double
67 changes: 67 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [main, master, develop, dev, 2.0.0]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop, dev, 2.0.0]
schedule:
- cron: "26 13 * * 6"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: ["python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
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.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# 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@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
134 changes: 134 additions & 0 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# 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
paths:
- "**.py"
- "**.pyi"
- "**.ui"
pull_request:
branches:
- main
- master
- dev*
- 2.0.0
paths:
- "**.py"
- "**.pyi"
- "**.ui"

env:
GITHUB_HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}

jobs:
Pyright:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
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.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
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.9", "3.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
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
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
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.10"]
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- run: scripts/install.ps1
shell: pwsh
- run: scripts/build.ps1
shell: pwsh
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: AutoSplit (Python ${{ matrix.python-version }})
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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# 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

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -16,3 +23,4 @@ dist/

# Dev settings
*.pkl
settings.toml
6 changes: 6 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"default": true,
"MD001": false,
"MD013": false,
"MD025": false
}
36 changes: 31 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
// Keep in alphabetical order
{
"recommendations": [
"ms-python.vscode-pylance",
"ms-python.python",
"sonarsource.sonarlint-vscode",
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"eamodio.gitlens",
"ms-python.flake8",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode.powershell",
"pkief.material-icon-theme",
"redhat.vscode-yaml",
"shardulm94.trailing-spaces",
"eamodio.gitlens"
"sonarsource.sonarlint-vscode"
],
"unwantedRecommendations": [
// Must disable in this workspace //
//
// VSCode has implemented an optimized version
"coenraads.bracket-pair-colorizer",
"coenraads.bracket-pair-colorizer-2",
// Lots of conflicts
"esbenp.prettier-vscode",
// Replaced by ESLint
"eg2.tslint",
"ms-vscode.vscode-typescript-tslint-plugin",
// Obsoleted by Pylance
"ms-pyright.pyright",
"esbenp.prettier-vscode"
// Not configurable per workspace, tends to conflict with other linters
// Use eslint-plugin-sonarjs for JS/TS projects
"sonarsource.sonarlint-vscode",
//
// Don't recommend to autoinstall //
//
// This is a Git project
"johnstoncode.svn-scm",
// Prefer using VSCode itself as a text editor
"vscodevim.vim",
]
}
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// 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",
"preLaunchTask": "Compile resources",
"program": "src/AutoSplit.py",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Python: AutoSplit --auto-controlled",
"type": "python",
"request": "launch",
"preLaunchTask": "Compile resources",
"program": "src/AutoSplit.py",
"args": [
"--auto-controlled"
],
"console": "integratedTerminal",
"justMyCode": true
}
]
}
Loading