Skip to content

Commit 8d2dd11

Browse files
Code refactoring
1 parent d04ad6c commit 8d2dd11

File tree

10 files changed

+472
-1
lines changed

10 files changed

+472
-1
lines changed

curo/calculator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Calculator:
6161
Calculator: A new Calculator instance configured with the specified precision
6262
and optional profile.
6363
"""
64-
def __init__(self, precision: int = 2, profile: Optional[pd.DataFrame] = None):
64+
def __init__(self, precision: int = 2, profile: Optional[pd.DataFrame] = None) -> "Calculator":
6565
if not 0 <= precision <= 4:
6666
raise ValidationError("Precision must be between 0 and 4")
6767
self.precision = precision

curo/daycount/__init__.py

Whitespace-only changes.

docs/api/daycount/actual_360.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
::: curo.daycount.actual_360.Actual360

docs/api/daycount/actual_365.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
4+
::: curo.daycount.actual_365.Actual365

docs/calculator.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# API Reference
2+
3+
::: curo.calculator.Calculator

docs/examples.md

Whitespace-only changes.

docs/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Welcome to MkDocs
2+
3+
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
4+
5+
## Commands
6+
7+
* `mkdocs new [dir-name]` - Create a new project.
8+
* `mkdocs serve` - Start the live-reloading docs server.
9+
* `mkdocs build` - Build the documentation site.
10+
* `mkdocs -h` - Print help message and exit.
11+
12+
## Project layout
13+
14+
mkdocs.yml # The configuration file.
15+
docs/
16+
index.md # The documentation homepage.
17+
... # Other markdown pages, images and other files.

mkdocs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
site_name: Curo Documentation
2+
theme:
3+
name: material
4+
plugins:
5+
- mkdocstrings:
6+
handlers:
7+
python:
8+
options:
9+
show_source: true
10+
heading_level: 2
11+
members_order: source
12+
docstring_style: google # Alt is numpy
13+
paths: ["curo"]
14+
nav:
15+
- index.md
16+
- Examples: examples.md
17+
- API Reference:
18+
- Calculator: calculator.md
19+
- Daycount Conventions:
20+
- Actual/360: api/daycount/actual_360.md
21+
- Actual/365: api/daycount/actual_365.md

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ dev = [
3434
"coverage>=7.13.0",
3535
"twine>=6.2.0", # Required for makefile
3636
"toml>=0.10.2", # Required for scripts/extract_version.py
37+
"mkdocs>=1.6.1",
38+
"mkdocs-material>=9.7.1",
39+
"mkdocstrings>=1.0.0",
40+
"mkdocstrings-python>=2.0.1",
3741
]
3842

3943
[build-system]

uv.lock

Lines changed: 419 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)