Skip to content

Commit 43ea585

Browse files
authored
Add Initial Project Structure (#1)
1 parent fbb1255 commit 43ea585

9 files changed

Lines changed: 2206 additions & 0 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on: pull_request
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
test:
10+
name: CI Python ${{ matrix.python-version }}
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Install uv and set Python
19+
uses: astral-sh/setup-uv@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
enable-cache: true
23+
cache-dependency-glob: "uv.lock"
24+
- name: Sync dependencies
25+
run: uv sync --locked --all-extras --dev
26+
- name: Run pre-commit
27+
run: uv run pre-commit run --all-files
28+
- name: Run tests
29+
run: uv run pytest tests

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.vscode/
2+
.venv
3+
__pycache__
4+
.mypy_cache/
5+
.pytest_cache/
6+
.ruff_cache/
7+
.coverage
8+
.coverage.*
9+
.ablate

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.11.8
4+
hooks:
5+
- id: ruff
6+
args: [--fix]
7+
- id: ruff-format
8+
- repo: https://github.com/codespell-project/codespell
9+
rev: v2.4.1
10+
hooks:
11+
- id: codespell
12+
additional_dependencies:
13+
- tomli

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ablate

ablate/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.0"

pyproject.toml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
[project]
2+
name = "ablate"
3+
version = "0.1.0"
4+
description = "ablate"
5+
authors = [{ name = "Simon Rampp", email = "simon@rampp.dev" }]
6+
license = { text = "MIT" }
7+
readme = "README.md"
8+
requires-python = ">=3.10"
9+
keywords = [
10+
"machine learning",
11+
"deep learning",
12+
"experiment tracking",
13+
"reporting",
14+
"markdown",
15+
"CLI",
16+
]
17+
18+
dependencies = [
19+
"matplotlib>=3.10.3",
20+
"pandas>=2.2.3",
21+
"pydantic>=2.11.4",
22+
"seaborn>=0.13.2",
23+
"tabulate>=0.9.0",
24+
"tomli>=2.2.1",
25+
]
26+
27+
[dependency-groups]
28+
dev = [
29+
"codespell>=2.4.1",
30+
"pre-commit==4.2.0",
31+
"pytest>=8.3.5",
32+
"pytest-cov>=6.1.1",
33+
"ruff==0.11.8",
34+
]
35+
36+
[build-system]
37+
requires = ["hatchling"]
38+
build-backend = "hatchling.build"
39+
40+
[project.scripts]
41+
ablate = "ablate.core.cli.main:main"
42+
43+
[project.optional-dependencies]
44+
mlflow = ["mlflow>=2.22.0"]
45+
46+
[tool.ruff]
47+
line-length = 88
48+
target-version = "py310"
49+
50+
[tool.ruff.format]
51+
docstring-code-format = true
52+
53+
[tool.ruff.lint]
54+
select = [
55+
"F",
56+
"E",
57+
"W",
58+
"I",
59+
"N",
60+
"Q",
61+
"ANN",
62+
"BLE",
63+
"B",
64+
"C4",
65+
"ISC",
66+
"ICN",
67+
"LOG",
68+
"G",
69+
"PYI",
70+
"PT",
71+
"RET",
72+
"SIM",
73+
"TC",
74+
"ERA",
75+
]
76+
ignore = ["E741", "N812", "N806", "N802", "ANN401"]
77+
78+
[tool.ruff.lint.isort]
79+
known-first-party = ["ablate"]
80+
force-sort-within-sections = true
81+
lines-after-imports = 2
82+
83+
[tool.pytest.ini_options]
84+
addopts = "--cov=ablate --cov-report=term-missing"
85+
testpaths = "tests"
86+
87+
[tool.codespell]
88+
skip = "uv.lock"

tests/test_version.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import tomli
2+
3+
import ablate
4+
5+
6+
def test_version() -> None:
7+
with open("pyproject.toml", "rb") as f:
8+
pyproject = tomli.load(f)
9+
assert pyproject["project"]["version"] == ablate.__version__

uv.lock

Lines changed: 2055 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)