Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a1c053f
feat(cli)✨: Add CLI project initialization with Typer and cookiecutter
MatDagommer Dec 27, 2025
23cd66d
feat(dependencies)✨: add new core dependencies: typer, loguru, cookie…
MatDagommer Dec 27, 2025
d70414a
feat(template)📦: add pyproject.toml template for new projects with to…
MatDagommer Dec 27, 2025
e28e323
chore(pre-commit)🛠️: exclude scripts directory from interrogate doc c…
MatDagommer Dec 28, 2025
8aefcdd
feat(template):sprinkles:: add new project template with cookiecutter…
MatDagommer Dec 28, 2025
6a8db38
chore(deps)🔒: Update pyml-cli package hash in pixi.lock
MatDagommer Dec 28, 2025
895841e
refactor(package structure)🔨!: rename ml_cli package to pyml_cli and …
MatDagommer Dec 28, 2025
1243905
refactor(project-template)🏗️!: migrate project template from ml_cli t…
MatDagommer Dec 28, 2025
e2bbf09
test(init)🧪: remove empty test file for pyml-cli
MatDagommer Dec 28, 2025
a1d318b
chore(rename)🔄!: rename ml_cli package to pyml_cli across project files
MatDagommer Dec 28, 2025
6008876
feat(marimo-integration)📝: Add marimo notebook support and update pre…
MatDagommer Dec 28, 2025
c81aea0
fix(init)📝: update error message to reference correct package name
MatDagommer Dec 28, 2025
814264b
ci(github-actions)🤖: update workflows for improved caching, environme…
MatDagommer Dec 28, 2025
89ddb97
ci(github-actions)🧹: remove Ollama installation and model setup from …
MatDagommer Dec 28, 2025
fd888f6
chore(ci)🧹: remove bare-package test type and related steps from PR w…
MatDagommer Dec 28, 2025
d2e2d9e
feat(dependencies)➕: Add 'sh' as a new dependency to the project
MatDagommer Dec 28, 2025
7ada61c
fix(dependencies)🔧: pin sh dependency to version 2.1 and update relat…
MatDagommer Dec 28, 2025
031c4d1
ci(github-actions)🧹: remove uv environment from PR test matrix and re…
MatDagommer Dec 28, 2025
c23530e
fix(ci)🛠️: fix matrix environment-type and conditional for smoke test…
MatDagommer Dec 28, 2025
8e5e2ea
feat(templates)✨: add cookiecutter.json template for project scaffolding
MatDagommer Dec 29, 2025
8b57fdc
feat(cli)✨: Add system commands and refactor project initialization i…
MatDagommer Dec 29, 2025
11a855a
ci(pr-tests)🔧: Update smoke test command to use pyml --help instead o…
MatDagommer Dec 29, 2025
bdd0621
ci(github-actions)🔄: update test environment selection and smoke test…
MatDagommer Dec 29, 2025
cf20b09
ci(github-actions)🔄: update pr-tests workflow to use default environm…
MatDagommer Dec 29, 2025
3d724db
feat(utils)🛠️: Add utility function to read PyML config and correspon…
MatDagommer Dec 29, 2025
b5559f0
feat(cli)✨: add configure and version commands to CLI and switch conf…
MatDagommer Dec 29, 2025
51f6d17
ci(github-actions)🧪: update PR test workflow to use 'tests' environme…
MatDagommer Dec 29, 2025
ef81ff8
fix(ci)🔧: fix YAML syntax for environments array in GitHub Actions wo…
MatDagommer Dec 29, 2025
fb5ed7c
ci(github-actions)🧹: remove unused 'environments' parameter from pixi…
MatDagommer Dec 29, 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
2 changes: 1 addition & 1 deletion .bumpversion.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ post_commit_hooks = []
filename = "pyproject.toml"

[[tool.bumpversion.files]]
filename = "ml_cli/version.py"
filename = "pyml_cli/version.py"
21 changes: 15 additions & 6 deletions .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@ on: [pull_request]

jobs:
linting:
env:
UV_CACHE_DIR: /tmp/.uv-cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Setup uv
id: setup-uv
uses: astral-sh/setup-uv@v5
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Setup Pixi Environment
uses: prefix-dev/setup-pixi@v0.9.3
with:
enable-cache: true
- name: Run pre-commit
run: uvx pre-commit run --all-files
pixi-version: latest
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}

- name: Set up Python
run: uv python install

- uses: pre-commit/action@v3.0.1
57 changes: 51 additions & 6 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
build-docs:
Expand All @@ -17,24 +24,62 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- uses: prefix-dev/setup-pixi@v0.8.1
- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Setup Pixi Environment
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: latest
cache: true
environments: docs
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}

- name: Build docs
run: pixi run build-docs

- name: Verify build output
run: |
# Verify that markdown files are NOT in the site directory
# (They should be processed into HTML by MkDocs)
# The markdown files are generated by the pre-build hook, processed by MkDocs,
# and only the resulting HTML files should be in ./site
if find ./site -name "*.md" | grep -q .; then
echo "ERROR: Markdown files found in site directory!"
find ./site -name "*.md"
exit 1
fi
echo "✓ Build verification passed: No markdown files in site directory"
echo "✓ Site directory contains HTML files ready for deployment"

- name: Deploy website
uses: peaceiris/actions-gh-pages@v3
if: github.ref_name == 'main'
uses: peaceiris/actions-gh-pages@v4
with:
# https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-set-personal-access-token-personal_token
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site
# Note: This action deploys the contents of publish_dir (./site) to gh-pages.
# It does NOT check .gitignore - it simply takes all files in ./site and pushes them.
# Since ./site only contains HTML files (generated from markdown by MkDocs),
# no markdown files will be deployed. The markdown files exist only during
# the build process and are never committed to any branch.
personal_token: ${{ secrets.GHPAGES_DEPLOY_KEY }}
publish_dir: ./site
publish_branch: gh-pages
allow_empty_commit: false
keep_files: false
force_orphan: true
enable_jekyll: false

- name: Deploy PR Preview
if: github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main'
uses: rossjrw/pr-preview-action@v1.6.3
with:
# Note: This action works similarly - it deploys the contents of source-dir (./site)
# to create a preview. It also does NOT check .gitignore, but since ./site only
# contains HTML files, no markdown files will be included in the preview.
source-dir: ./site
preview-branch: gh-pages
101 changes: 62 additions & 39 deletions .github/workflows/pr-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1,84 @@
name: Run tests on pull requests

on: [pull_request]
on:
pull_request:
branches: [main]
push:
branches: [main]

env:
OPENAI_API_KEY: dummy_key

jobs:
run-tests:
check-changes:
runs-on: ubuntu-latest
name: Run test suite

# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
defaults:
run:
shell: bash -l {0}

outputs:
has-code-changes: ${{ steps.changes.outputs.has-code-changes }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: prefix-dev/setup-pixi@v0.8.1
uses: actions/checkout@v6
with:
cache: true
environments: tests
fetch-depth: 0

- name: Run tests
- name: Check for code changes
id: changes
run: |
pixi run test

# https://github.com/codecov/codecov-action
- name: Upload code coverage
uses: codecov/codecov-action@v2
with:
# fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

if [[ "${{ github.event_name }}" == "push" ]]; then
echo "has-code-changes=true" >> $GITHUB_OUTPUT
else
# For pull requests, check if there are non-docs changes
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -v '^docs/' | grep -v '\.md$' | grep -q .; then
echo "has-code-changes=true" >> $GITHUB_OUTPUT
else
echo "has-code-changes=false" >> $GITHUB_OUTPUT
fi
fi

# This helps us check that pyproject.toml's `project` table's `dependencies`
# are defined completely.
bare-install:
test-matrix:
needs: check-changes
runs-on: ubuntu-latest
name: Run bare installation test
name: ${{ matrix.test-type }} (Python ${{ matrix.python-version }}, ${{ matrix.environment-type }})
if: ${{ needs.check-changes.outputs.has-code-changes == 'true' }}

strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']
environment-type: ['pixi']
test-type: ['unit-tests', 'smoke-tests']

defaults:
run:
shell: bash -l {0}

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Update apt and install curl
run: |
sudo apt-get update
sudo apt-get install -y curl

- name: Setup Python
uses: actions/setup-python@v4
# Setup Pixi if needed
- name: Setup Pixi Environment
if: ${{ matrix.environment-type == 'pixi' }}
uses: prefix-dev/setup-pixi@v0.9.3
with:
python-version: ${{ matrix.python-version }}
pixi-version: latest
cache: true

- name: Install package
run: |
python -m pip install --upgrade pip
pip install -e .
# Run the appropriate test based on matrix variables
- name: Run unit tests
if: ${{ matrix.test-type == 'unit-tests' }}
run: pixi run -e tests test

- name: Run smoke tests (pixi)
if: ${{ matrix.test-type == 'smoke-tests' && github.repository_owner == 'matdagommer' }}
run: pixi run pyml --help

- name: Run CLI as a smoke test.
run: "pyml-cli --help"
# Upload code coverage only for unit tests
- name: Upload code coverage
if: ${{ matrix.test-type == 'unit-tests' }}
uses: codecov/codecov-action@v4
with:
verbose: true
9 changes: 2 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 25.11.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.10
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
exclude: ^notebooks/.*|^docs/.*$
exclude: ^notebooks/.*|^docs/.*|pyproject.toml|pyml_cli/templates/.*$
- repo: https://github.com/jendrikseipp/vulture
rev: 'v2.14'
hooks:
Expand All @@ -23,7 +18,7 @@ repos:
rev: 1.7.0
hooks:
- id: interrogate
exclude: ^(docs/|tests/)
exclude: ^(docs/|tests/|scripts/|notebooks/|pyml_cli/templates/)
args: [-c, pyproject.toml]
- repo: local
hooks:
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Top-level API for pyml-cli

::: ml_cli
::: pyml_cli
4 changes: 2 additions & 2 deletions docs/releases/v0.1.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ This release introduces automated version management and improves the release wo
### New Features

- Add `.bumpversion.toml` for automated version management, enabling consistent version bumping and tagging. (9c8dbf) (MatDagommer)
- Add `pyproject.toml` and `ml_cli/version.py` to the files tracked by bumpversion, ensuring all relevant files are updated during version bumps. (f105e4) (MatDagommer)
- Include `ml_cli/version.py` in the list of files updated by bumpversion. (be0d2e) (MatDagommer)
- Add `pyproject.toml` and `pyml_cli/version.py` to the files tracked by bumpversion, ensuring all relevant files are updated during version bumps. (f105e4) (MatDagommer)
- Include `pyml_cli/version.py` in the list of files updated by bumpversion. (be0d2e) (MatDagommer)

### Bug Fixes

Expand Down
Loading
Loading