Skip to content

Commit 972493e

Browse files
chore(deps): update from template
1 parent e02bb95 commit 972493e

30 files changed

Lines changed: 712 additions & 144 deletions

.copier-answers.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_commit: v0.13.13
1+
_commit: v0.14.4
22
_src_path: gh:helmut-hoffer-von-ankershoffen/oe-python-template
33
attestations_enabled: true
44
author_email: helmuthva@gmail.com
@@ -28,4 +28,3 @@ streamlit_project_key: oe-python-template-example
2828
uptime_badge_snippet: '[![Better Stack Badge](https://uptime.betterstack.com/status-badges/v1/monitor/1vzoq.svg)](https://helmut-hoffer-von-ankershoffen.betteruptime.com/)'
2929
vercel_badge_snippet: '[![Vercel Deploy](https://deploy-badge.vercel.app/vercel/oe-python-template-example?root=api%2Fv1%2Fhealthz)](https://oe-python-template-example.vercel.app/api/v1/hello/world)'
3030
vercel_function_enabled: true
31-

.github/workflows/test-scheduled.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,17 @@ jobs:
3535
fail_on_empty: false
3636

3737
- name: Run scheduled tests
38-
run: make test_scheduled
38+
env:
39+
BETTERSTACK_HEARTBEAT_URL: "${{ secrets.BETTERSTACK_HEARTBEAT_TEST_SCHEDULED_URL }}"
40+
run: |
41+
make test_scheduled
42+
EXIT_CODE=$?
43+
# Provide heartbeat to betterstack for monitoring/alerting if heartbeat url is configured as secret
44+
if [ -n "$BETTERSTACK_HEARTBEAT_ID" ]; then
45+
if [ $EXIT_CODE -eq 0 ]; then
46+
curl -s $BETTERSTACK_HEARTBEAT_URL
47+
else
48+
curl -s $BETTERSTACK_HEARTBEAT_URL/$EXIT_CODE
49+
fi
50+
fi
51+
exit $EXIT_CODE

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
# Environment
44
.env
5-
.env.backup
6-
.env.bak
5+
.env.*
6+
!.env.example
7+
.envrc
78
ENV/
89
env/
9-
.envrc
1010

1111
## secrets
1212
.secret
@@ -80,6 +80,10 @@ node_modules/
8080
# Copier
8181
*.rej
8282

83+
# Scalene
84+
profile.json
85+
profile.html
86+
8387

8488
# Vercel
8589
.vercel

ATTRIBUTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12113,7 +12113,7 @@ License: LGPL-2.1-or-later
1211312113

1211412114
```
1211512115

12116-
## oe-python-template-example (0.4.8) - MIT License
12116+
## oe-python-template-example (0.4.9) - MIT License
1211712117

1211812118
🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
1211912119

CLI_REFERENCE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $ oe-python-template-example [OPTIONS] COMMAND [ARGS]...
1414
* `--show-completion`: Show completion for the current shell, to copy it or customize the installation.
1515
* `--help`: Show this message and exit.
1616

17-
🧠 OE Python Template Example v0.4.8 - built with love in Berlin 🐻
17+
🧠 OE Python Template Example v0.4.9 - built with love in Berlin 🐻
1818

1919
**Commands**:
2020

@@ -256,5 +256,5 @@ $ oe-python-template-example system sleep [OPTIONS]
256256

257257
**Options**:
258258

259-
* `--seconds INTEGER`: Duration in seconds [default: 10]
259+
* `--seconds INTEGER`: Duration in seconds [default: 2]
260260
* `--help`: Show this message and exit.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Notes:
130130
To run the GUI in the browser with hot reloading, use the following command:
131131

132132
```shell
133-
make watch_gui
133+
make gui_watch
134134
```
135135

136136
### Running GitHub CI Workflow locally

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ HEALTHCHECK NONE
105105
# Default entrypoint is our CLI
106106
ENTRYPOINT ["oe-python-template-example"]
107107

108+
# See https://matplotlib.org/stable/install/environment_variables_faq.html
109+
ENV MPLCONFIGDIR=/tmp/matplotlib
108110

109111
# Target slim
110112
FROM target AS slim

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Makefile for running common development tasks
22

33
# Define all PHONY targets
4-
.PHONY: all act audit bump clean dist dist_vercel docs docker_build install lint pre_commit_run_all setup setup test test_scheduled test_long_running update_from_template watch_gui
4+
.PHONY: all act audit bump clean dist dist_vercel docs docker_build install lint pre_commit_run_all profile setup setup test test_scheduled test_long_running update_from_template gui_watch
55

66
# Main target i.e. default sessions defined in noxfile.py
77
all:
@@ -63,8 +63,11 @@ docker_build:
6363
pre_commit_run_all:
6464
uv run pre-commit run --all-files
6565

66-
watch_gui:
67-
uv run watch_gui.py
66+
gui_watch:
67+
uv run runner/gui_watch.py
68+
69+
profile:
70+
uv run --all-extras python -m scalene runner/scalene.py
6871

6972
# Special rule to catch any arguments (like patch, minor, major, pdf, Python versions, or x.y.z)
7073
# This prevents "No rule to make target" errors when passing arguments to make commands
@@ -85,14 +88,15 @@ help:
8588
@echo " dist_vercel - Package as Vercel Function into dist_vercel/"
8689
@echo " docs [pdf] - Build documentation (add pdf for PDF format)"
8790
@echo " docker_build - Build Docker image oe-python-template-example"
91+
@echo " gui_watch - Open GUI in browser and update on changes in source code"
8892
@echo " install - Install or update development dependencies inc. pre-commit hooks"
8993
@echo " lint - Run linting and formatting checks"
9094
@echo " pre_commit_run_all - Run pre-commit hooks on all files"
95+
@echo " profile - Profile with Scalene"
9196
@echo " setup - Setup development environment"
9297
@echo " test [3.11|3.12|3.13] - Run tests (for specific Python version)"
9398
@echo " test_scheduled - Run tests marked as scheduled with Python 3.11"
9499
@echo " test_long_running - Run tests marked as long running with Python 3.11"
95100
@echo " update_from_template - Update from template using copier"
96-
@echo " watch_gui - Open GUI in browser and watch for changes"
97101
@echo ""
98102
@echo "Built with love in Berlin 🐻"

noxfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,10 @@ def update_from_template(session: nox.Session) -> None:
691691
# In this case the template has been generated from a template
692692
session.run("copier", "update", "--trust", "--skip-answered", "--skip-tasks", external=True)
693693

694-
# Schedule the lint session to run after this session completes
695-
session.notify("audit")
696-
session.notify("docs")
697-
session.notify("lint")
694+
# Schedule the lint session to run after this session completes
695+
session.notify("audit")
696+
session.notify("docs")
697+
session.notify("lint")
698698

699699

700700
@nox.session(default=False)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ dev = [
120120
"pytest-watcher>=0.4.3",
121121
"pytest-xdist[psutil]>=3.6.1",
122122
"ruff>=0.11.6",
123+
"scalene>=1.5.51",
123124
"sphinx>=8.2.3",
124125
"sphinx-autobuild>=2024.10.3",
125126
"sphinx-copybutton>=0.5.2",

0 commit comments

Comments
 (0)