Skip to content

Commit 5f0ce0a

Browse files
authored
Merge pull request #40 from dhruvdcoder/dhruvdcoder/issue10-v2
Full test suite and CI
2 parents ec2563c + a9c7f0e commit 5f0ce0a

112 files changed

Lines changed: 9944 additions & 22 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
pytest:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 60
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.11"
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -e .
24+
pip install -e xlm-models/
25+
pip install -r requirements/test_requirements.txt
26+
27+
- name: Run non-GPU tests
28+
run: pytest -m "not gpu and not cli and not integration" --cov-report=xml
29+
30+
- name: Upload coverage reports to Codecov
31+
uses: codecov/codecov-action@v5
32+
with:
33+
token: ${{ secrets.CODECOV_TOKEN }}
34+
files: ./coverage.xml
35+
fail_ci_if_error: false

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ site
4646
# editor files
4747
.cursorindexingignore
4848
oracle/fpscores.pkl
49-
.cursor/plans/dreamon_in_xlm-core_e37b5d3d.plan.md
49+
.cursor/plans
5050

5151
# protein eval — generated artifacts and eval venvs
5252
vendor/dplm/.venv-esmfold/
5353
evals/protein_eval/*/esmfold_pdb/
5454
evals/protein_eval/*/metrics.jsonl
5555
evals/protein_eval/logs/
56+
.pytest_cache/
57+
docs/**/linkedin

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<p align="center">
1212
<a href="https://pypi.org/project/xlm-core/"><img src="https://img.shields.io/pypi/v/xlm-core?color=blue&label=PyPI" alt="PyPI version"></a>
13+
<a href="https://codecov.io/gh/dhruvdcoder/xlm-core"><img src="https://img.shields.io/codecov/c/github/dhruvdcoder/xlm-core" alt="Code coverage"></a>
1314
<a href="https://dhruveshp.com/xlm-core/latest/guide/external-models/"><img src="https://img.shields.io/badge/Documentation-blue.svg" alt="Documentation"></a>
1415
<a href="https://github.com/dhruvdcoder/xlm-core"><img src="https://img.shields.io/badge/Python-3.11+-green.svg" alt="Python 3.11+"></a>
1516
<a href="https://github.com/dhruvdcoder/xlm-core/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a>

docs/developers/dependencies.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Dependencies
2+
3+
This page describes how dependencies are laid out for **xlm-core** and how to install subsets for runtime, testing, docs, linting, and extras.
4+
5+
## How packages are wired
6+
7+
[`setup.py`](https://github.com/dhruvdcoder/xlm-core/blob/main/setup.py) loads **`requirements.txt`** at the repo root via `install_requires`:
8+
9+
- `pip install xlm-core` installs those runtime dependencies.
10+
- **`requirements/core_requirements.txt`** is a complementary file with stricter pins, extra comments (e.g. Lightning / Torch / datasets), and tooling lines used for local/full dev installs—not every line is mirrored in `requirements.txt`.
11+
12+
Run commands below from the **repository root** (where `setup.py` and `requirements/` live).
13+
14+
## Requirement files overview
15+
16+
| File | Purpose |
17+
|------|---------|
18+
| [`requirements.txt`](https://github.com/dhruvdcoder/xlm-core/blob/main/requirements.txt) (root) | Runtime dependencies used when publishing / `pip install xlm-core` |
19+
| [`requirements/core_requirements.txt`](https://github.com/dhruvdcoder/xlm-core/blob/main/requirements/core_requirements.txt) | Full core stack with version pins and inline notes |
20+
| [`requirements/test_requirements.txt`](https://github.com/dhruvdcoder/xlm-core/blob/main/requirements/test_requirements.txt) | pytest, hypothesis, coverage |
21+
| [`requirements/dev_requirements.txt`](https://github.com/dhruvdcoder/xlm-core/blob/main/requirements/dev_requirements.txt) | Notebooks / experiment tracking helpers |
22+
| [`requirements/docs_requirements.txt`](https://github.com/dhruvdcoder/xlm-core/blob/main/requirements/docs_requirements.txt) | MkDocs site build |
23+
| [`requirements/lint_requirements.txt`](https://github.com/dhruvdcoder/xlm-core/blob/main/requirements/lint_requirements.txt) | Typecheck, formatting, flake8 ecosystem |
24+
| [`requirements/extra_requirements.txt`](https://github.com/dhruvdcoder/xlm-core/blob/main/requirements/extra_requirements.txt) | Optional analysis / plotting (lighter set) |
25+
| [`requirements/plotting_requirements.txt`](https://github.com/dhruvdcoder/xlm-core/blob/main/requirements/plotting_requirements.txt) | Heavier plotting / stats stack |
26+
27+
---
28+
29+
## Root `requirements.txt`
30+
31+
**Install:**
32+
33+
```bash
34+
pip install -r requirements.txt
35+
```
36+
37+
**Role:** Canonical list consumed by setuptools for `pip install xlm-core`. Matches the pinned core stack where it matters but may omit duplicated or heavily commented lines present in `core_requirements.txt`.
38+
39+
---
40+
41+
## Core requirements (`requirements/core_requirements.txt`)
42+
43+
**Install:**
44+
45+
```bash
46+
pip install -r requirements/core_requirements.txt
47+
```
48+
49+
**Role:** Day-to-day / CI-style full environment for training and pipelines: PyTorch, Lightning, Hydra extras, HF `datasets`, `transformers`, `torchdata`, `jaxtyping`, `tensorboard`, `simple_slurm`, etc.
50+
51+
Inline comments document choices (Torch range, Lightning version, datasets upper bound).
52+
53+
---
54+
55+
## Test dependencies
56+
57+
**Install:**
58+
59+
```bash
60+
pip install -r requirements/test_requirements.txt
61+
```
62+
63+
**Included packages:**
64+
65+
- `pytest`
66+
- `hypothesis`
67+
- `coverage[toml]`
68+
69+
For workflows and invocation, see also [Running tests](testing/running-tests.md).
70+
71+
Coverage configuration and pytest markers live in `pyproject.toml`.
72+
73+
---
74+
75+
## Development (`requirements/dev_requirements.txt`)
76+
77+
**Install:**
78+
79+
```bash
80+
pip install -r requirements/dev_requirements.txt
81+
```
82+
83+
Includes `jupytext` and `wandb`.
84+
85+
---
86+
87+
## Documentation build (`requirements/docs_requirements.txt`)
88+
89+
**Install:**
90+
91+
```bash
92+
pip install -r requirements/docs_requirements.txt
93+
```
94+
95+
Includes `mkdocs`, `mkdocs-material`, `mkdocstrings` (Python handler), `mike`, and `mkdocs-api-autonav`. Used when building this site locally or in CI.
96+
97+
---
98+
99+
## Lint / quality (`requirements/lint_requirements.txt`)
100+
101+
**Install:**
102+
103+
```bash
104+
pip install -r requirements/lint_requirements.txt
105+
```
106+
107+
Includes `mypy`, `pre-commit`, `black`, `flake8` and related plugins (`flake8-docstrings`, `flake8-annotations`, `flake8-black`), `pytest-flake8`, `autoflake`, `darglint`, and `pre-commit-hooks`.
108+
109+
---
110+
111+
## Extra (`requirements/extra_requirements.txt`)
112+
113+
**Install:**
114+
115+
```bash
116+
pip install -r requirements/extra_requirements.txt
117+
```
118+
119+
Includes `matplotlib`, `seaborn`, `networkx`, and `wandb` (overlapping with dev for experiment tracking).
120+
121+
---
122+
123+
## Plotting (`requirements/plotting_requirements.txt`)
124+
125+
**Install:**
126+
127+
```bash
128+
pip install -r requirements/plotting_requirements.txt
129+
```
130+
131+
Includes `matplotlib`, `seaborn`, `statsmodels`, and `tueplots` for richer plotting notebooks or papers-style figures.

0 commit comments

Comments
 (0)