Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 15 additions & 15 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,28 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7

- name: Install requirements
run: |
uv pip install typer-invoke
inv pip install requirements-dev
uv run inv pip install requirements-dev

- name: Build app
run: inv build.app
run: uv run inv build app

- name: Upload to GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: inv build.upload
run: uv run inv build upload

windows:
runs-on: windows-latest
Expand All @@ -74,28 +74,28 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7

- name: Install requirements
run: |
uv pip install typer-invoke
inv pip install requirements-dev
uv run inv pip install requirements-dev

- name: Build app
run: inv build.app
run: uv run inv build app

- name: Upload to GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: inv build.upload
run: uv run inv build upload

linux:
runs-on: ubuntu-latest
Expand All @@ -105,7 +105,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Install libEGL
# Implementation of the EGL (Embedded-Systems Graphics Library) API.
Expand All @@ -120,17 +120,17 @@ jobs:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7

- name: Install requirements
run: |
uv pip install typer-invoke
inv pip install requirements-dev
uv run inv pip install requirements-dev

- name: Build app
run: inv build.app
run: uv run inv build app

- name: Upload to GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: inv build.upload
run: uv run inv build upload
11 changes: 8 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,22 @@ permissions:
jobs:
deploy-docs:
runs-on: ubuntu-latest
env:
UV_SYSTEM_PYTHON: '1'

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install requirements
run: pip install -r admin/requirements/requirements-docs.in
run: |
uv pip install typer-invoke
uv run inv pip sync requirements-docs

- name: Deploy docs
run: mkdocs gh-deploy --force
run: uv run mkdocs gh-deploy --force
8 changes: 4 additions & 4 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@v7

- name: Install requirements
run: |
uv pip install typer-invoke
inv pip install requirements-dev
uv run inv pip install requirements-dev

- name: Lint and type check
run: inv lint all --check
run: uv run inv lint all --check
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,22 @@ permissions:
jobs:
release:
runs-on: ubuntu-latest
env:
UV_SYSTEM_PYTHON: '1'

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install requirements
run: pip install -r admin/requirements/requirements-dev.in
run: |
uv pip install typer-invoke
uv run inv pip sync requirements-dev

- name: Set git user
run: |
Expand All @@ -75,17 +79,17 @@ jobs:
- name: Bump version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: inv build.version --bump ${{ github.event.inputs.version_bump }} --mode pr --yes
run: uv run inv build.version --bump ${{ github.event.inputs.version_bump }} --mode pr --yes

- name: Create release
if: github.event.inputs.create_release == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: inv build.release --notes "${{ github.event.inputs.release_notes }}" --yes
run: uv run inv build.release --notes "${{ github.event.inputs.release_notes }}" --yes

- name: Publish to Pypi
if: github.event.inputs.publish == 'true'
env:
FLIT_USERNAME: "__token__"
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: inv build.publish --yes
run: uv run inv build.publish --yes
11 changes: 6 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ jobs:
# Min and max versions supported
python-version: ['3.12', '3.14']
name: Python ${{ matrix.python-version }}

steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Install libEGL (Linux only)
# Implementation of the EGL (Embedded-Systems Graphics Library) API.
Expand All @@ -32,22 +33,22 @@ jobs:
architecture: x64

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7

- name: Install requirements
run: |
uv pip install typer-invoke
inv pip install requirements-dev
uv run inv pip install requirements-dev

- name: Run tests on Linux and Mac
# Test folder(s) configured in `pyproject.toml`
# Skip Windows OS tests
run: |
python -m pytest . -m "not windows"
uv run python -m pytest . -m "not windows"
if: runner.os != 'Windows'

- name: Run tests on Windows
# Test folder(s) configured in `pyproject.toml`
run: |
python -m pytest .
uv run python -m pytest .
if: runner.os == 'Windows'
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

Prevent external HD's from becoming inactive (sleeping).

In a world of SSD's, an app like this is not as needed, but if you still have an HD hooked up that
goes to sleep and takes a while to access, this app can help.

In my particular case, have an HD that constantly goes to sleep and can't find the drivers to
prevent that. Wanted to learn a bit more about Qt, so went ahead and made this.

**[https://joaonc.github.io/hd_active](https://joaonc.github.io/hd_active)**

## Quick start
Expand Down
2 changes: 1 addition & 1 deletion admin/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def _create_pr(title: str, description: str, dry: bool):
)

# Merge PR after checks pass
run('gh', 'pr', 'merge', 'branch', '--squash', '--auto', dry=dry)
run('gh', 'pr', 'merge', branch, '--squash', '--auto', dry=dry)


@app.command(name='clean')
Expand Down
Loading