Skip to content

Commit b9a0648

Browse files
authored
Merge pull request #269 from uriahf/245-add-updated-functions-create_calibration_curve-and-create_calibration_curve_times
245 add updated functions create calibration curve and create calibration curve times
2 parents 1c59bb7 + f8dd249 commit b9a0648

26 files changed

+2923
-1933
lines changed

AGENTS.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# rtichoke Agent Information
2+
3+
This document provides guidance for AI agents working on the `rtichoke` repository.
4+
5+
## Development Environment
6+
7+
To set up the development environment, follow these steps:
8+
9+
1. **Install `uv`**: If you don't have `uv` installed, please follow the official installation instructions.
10+
2. **Create a virtual environment**: Use `uv venv` to create a virtual environment.
11+
3. **Install dependencies**: Install the project dependencies, including the `dev` dependencies, with the following command:
12+
13+
```bash
14+
uv pip install -e .[dev]
15+
```
16+
17+
## Running Tests
18+
19+
The test suite is run using `pytest`. To run the tests, use the following command:
20+
21+
```bash
22+
uv run pytest
23+
```
24+
25+
## Coding Conventions
26+
27+
### Functional Programming
28+
29+
Strive to use a functional programming style as much as possible. Avoid side effects and mutable state where practical.
30+
31+
### Docstrings
32+
33+
All exported functions must have NumPy-style docstrings. This is to ensure that the documentation is clear, consistent, and can be easily parsed by tools like `quartodoc`.
34+
35+
Example of a NumPy-style docstring:
36+
37+
```python
38+
def my_function(param1, param2):
39+
"""Summary of the function's purpose.
40+
41+
Parameters
42+
----------
43+
param1 : int
44+
Description of the first parameter.
45+
param2 : str
46+
Description of the second parameter.
47+
48+
Returns
49+
-------
50+
bool
51+
Description of the return value.
52+
"""
53+
# function body
54+
return True
55+
```
56+
57+
## Pre-commit Hooks
58+
59+
This repository uses pre-commit hooks to ensure code quality and consistency. The following hooks are configured:
60+
61+
* **`ruff-check`**: A linter to check for common errors and style issues.
62+
* **`ruff-format`**: A code formatter to ensure a consistent code style.
63+
* **`uv-lock`**: A hook to keep the `uv.lock` file up to date.
64+
65+
Before committing, please ensure that the pre-commit hooks pass. You can run them manually on all files with `pre-commit run --all-files`.
66+
67+
## Documentation
68+
69+
The documentation for this project is built using `quartodoc`. The documentation is automatically built and deployed via GitHub Actions. There is no need to build the documentation manually.
70+
71+
## Type Checking
72+
73+
This project uses `ty` for type checking. To check for type errors, run the following command:
74+
75+
```bash
76+
uv run ty check src tests
77+
```

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ dependencies = [
1212
"polarstate==0.1.8",
1313
"marimo>=0.17.0",
1414
"pyarrow>=21.0.0",
15+
"statsmodels>=0.14.0",
1516
]
1617
name = "rtichoke"
17-
version = "0.1.25"
18+
version = "0.1.26"
1819
description = "interactive visualizations for performance of predictive models"
1920
readme = "README.md"
2021

src/rtichoke/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
)
3131
from rtichoke.discrimination.gains import plot_gains_curve as plot_gains_curve
3232

33-
# from rtichoke.calibration.calibration import (
34-
# create_calibration_curve as create_calibration_curve,
35-
# )
33+
from rtichoke.calibration.calibration import (
34+
create_calibration_curve as create_calibration_curve,
35+
create_calibration_curve_times as create_calibration_curve_times,
36+
)
3637

3738
from rtichoke.utility.decision import (
3839
create_decision_curve as create_decision_curve,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
"""
22
Subpackage for Calibration
33
"""
4+
5+
from .calibration import create_calibration_curve, create_calibration_curve_times
6+
7+
__all__ = ["create_calibration_curve", "create_calibration_curve_times"]

0 commit comments

Comments
 (0)