Metadata-Version: 2.5
Name: boilerplate-ml
Version: 0.1.0
Summary: A lightweight, uv-powered starting point for data science and machine learning projects.
Author: Aditya Shukla
License-Expression: MIT
License-File: LICENSE
Keywords: boilerplate,data-science,machine-learning,mlops,scaffold,uv
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: uv>=0.9
Description-Content-Type: text/markdown

# boilerplate-ml

One command to start a data science or machine learning project. Run `boilerplate`
in an empty folder and get a uv-managed Python 3.12 environment, the packages you
chose, and a consistent folder layout. Existing files are never overwritten.

## Install

```console
pip install boilerplate-ml
```

Requires Python 3.10 or newer to run. Generated projects use Python 3.12; uv
downloads it if you don't have it. `uv` itself is installed automatically.
For an isolated install, use `pipx install boilerplate-ml` or
`uv tool install boilerplate-ml`.

If `boilerplate` is not found after installing, your Python `Scripts` folder is not
on PATH; `python -m boilerplate` always works.

## Start a project

```console
mkdir my-project
cd my-project
boilerplate
```

Pick a profile when asked:

| Profile | Installs | Good for |
| --- | --- | --- |
| `standard` | NumPy, pandas, SciPy, scikit-learn, statsmodels, Matplotlib, seaborn, Plotly, JupyterLab | Data exploration and classical ML |
| `full` | Standard plus Polars, DuckDB, missingno, ydata-profiling, XGBoost, LightGBM, SHAP | Broader tabular ML work |
| `skeleton` | No packages; folders and environment only | Custom stacks |

Skip the questions:

```console
boilerplate --profile full --yes
```

`--yes` uses `standard` if no profile is given, initializes Git, and skips the
final shell prompt. `--no-shell` skips only that final prompt.

## What you get

```text
data/raw/  data/processed/  data/external/
notebooks/  src/  tests/  models/
reports/figures/  reports/profiling/
pyproject.toml  uv.lock  .python-version  .venv/
README.md  .env.example  .gitignore
```

Folders start empty (with a `.gitkeep`); no sample code or notebooks are created.
The `.gitignore` keeps datasets, models, generated reports, `.env` files and the
virtual environment out of Git.

Everyday commands afterwards:

```console
uv add requests      # add a package
uv sync              # recreate .venv from uv.lock
uv run jupyter lab   # start JupyterLab
uv run python        # project Python
```

Commit `pyproject.toml`, `uv.lock` and `.python-version` for reproducibility.

## Existing projects

Running `boilerplate` where a `pyproject.toml` already exists never replaces it.
You choose to sync the existing dependencies or add a profile:

```console
boilerplate --existing sync --yes
boilerplate --existing add --profile full --yes
```

Missing folders and ignore rules are added; your README and metadata are kept.
With `--yes`, an existing project defaults to `sync`.

## Company package indexes

`boilerplate` follows your normal uv configuration, including any custom index.
To insist on a private index and never fall back to public PyPI, use
`--corporate`: it requires `UV_INDEX_URL` plus matching credentials in your NETRC
file, and disables automatic Python downloads (install Python 3.12 first).

## Troubleshooting

- **`invalid peer certificate` / `UnknownIssuer`**: your network inspects HTTPS
  traffic. Set `UV_SYSTEM_CERTS=1` so uv trusts your system certificates.
- **No versions found for a package**: if `UV_EXCLUDE_NEWER` is set, uv ignores
  newer releases, and every release if your index reports no upload dates.
- **Hardlink errors on OneDrive or other synced folders**: `boilerplate` already
  tells uv to copy files; if you run uv yourself, set `UV_LINK_MODE=copy`.
- **Refuses to run in your home folder or a drive root**: by design. Create a
  project folder first.

## Development

```console
python -m pip install -e .
python -m unittest discover -s tests -v
uv build
```

The version lives in `src/boilerplate/__init__.py`.

## License

MIT
