mldebug 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ # Top-most EditorConfig file.
2
+ root = true
3
+
4
+ # Default settings for all files.
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+ indent_style = space
11
+ indent_size = 2
12
+
13
+ # Python files.
14
+ [*.py]
15
+ indent_size = 4
mldebug-0.0.1/.envrc ADDED
@@ -0,0 +1,67 @@
1
+ # =========================
2
+ # Tool versions (pinned)
3
+ # =========================
4
+ PYTHON_VERSION=3.10.20
5
+ UV_VERSION=0.11.7
6
+
7
+ # =========================
8
+ # Load environment files
9
+ # =========================
10
+ if [ -f .env ]; then
11
+ set -o allexport
12
+ source .env
13
+ set +o allexport
14
+ fi
15
+
16
+ if [ -f .env.local ]; then
17
+ set -o allexport
18
+ source .env.local
19
+ set +o allexport
20
+ fi
21
+
22
+ # =========================
23
+ # Install uv (pinned)
24
+ # =========================
25
+ UV_BIN="$PWD/.local/bin/uv"
26
+
27
+ if [ ! -x "$UV_BIN" ] || ! "$UV_BIN" --version | grep -q "$UV_VERSION"; then
28
+ curl --proto '=https' --tlsv1.2 -LsSf \
29
+ https://github.com/astral-sh/uv/releases/download/$UV_VERSION/uv-installer.sh \
30
+ | UV_UNMANAGED_INSTALL="$PWD/.local/bin" sh
31
+ fi
32
+
33
+ export PATH="$PWD/.local/bin:$PATH"
34
+
35
+ # =========================
36
+ # Ensure uv.lock exists
37
+ # =========================
38
+ if [ ! -f uv.lock ]; then
39
+ uv lock
40
+ fi
41
+
42
+ # =========================
43
+ # Create / validate venv
44
+ # =========================
45
+ VENV_PYTHON=""
46
+ if [ -x ".venv/bin/python" ]; then
47
+ VENV_PYTHON=$(.venv/bin/python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}')")
48
+ fi
49
+
50
+ if [ ! -d .venv ] || [ "$VENV_PYTHON" != "$PYTHON_VERSION" ]; then
51
+ uv venv --python "$PYTHON_VERSION"
52
+ fi
53
+
54
+ # =========================
55
+ # Activate venv
56
+ # =========================
57
+ if [ -f .venv/bin/activate ]; then
58
+ set -o allexport
59
+ source .venv/bin/activate
60
+ set +o allexport
61
+ unset PS1
62
+ fi
63
+
64
+ # =========================
65
+ # Sync dependencies
66
+ # =========================
67
+ uv sync --frozen
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,99 @@
1
+ name: CI
2
+
3
+ concurrency:
4
+ group: ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress: true
6
+
7
+ on:
8
+ push:
9
+ branches:
10
+ - main
11
+ tags:
12
+ - "v*"
13
+ pull_request:
14
+ types: [opened, synchronize, reopened]
15
+
16
+ jobs:
17
+ lint:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+ - name: Run linting
22
+ run: |
23
+ source .envrc
24
+ poe lint-ci-all
25
+
26
+ test:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v6
30
+ - name: Run tests
31
+ run: |
32
+ source .envrc
33
+ poe test-all
34
+ - name: Upload coverage
35
+ uses: codecov/codecov-action@v5
36
+ with:
37
+ token: ${{ secrets.CODECOV_TOKEN }}
38
+ files: ./coverage.xml
39
+ flags: unittests
40
+ name: codecov-umbrella
41
+
42
+ build:
43
+ needs: [lint, test]
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v6
47
+ - name: Build package and docs
48
+ run: |
49
+ source .envrc
50
+ pdoc src/* -d numpy -o ./docs --no-show-source
51
+ uv sync --no-dev --frozen
52
+ uv build --out-dir ./dist
53
+ - name: Upload package artifacts
54
+ uses: actions/upload-artifact@v7
55
+ with:
56
+ name: dist
57
+ path: dist/
58
+ - name: Upload docs artifacts
59
+ uses: actions/upload-artifact@v7
60
+ with:
61
+ name: docs
62
+ path: docs/
63
+
64
+ deploy-docs:
65
+ if: startsWith(github.ref, 'refs/tags/v')
66
+ needs: build
67
+ runs-on: ubuntu-latest
68
+ steps:
69
+ - uses: actions/checkout@v6
70
+ - name: Download docs artifacts
71
+ uses: actions/download-artifact@v8
72
+ with:
73
+ name: docs
74
+ path: docs/
75
+ - name: Deploy to GitHub Pages
76
+ uses: peaceiris/actions-gh-pages@v4
77
+ with:
78
+ github_token: ${{ secrets.GITHUB_TOKEN }}
79
+ publish_dir: docs/
80
+
81
+ publish:
82
+ if: startsWith(github.ref, 'refs/tags/v')
83
+ needs: build
84
+ runs-on: ubuntu-latest
85
+ environment: pypi
86
+ permissions:
87
+ id-token: write
88
+ contents: read
89
+ steps:
90
+ - uses: actions/checkout@v6
91
+ - name: Download package artifacts
92
+ uses: actions/download-artifact@v8
93
+ with:
94
+ name: dist
95
+ path: dist/
96
+ - name: Publish to PyPI
97
+ uses: pypa/gh-action-pypi-publish@release/v1
98
+ with:
99
+ packages-dir: dist/
@@ -0,0 +1,78 @@
1
+ # =========================
2
+ # Python virtual environments
3
+ # =========================
4
+ .venv/
5
+ venv/
6
+ env/
7
+
8
+ # =========================
9
+ # Bytecode / caches
10
+ # =========================
11
+ **/*.pyc
12
+ __pycache__/
13
+ *.pyo
14
+ *.pyd
15
+
16
+ # =========================
17
+ # IDEs
18
+ # =========================
19
+ .idea/
20
+ !.idea/runConfigurations/
21
+ .vscode/
22
+
23
+ # =========================
24
+ # Jupyter
25
+ # =========================
26
+ .ipynb_checkpoints/
27
+
28
+ # =========================
29
+ # Ruff / lint caches
30
+ # =========================
31
+ .ruff_cache/
32
+ .mypy_cache/
33
+ .pyright/
34
+ .pytype/
35
+
36
+ # =========================
37
+ # Build artifacts
38
+ # =========================
39
+ build/
40
+ dist/
41
+ .eggs/
42
+ *.egg-info/
43
+ *.egg
44
+
45
+ # =========================
46
+ # Testing / coverage
47
+ # =========================
48
+ .pytest_cache/
49
+ .coverage*
50
+ coverage.xml
51
+ htmlcov/
52
+
53
+ # =========================
54
+ # Documentation builds
55
+ # =========================
56
+ docs/
57
+ site/
58
+
59
+ # =========================
60
+ # Environment files
61
+ # =========================
62
+ .env
63
+ .env.*
64
+ !.env.example
65
+ !.envrc
66
+
67
+ # =========================
68
+ # Local tooling / system files
69
+ # =========================
70
+ .local/
71
+ .tox/
72
+ .mypy_cache/
73
+
74
+ # =========================
75
+ # OS junk
76
+ # =========================
77
+ .DS_Store
78
+ Thumbs.db
mldebug-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andreas Pentaliotis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
mldebug-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: mldebug
3
+ Version: 0.0.1
4
+ Summary: mldebug is a lightweight Python toolkit for debugging machine learning systems in production.
5
+ Project-URL: Homepage, https://github.com/anpenta/mldebug
6
+ Project-URL: Repository, https://github.com/anpenta/mldebug
7
+ Project-URL: Documentation, https://anpenta.github.io/mldebug
8
+ Project-URL: Issues, https://github.com/anpenta/mldebug/issues
9
+ Author-email: Andreas Pentaliotis <40018182+anpenta@users.noreply.github.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: debugging,machine-learning,ml,monitoring,production
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
+ Classifier: Typing :: Typed
27
+ Requires-Python: >=3.10
28
+ Description-Content-Type: text/markdown
29
+
30
+ # mldebug
31
+
32
+ [![CI](https://github.com/anpenta/mldebug/actions/workflows/ci.yml/badge.svg)](https://github.com/anpenta/mldebug/actions/workflows/ci.yml)
33
+ [![codecov](https://codecov.io/gh/anpenta/mldebug/graph/badge.svg?token=XPN447G4S9)](https://codecov.io/gh/anpenta/mldebug)
34
+
35
+ mldebug is a lightweight Python toolkit for debugging machine learning systems in production.
36
+
37
+ ## Quick Start
38
+
39
+ ```bash
40
+ git clone https://github.com/anpenta/mldebug
41
+ cd mldebug
42
+ direnv allow
43
+ poe test
44
+ ```
45
+
46
+ ## Status
47
+
48
+ Active development (v0.x, not yet stable).
49
+
50
+ ## Features
51
+
52
+ - Debug ML systems in production environments
53
+ - Lightweight diagnostic utilities
54
+ - Designed for integration into modern ML pipelines
55
+ - Focus on observability and failure analysis
56
+
57
+ ## Installation
58
+
59
+ ```bash
60
+ pip install mldebug
61
+ ```
62
+
63
+ ## Example Usage
64
+
65
+ See [tests/test_public_api.py](tests/test_public_api.py) for real usage examples.
66
+
67
+ ## Documentation
68
+
69
+ See [github pages](https://anpenta.github.io/mldebug).
70
+
71
+ ## Development Setup
72
+
73
+ ### Requirements
74
+
75
+ - [Ubuntu 24.04.4](https://releases.ubuntu.com/noble/) (recommended) or [WSL](https://ubuntu.com/desktop/wsl)
76
+ - [Git](https://git-scm.com/)
77
+ - [direnv](https://direnv.net/)
78
+
79
+ ### Environment Setup
80
+
81
+ If not already done via [Quick Start](#quick-start):
82
+
83
+ ```bash
84
+ direnv allow
85
+ ```
86
+
87
+ ## Development Workflow
88
+
89
+ Tasks are managed via [poe](https://poethepoet.natn.io/index.html) (available in the project environment via direnv).
90
+
91
+ ### Run tests
92
+
93
+ ```bash
94
+ poe test
95
+ ```
96
+
97
+ ### Run linting
98
+
99
+ ```bash
100
+ poe lint
101
+ ```
102
+
103
+ ### Run full CI parity checks
104
+
105
+ ```bash
106
+ poe test-all
107
+ poe lint-ci-all
108
+ ```
109
+
110
+ ### CI/CD
111
+
112
+ CI runs multi-Python version testing and linting. All pull requests must pass the checks. Merging is blocked unless all checks pass.
113
+
114
+ See [.github/workflows/ci.yml](.github/workflows/ci.yml) for details.
115
+
116
+ ## Contributing
117
+
118
+ 1. Fork the repository
119
+ 2. Create a feature branch
120
+ 3. Make your changes
121
+ 4. Ensure all CI checks pass
122
+ 5. Open a pull request
123
+
124
+ ## Dependency Management
125
+
126
+ Dependencies are [managed using uv](https://docs.astral.sh/uv/concepts/projects/dependencies/) and defined in [pyproject.toml](pyproject.toml).
127
+
128
+ ## License
129
+
130
+ See [LICENSE](LICENSE).
@@ -0,0 +1,101 @@
1
+ # mldebug
2
+
3
+ [![CI](https://github.com/anpenta/mldebug/actions/workflows/ci.yml/badge.svg)](https://github.com/anpenta/mldebug/actions/workflows/ci.yml)
4
+ [![codecov](https://codecov.io/gh/anpenta/mldebug/graph/badge.svg?token=XPN447G4S9)](https://codecov.io/gh/anpenta/mldebug)
5
+
6
+ mldebug is a lightweight Python toolkit for debugging machine learning systems in production.
7
+
8
+ ## Quick Start
9
+
10
+ ```bash
11
+ git clone https://github.com/anpenta/mldebug
12
+ cd mldebug
13
+ direnv allow
14
+ poe test
15
+ ```
16
+
17
+ ## Status
18
+
19
+ Active development (v0.x, not yet stable).
20
+
21
+ ## Features
22
+
23
+ - Debug ML systems in production environments
24
+ - Lightweight diagnostic utilities
25
+ - Designed for integration into modern ML pipelines
26
+ - Focus on observability and failure analysis
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install mldebug
32
+ ```
33
+
34
+ ## Example Usage
35
+
36
+ See [tests/test_public_api.py](tests/test_public_api.py) for real usage examples.
37
+
38
+ ## Documentation
39
+
40
+ See [github pages](https://anpenta.github.io/mldebug).
41
+
42
+ ## Development Setup
43
+
44
+ ### Requirements
45
+
46
+ - [Ubuntu 24.04.4](https://releases.ubuntu.com/noble/) (recommended) or [WSL](https://ubuntu.com/desktop/wsl)
47
+ - [Git](https://git-scm.com/)
48
+ - [direnv](https://direnv.net/)
49
+
50
+ ### Environment Setup
51
+
52
+ If not already done via [Quick Start](#quick-start):
53
+
54
+ ```bash
55
+ direnv allow
56
+ ```
57
+
58
+ ## Development Workflow
59
+
60
+ Tasks are managed via [poe](https://poethepoet.natn.io/index.html) (available in the project environment via direnv).
61
+
62
+ ### Run tests
63
+
64
+ ```bash
65
+ poe test
66
+ ```
67
+
68
+ ### Run linting
69
+
70
+ ```bash
71
+ poe lint
72
+ ```
73
+
74
+ ### Run full CI parity checks
75
+
76
+ ```bash
77
+ poe test-all
78
+ poe lint-ci-all
79
+ ```
80
+
81
+ ### CI/CD
82
+
83
+ CI runs multi-Python version testing and linting. All pull requests must pass the checks. Merging is blocked unless all checks pass.
84
+
85
+ See [.github/workflows/ci.yml](.github/workflows/ci.yml) for details.
86
+
87
+ ## Contributing
88
+
89
+ 1. Fork the repository
90
+ 2. Create a feature branch
91
+ 3. Make your changes
92
+ 4. Ensure all CI checks pass
93
+ 5. Open a pull request
94
+
95
+ ## Dependency Management
96
+
97
+ Dependencies are [managed using uv](https://docs.astral.sh/uv/concepts/projects/dependencies/) and defined in [pyproject.toml](pyproject.toml).
98
+
99
+ ## License
100
+
101
+ See [LICENSE](LICENSE).
@@ -0,0 +1,123 @@
1
+ [project]
2
+ name = "mldebug"
3
+ description = "mldebug is a lightweight Python toolkit for debugging machine learning systems in production."
4
+ authors = [{name = "Andreas Pentaliotis", email = "40018182+anpenta@users.noreply.github.com"}]
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = "MIT"
8
+ keywords = ["machine-learning", "debugging", "production", "ml", "monitoring"]
9
+ dynamic = ["version"]
10
+
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Intended Audience :: Developers",
14
+ "Intended Audience :: Science/Research",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Operating System :: OS Independent",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: Python :: 3.14",
23
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ "Typing :: Typed",
26
+ ]
27
+
28
+ dependencies = [
29
+ ]
30
+
31
+ [project.urls]
32
+ Homepage = "https://github.com/anpenta/mldebug"
33
+ Repository = "https://github.com/anpenta/mldebug"
34
+ Documentation = "https://anpenta.github.io/mldebug"
35
+ Issues = "https://github.com/anpenta/mldebug/issues"
36
+
37
+ [dependency-groups]
38
+ dev = [
39
+ "pyright[nodejs]>=1.1.408",
40
+ "poethepoet>=0.42.1",
41
+ "pytest>=9.0.2",
42
+ "pytest-cov>=7.1.0",
43
+ "ruff>=0.15.7",
44
+ "pdoc>=16.0.0",
45
+ "tox>=4.50.3",
46
+ "tox-uv-bare>=1.35.1",
47
+ ]
48
+
49
+ [build-system]
50
+ requires = ["hatchling", "uv-dynamic-versioning"]
51
+ build-backend = "hatchling.build"
52
+
53
+ [tool.hatch.version]
54
+ source = "uv-dynamic-versioning"
55
+
56
+ [tool.uv-dynamic-versioning]
57
+ fallback-version = "0.0.0" # Used when no git-based version can be resolved.
58
+
59
+ [tool.poe]
60
+ default_array_item_task_type = "cmd"
61
+ executor.type = "simple"
62
+
63
+ [tool.poe.tasks]
64
+
65
+ test = "pytest --cov=mldebug --cov-report=term --cov-report=xml:coverage.xml --durations=0 --durations-min=0.5"
66
+ test-all.sequence = [
67
+ # We combine the coverage from all environment runs to provide a unified report.
68
+ "coverage erase",
69
+ "tox run -- poe test --cov-append"
70
+ ]
71
+
72
+ lint-ci.sequence = [
73
+ "ruff format --diff",
74
+ "ruff check --no-fix",
75
+ "pyright src",
76
+ "uv lock --check"
77
+ ]
78
+ lint-ci.ignore_fail = "return_non_zero" # Ensures all lint checks run even if one fails.
79
+ lint-ci-all = "tox run -- poe lint-ci"
80
+
81
+ lint = [
82
+ "ruff format",
83
+ "ruff check --fix",
84
+ "pyright src",
85
+ "uv lock --check"
86
+ ]
87
+
88
+ [tool.tox]
89
+ envlist = ["py310", "py311", "py312", "py313", "py314"]
90
+ requires = ["tox>=4.0"]
91
+ skip_missing_interpreters = false
92
+
93
+ [tool.tox.env_run_base]
94
+ runner = "uv-venv-lock-runner"
95
+ package = "uv"
96
+ dependency_groups = ["dev"]
97
+ # Allows forwarding commands through tox for reusable task execution.
98
+ commands = [[ { replace = "posargs", extend = true } ]]
99
+
100
+ [tool.ruff]
101
+ line-length = 120
102
+ lint.select = ["ALL"]
103
+ lint.ignore = [
104
+ "COM812",
105
+ "TRY003",
106
+ "D203",
107
+ "D211",
108
+ "D213",
109
+ ]
110
+
111
+ [tool.ruff.lint.per-file-ignores]
112
+ "tests/**/*.py" = [
113
+ "D100",
114
+ "D103",
115
+ "D104",
116
+ "ANN001",
117
+ "ANN201",
118
+ "S101",
119
+ ]
120
+
121
+ [tool.pyright]
122
+ typeCheckingMode = "strict"
123
+ reportMissingImports = false
@@ -0,0 +1,11 @@
1
+ """mldebug: A lightweight Python toolkit for debugging machine learning systems in production.
2
+
3
+ This module provides the public API for the mldebug package, including utilities for monitoring, diagnosing,
4
+ and troubleshooting ML pipelines in production environments.
5
+ """
6
+
7
+ from ._example import run_public_func
8
+
9
+ __all__ = [
10
+ "run_public_func",
11
+ ]
@@ -0,0 +1,12 @@
1
+ """Example module demonstrating public and private function patterns.
2
+
3
+ This module shows how public APIs can use private helper functions within the mldebug package.
4
+ """
5
+
6
+
7
+ def run_public_func() -> None:
8
+ _run_private_func()
9
+
10
+
11
+ def _run_private_func() -> None:
12
+ pass
File without changes
File without changes
File without changes
@@ -0,0 +1,5 @@
1
+ from mldebug._example import _run_private_func
2
+
3
+
4
+ def test_run_private_func_completes_successfully():
5
+ _run_private_func()
@@ -0,0 +1,5 @@
1
+ from mldebug import run_public_func
2
+
3
+
4
+ def test_run_public_func_completes_successfully():
5
+ run_public_func()