Skip to content
This repository was archived by the owner on Oct 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a6d2840
chore: sync config files from .config-templates
tschm Aug 25, 2025
1c39bef
Merge pull request #21 from tschm/sync/update-configs
tschm Aug 25, 2025
fa58161
fix(deps): update dependency marimo to ~=0.15.0 (#22)
renovate[bot] Aug 26, 2025
383737c
chore: sync config files from .config-templates
tschm Sep 1, 2025
c989655
chore(deps): lock file maintenance (#24)
renovate[bot] Sep 1, 2025
ffeb15c
Merge pull request #25 from tschm/sync/update-configs
tschm Sep 1, 2025
69fb6c9
Merge branch 'cvxgrp:main' into main
tschm Sep 7, 2025
9c7c0a4
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.1…
renovate[bot] Sep 7, 2025
bc6fda0
chore(deps): update softprops/action-gh-release action to v2.3.3 (#27)
renovate[bot] Sep 7, 2025
b34062a
chore: sync config files from .config-templates
tschm Sep 8, 2025
56380d3
chore(deps): lock file maintenance (#28)
renovate[bot] Sep 8, 2025
0d13d76
Merge pull request #29 from tschm/sync/update-configs
tschm Sep 8, 2025
15fb026
chore: sync config files from .config-templates
tschm Sep 15, 2025
67ecc2e
Merge pull request #30 from tschm/sync/update-configs
tschm Sep 15, 2025
77cb80e
chore: sync config files from .config-templates
tschm Sep 22, 2025
7119ebd
Merge pull request #31 from tschm/sync/update-configs
tschm Sep 22, 2025
a755425
Delete .devcontainer directory
tschm Sep 24, 2025
ceeadf2
Delete .github/taskfiles directory
tschm Sep 24, 2025
ab7d324
Delete .github/CODE_OF_CONDUCT.md
tschm Sep 24, 2025
32529e3
Delete .github/CONTRIBUTING.md
tschm Sep 24, 2025
db9dd3d
Update sync.yml
tschm Sep 24, 2025
551eeb3
Create .github/template.yml for repository templates
tschm Sep 26, 2025
3a4ca5b
Change template branch from '77-hot' to 'main'
tschm Sep 27, 2025
c4cb0fd
Update sync.yml
tschm Sep 27, 2025
5cbb68e
chore: sync template files
github-actions[bot] Sep 27, 2025
311cfd7
Merge pull request #32 from tschm/template-updates
tschm Sep 27, 2025
515eefa
chore: sync template files
github-actions[bot] Sep 29, 2025
6697cad
Merge pull request #33 from tschm/template-updates
tschm Sep 29, 2025
045e061
chore: sync template files
github-actions[bot] Oct 6, 2025
739aeef
Merge pull request #34 from tschm/template-updates
tschm Oct 6, 2025
c6c8e58
Merge branch 'main' into main
tschm Oct 6, 2025
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
19 changes: 0 additions & 19 deletions .devcontainer/devcontainer.json

This file was deleted.

14 changes: 14 additions & 0 deletions .github/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
template-repository: "tschm/.config-templates"
template-branch: "main"
include: |
.github
taskfiles
tests
.editorconfig
.gitignore
.pre-commit-config.yaml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Makefile
ruff.toml
Taskfile.yml
6 changes: 4 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# It combines API documentation, test coverage reports, test results, and
# interactive notebooks into a single GitHub Pages site.
#
# Trigger: This workflow runs on every push to the main branch
# Trigger: This workflow runs on every push to the main or master branch
#
# Components:
# - 📓 Process Marimo notebooks
Expand All @@ -18,7 +18,9 @@ name: "BOOK"

on:
push:
branches: [ main ]
branches:
- main
- master

jobs:
book:
Expand Down
34 changes: 7 additions & 27 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This file is part of the tschm/.config-templates repository
# (https://github.com/tschm/.config-templates).
#
# Workflow: Sync
# Purpose: This workflow synchronizes configuration files from the template repository
# to other repositories, creating a pull request with the changes.
Expand All @@ -19,32 +16,15 @@ on:
schedule:
- cron: '0 0 * * 1' # Weekly on Monday at midnight

permissions:
contents: write # Needed to create releases

jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout the target repo
uses: actions/checkout@v5

- name: Sync config templates
uses: tschm/.config-templates@main
with:
branch: sync/update-configs
commit-message: sync config files from .config-templates

# Override the token for create-pull-request action using the PAT secret
- name: Create Pull Request (override token)
uses: peter-evans/create-pull-request@v7
- name: Sync Template
id: sync
uses: jebel-quant/[email protected]
with:
token: ${{ secrets.PAT_TOKEN }} # Use PAT token here
commit-message:
"chore: sync config files from .config-templates"
branch: sync/update-configs
title:
"chore: sync config files from .config-templates"
body: |
This PR updates config files from [tschm/.config-templates](https://github.com/tschm/.config-templates).
delete-branch: true
token: ${{ secrets.PAT_TOKEN }}
source: ".github/template.yml"
branch: "template-updates"
commit-message: "chore: sync template files"
76 changes: 10 additions & 66 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
# This file is part of the tschm/.config-templates repository
# (https://github.com/tschm/.config-templates).
#
docs
.DS_Store
_pdoc
_book
_tests
_marimushka

# temp file used by Junie
.output.txt

# .env file for configuration, e.g. OpenBB
.env
### Python template

quantstats.md
/_tests
/_book

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*.py[cod]
*$py.class

# C extensions
Expand Down Expand Up @@ -64,7 +51,7 @@ htmlcov/
nosetests.xml
coverage.xml
*.cover
*.py.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
Expand Down Expand Up @@ -112,36 +99,23 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
#poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
#pdm.lock
#pdm.toml
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
#pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

Expand All @@ -153,7 +127,7 @@ celerybeat.pid
*.sage.py

# Environments
.envrc
.env
.venv
env/
venv/
Expand Down Expand Up @@ -192,33 +166,3 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
.vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Cursor
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
# refer to https://docs.cursor.com/context/ignore-files
.cursorignore
.cursorindexingignore

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-yaml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.13.1'
rev: 'v0.13.2'
hooks:
- id: ruff
args: [ --fix, --exit-non-zero-on-fix, --unsafe-fixes ]
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ RESET := \033[0m
.PHONY: build clean book check

install: ## install
task build:install
task build:install -s

clean: ## clean
task cleanup:clean
task cleanup:clean -s

test: install ## run all tests
task docs:test
task docs:test -s

book: test ## compile the companion book
task docs:docs
task docs:marimushka
task docs:book
task docs:docs -s
task docs:marimushka -s
task docs:book -s

check: install ## check the pre-commit hooks, the linting and deptry
task quality:check
task quality:check -s

help: ## Display this help message
@printf "$(BOLD)Usage:$(RESET)\n"
Expand Down
2 changes: 2 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ env:
LOG_SUCCESS: 'printf "${GREEN}[SUCCESS] %s${RESET}\n"'
LOG_ERROR: 'printf "${RED}[ERROR] %s${RESET}\n"'

PATH: "{{.HOME}}/.local/bin:{{.PATH}}"

# Include task groups
includes:
build:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dev = [
"pytest-cov>=6.0.0",
"pytest>=8.3.3",
"pre-commit>=4.2.0",
"marimo~=0.14.17"
"marimo~=0.15.0"
]

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion taskfiles/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tasks:
cmds:
- |
if [ -f "pyproject.toml" ]; then
uvx hatch build
uvx hatch build || { printf "${RED}[ERROR] Build failed${RESET}\n"; exit 1; }
else
printf "${YELLOW}[WARN] No pyproject.toml found, skipping build${RESET}\n"
fi
31 changes: 20 additions & 11 deletions taskfiles/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tasks:
- |
# Find source folder
SOURCE_FOLDER="src/$(find src -mindepth 1 -maxdepth 1 -type d -not -path '*/\.*' | head -1 | sed 's|^src/||')"

if [ -z "$SOURCE_FOLDER" ] || [ -z "{{.TESTS_FOLDER}}" ]; then
printf "${YELLOW}[WARN] No valid source folder structure found, skipping tests${RESET}\n"
else
Expand Down Expand Up @@ -44,7 +44,7 @@ tasks:
else
printf "${YELLOW}[WARN] No pyproject.toml found, skipping docs${RESET}\n"
fi

marimushka:
desc: Export Marimo notebooks to HTML
cmds:
Expand All @@ -54,6 +54,7 @@ tasks:
if [ ! -d "{{.MARIMO_FOLDER}}" ]; then
printf "${YELLOW}[WARN] Directory '{{.MARIMO_FOLDER}}' does not exist. Skipping marimushka.${RESET}\n"
else
uv pip install marimo
mkdir -p _marimushka
py_files=$(find "{{.MARIMO_FOLDER}}" -maxdepth 1 -name "*.py" | tr '\n' ' ')
if [ -z "$py_files" ]; then
Expand All @@ -67,7 +68,15 @@ tasks:
dir_path=$(dirname "$rel_path")
base_name=$(basename "$rel_path" .py)
mkdir -p "_marimushka/$dir_path"
uvx marimo export html --include-code --sandbox --output "_marimushka/$dir_path/$base_name.html" "$py_file"

# Check if the file has a script header ("# /// script")
if grep -q "^# /// script" "$py_file"; then
printf " ${BLUE}[INFO] Script header detected, using --sandbox flag...${RESET}\n"
uvx marimo export html --sandbox --include-code --output "_marimushka/$dir_path/$base_name.html" "$py_file"
else
printf " ${BLUE}[INFO] No script header detected, using standard export...${RESET}\n"
uv run marimo export html --include-code --output "_marimushka/$dir_path/$base_name.html" "$py_file"
fi
done
echo "<html><head><title>Marimo Notebooks</title></head><body><h1>Marimo Notebooks</h1><ul>" > _marimushka/index.html
find _marimushka -name "*.html" -not -path "*index.html" | sort | while read html_file; do
Expand All @@ -79,7 +88,7 @@ tasks:
touch _marimushka/.nojekyll
fi
fi

book:
desc: Build the companion book with test results and notebooks
cmds:
Expand All @@ -98,7 +107,7 @@ tasks:
else
echo '{}' > _book/links.json
fi

printf "${BLUE}[INFO] Copy coverage report...${RESET}\n"
if [ -d _tests/html-coverage ] && [ "$(ls -A _tests/html-coverage 2>/dev/null)" ]; then
mkdir -p _book/tests/html-coverage
Expand All @@ -107,7 +116,7 @@ tasks:
else
printf "${YELLOW}[WARN] No coverage report found or directory is empty${RESET}\n"
fi

printf "${BLUE}[INFO] Copy test report...${RESET}\n"
if [ -d _tests/html-report ] && [ "$(ls -A _tests/html-report 2>/dev/null)" ]; then
mkdir -p _book/tests/html-report
Expand All @@ -116,7 +125,7 @@ tasks:
else
printf "${YELLOW}[WARN] No test report found or directory is empty${RESET}\n"
fi

printf "${BLUE}[INFO] Copy notebooks...${RESET}\n"
if [ -d _marimushka ] && [ "$(ls -A _marimushka 2>/dev/null)" ]; then
mkdir -p _book/marimushka
Expand All @@ -126,14 +135,14 @@ tasks:
else
printf "${YELLOW}[WARN] No notebooks found or directory is empty${RESET}\n"
fi

printf "${BLUE}[INFO] Generated links.json:${RESET}\n"
cat _book/links.json

uvx minibook --title "{{.BOOK_TITLE}}" --subtitle "{{.BOOK_SUBTITLE}}" --links "$(cat _book/links.json)" --output "_book"

touch "_book/.nojekyll"

marimo:
desc: Start a Marimo server
cmds:
Expand Down
3 changes: 2 additions & 1 deletion taskfiles/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ tasks:
cmds:
- |
if [ -f "pyproject.toml" ]; then
SOURCE_FOLDER="src/$(find src -mindepth 1 -maxdepth 1 -type d -not -path '*/\.*' | head -1 | sed 's|^src/||')"
SOURCE_FOLDER="$(fd -td . src -d1 --exclude '.*' | head -1)" : "${SOURCE_FOLDER:=src}"
# SOURCE_FOLDER="src/$(find src -mindepth 1 -maxdepth 1 -type d -not -path '*/\.*' | head -1 | sed 's|^src/||')"
uvx deptry $SOURCE_FOLDER {{.OPTIONS}}
else
printf "${YELLOW}[WARN] No pyproject.toml found, skipping deptry${RESET}\n"
Expand Down
Loading
Loading