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
16 changes: 1 addition & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update requirement files and deploy to ShinyApps.io
name: Deploy to ShinyApps.io
# useful links : https://docs.posit.co/shinyapps.io/guide/getting_started/#working-with-shiny-for-python

on:
Expand Down Expand Up @@ -32,20 +32,6 @@ jobs:
- name: Install the project
run: uv sync --locked --all-extras --dev

- name: Generate requirements.txt with `uv`
run: uv export --no-hashes -o abloc/requirements.txt

- name: Generate rsconnect-python manifest.json
run: uv run rsconnect write-manifest shiny abloc --entrypoint abloc.app:app --overwrite

- name: Commit and push changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add abloc/requirements.txt abloc/manifest.json
git commit -m ":wrench: ci: update requirements and manifest files" || echo "No changes to commit"
git push origin main

- name: Deploy to ShinyApps.io
run: |
uv run rsconnect add --account $SHINY_USERNAME --name $SHINY_USERNAME --token $SHINY_TOKEN --secret $SHINY_SECRET
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/lint_and_req.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Update requirement files and apply black linting

on:
pull_request:
branches:
- main # Trigger on pull requests to main

permissions:
contents: write
pages: write
id-token: write

jobs:
lint_and_update_requirements:
env:
UV_SYSTEM_PYTHON: true
runs-on: ubuntu-latest

steps:
- name: Checkout PR
uses: actions/checkout@v4

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

- name: Install the project
run: uv sync --locked --all-extras --dev

- name: Generate requirements.txt with `uv`
run: uv export --no-hashes -o abloc/requirements.txt

- name: Generate rsconnect-python manifest.json
run: uv run rsconnect write-manifest shiny abloc --entrypoint abloc.app:app --overwrite

- name: Commit and push changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add abloc/requirements.txt abloc/manifest.json
git commit -m ":wrench: ci: update requirements and manifest files" || echo "No req changes to commit"

- name: Apply black formatting
run: |
uv run black .

- name: Commit and push black changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m ":art: style: lint code with black" || echo "No black changes to commit"

- name: Push changes
if: github.event_name == 'pull_request' && github.head_ref != ''
run: |
git pull --rebase origin ${{ github.head_ref }}
git push origin HEAD:${{ github.head_ref }}
3 changes: 0 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
uv-example:
Expand Down
2 changes: 1 addition & 1 deletion abloc/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"files": {
"requirements.txt": {
"checksum": "777f0461496b0d0d8319b8d86aa2a587"
"checksum": "9018a9a91c428da333b6cf381ba5681d"
},
"app.py": {
"checksum": "270a25343aa9876e0d28816ef5983a02"
Expand Down
12 changes: 11 additions & 1 deletion abloc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ attrs==25.3.0
# referencing
babel==2.17.0
# via great-tables
black==25.1.0
# via abloc
certifi==2025.4.26
# via abloc
click==8.2.1
# via
# black
# rsconnect-python
# shiny
# uvicorn
Expand Down Expand Up @@ -105,6 +108,8 @@ mdit-py-plugins==0.4.2
# via shiny
mdurl==0.1.2
# via markdown-it-py
mypy-extensions==1.1.0
# via black
narwhals==1.41.0
# via
# plotly
Expand All @@ -122,6 +127,7 @@ orjson==3.10.18
# via shiny
packaging==25.0
# via
# black
# htmltools
# matplotlib
# plotly
Expand All @@ -131,14 +137,18 @@ pandas==2.3.0
# via seaborn
parso==0.8.4
# via jedi
pathspec==0.12.1
# via black
pexpect==4.9.0 ; sys_platform != 'emscripten' and sys_platform != 'win32'
# via ipython
pillow==11.2.1
# via matplotlib
pip==25.1.1
# via rsconnect-python
platformdirs==4.3.8
# via jupyter-core
# via
# black
# jupyter-core
plotly==6.1.2
# via abloc
pluggy==1.6.0
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description = "Find whether you're gonna run out of air."
readme = "README.md"
requires-python = ">=3.12, <3.13"
dependencies = [
"black>=25.1.0",
"certifi>=2025.4.26",
"great-tables>=0.17.0",
"libsass>=0.23.0",
Expand Down
40 changes: 40 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.