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

feat(capture): start working on dxcam implementation #227

Draft
wants to merge 22 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f1cb1a6
Fix #52 Comparisons with empty masks
Avasam Nov 27, 2021
3b30aa6
Save 'Check For Updates On Open' immediatly
Avasam Nov 28, 2021
c1b8c85
showErrorSignal to show error message box from another thread
Avasam Nov 28, 2021
2e3336a
Fixes #86 Stop uncaught exceptions from silently crashing the app
Avasam Nov 28, 2021
5f98309
Merge pull request #72 from Avasam/Fix-#52-Comparisons-with-empty-masks
Toufool Nov 28, 2021
393ca84
Merge pull request #116 from Avasam/show-errors-outside-main-thread
Toufool Nov 28, 2021
25dece7
Fixes #86 Stop uncaught exceptions from silently crashing the app
Avasam Nov 28, 2021
cc6066c
Merge branch 'dev' of https://github.com/Toufool/Auto-Split into show…
Avasam Nov 28, 2021
0d6ccf6
Merge pull request #118 from Avasam/show-errors-outside-main-thread
Toufool Nov 28, 2021
3cb2aa6
Fix #114, try to load Start Image on browse & load settings, don't al…
Toufool Nov 28, 2021
5c17beb
Async check for updates
Avasam Nov 30, 2021
458ed20
Merge branch 'dev' of https://github.com/Toufool/Auto-Split into Save…
Avasam Nov 30, 2021
ab9b2c0
Merge pull request #115 from Avasam/Save-'Check-For-Updates-On-Open'-…
Toufool Dec 3, 2021
9a3a5c5
Update dev branch with 2.0.0 (#203)
Avasam Mar 25, 2023
4349939
Use Ruff ! (#207)
Avasam Apr 21, 2023
5d1361d
Drop PyQt6 in favor of PySide6 (#204)
Avasam Apr 21, 2023
f01dfc1
Backport a handful of improvements from the Linux branch (#212)
Avasam Apr 22, 2023
d5edf44
Add pre-commit hooks (#213)
Avasam Apr 22, 2023
a828ce8
Update .pre-commit-config.yaml
Avasam Apr 22, 2023
b8e31de
Respect the system's palette on Windows (darkmode) (#214)
Avasam Apr 22, 2023
7fe8d9b
feat(capture): start working on dxcam implementation
Lordmau5 Apr 23, 2023
fa95743
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 23, 2023
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
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
126 changes: 126 additions & 0 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: Lint and build
on:
workflow_dispatch: # Allows manual builds
inputs:
excludeBuildNumber:
description: "Exclude build number"
required: true
default: false
type: boolean
push:
branches:
- main
- master
- dev*
paths:
- "**.py"
- "**.ui"
- ".github/workflows/lint-and-build.yml"
- "**/requirements.txt"
pull_request:
branches:
- main
- master
- dev*
- 2.0.0
paths:
- "**.py"
- "**.pyi"
- "**.ui"
- ".github/workflows/lint-and-build.yml"
- "**/requirements*.txt"

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

jobs:
ruff:
runs-on: windows-latest
strategy:
fail-fast: false
# Ruff is version sensible
matrix:
python-version: ["3.9", "3.10", "3.11"]
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
- run: ruff check .
add-trailing-comma:
runs-on: windows-latest
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install add-trailing-comma
- name: Analysing the code with add-trailing-comma
run: add-trailing-comma $(git ls-files '**.py*') --py36-plus
Pyright:
runs-on: windows-latest
strategy:
fail-fast: false
# Pyright is version and platform sensible
matrix:
python-version: ["3.9", "3.10", "3.11"]
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 Pyright
uses: jakebailey/pyright-action@v1
with:
working-directory: src/
Build:
runs-on: windows-latest
strategy:
fail-fast: false
# Only the Python version we plan on shipping matters.
matrix:
python-version: ["3.11"]
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
- 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
}
38 changes: 38 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# Workaround for https://github.com/adamchainz/pre-commit-dprint/issues/4
- id: pretty-format-json
exclude: ".vscode/.*|dprint.json" # Exclude jsonc
args: [--autofix, --no-sort-keys]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=crlf]
- id: check-case-conflict
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.8.0
hooks:
- id: pretty-format-ini
args: [--autofix]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.262" # Must match requirements-dev.txt
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: "v2.0.2" # Must match requirements-dev.txt
hooks:
- id: autopep8
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0 # Must match requirements-dev.txt
hooks:
- id: add-trailing-comma

ci:
skip:
# Ignore until Linux support. We don't want lf everywhere yet
# And crlf fails on CI because pre-commit runs on linux
- "mixed-line-ending"
1 change: 1 addition & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.python.version=3.9, 3.10, 3.11
42 changes: 35 additions & 7 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
// Keep in alphabetical order
{
"recommendations": [
"ms-python.vscode-pylance",
"ms-python.python",
"sonarsource.sonarlint-vscode",
"bungcip.better-toml",
"davidanson.vscode-markdownlint",
"shardulm94.trailing-spaces",
"eamodio.gitlens"
"eamodio.gitlens",
"emeraldwalk.runonsave",
"ms-python.autopep8",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode.powershell",
"pkief.material-icon-theme",
"redhat.vscode-xml",
"redhat.vscode-yaml",
],
"unwantedRecommendations": [
// Must disable in this workspace //
// https://github.com/microsoft/vscode/issues/40239 //
//
// VSCode has implemented an optimized version
"coenraads.bracket-pair-colorizer",
"coenraads.bracket-pair-colorizer-2",
"shardulm94.trailing-spaces",
// Obsoleted by Pylance
"ms-pyright.pyright",
"esbenp.prettier-vscode"
]
// Not configurable per workspace, tends to conflict with other linters
"sonarsource.sonarlint-vscode",
//
// Don't recommend to autoinstall //
//
// Use Ruff instead
"ms-python.flake8",
"ms-python.isort",
"ms-python.pylint",
// We use autopep8
"ms-python.black-formatter",
// This is a Git project
"johnstoncode.svn-scm",
// Prefer using VSCode itself as a text editor
"vscodevim.vim",
],
}
38 changes: 38 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
// 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 (debug non-user code)",
"type": "python",
"request": "launch",
"preLaunchTask": "Compile resources",
"program": "src/AutoSplit.py",
"console": "integratedTerminal",
"justMyCode": false
},
{
"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