Skip to content

Commit 4ebb49b

Browse files
committed
wip, might need to separate in two branche, docstring start and quarto config and styles
1 parent 84397cb commit 4ebb49b

7 files changed

+36
-518
lines changed

_quarto.yml

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
11
####### README #######
2+
# This is the config file to build .qmd files
3+
#
4+
# This references the marginaleffects in .venv first, to reference the local marginaleffects, delete or rename the folder marginaleffects in .venv/lib/
25
#
36
# To create the qmd files, run the following command in the terminal:
47
# > quartodoc build
5-
# the result will be in ./reference
8+
# the result will be in ./qmd_files or else specified in the dir field
69
# modify the current file to change the included functions and the layout
7-
# finally, run the following command to preview the website:
10+
# finally, run the following command to preview the website if wanted:
811
# > quarto preview
912

1013

1114
project:
1215
type: website
1316

1417
# tell quarto to read the generated sidebar
15-
metadata-files:
16-
- _sidebar.yml
18+
# metadata-files:
19+
# - _sidebar.yml
1720

21+
format:
22+
html:
23+
theme: cosmo
24+
css: styles.css
25+
toc: false
1826

1927
quartodoc:
2028
# the name used to import the package you want to create reference docs for
2129
package: marginaleffects
2230
style: "pkgdown"
2331
# write sidebar data to this file
24-
sidebar: _sidebar.yml
32+
# sidebar: _sidebar.yml
33+
dir: qmd_files
2534

2635
sections:
27-
- title: Some functions
28-
desc: Functions to inspect docstrings.
36+
- title: Marginaleffects API reference guide
37+
desc: Marginaleffects functions.
2938
contents:
3039
# the functions being documented in the package.
3140
# you can refer to anything: class methods, modules, etc..
32-
# - avg_predictions
3341
- predictions
34-
- avg_predictions
3542
- comparisons
3643
- slopes
3744
- hypotheses
@@ -41,4 +48,6 @@ quartodoc:
4148
- plot_slopes
4249
- model_statsmodels
4350
- model_sklearn
44-
- utils
51+
- name: utils
52+
members:
53+
- get_dataset

marginaleffects/comparisons.py

+3
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,9 @@ def avg_comparisons(
364364
transform=None,
365365
eps=1e-4,
366366
):
367+
"""
368+
docstring (TO DO)
369+
"""
367370
if callable(newdata):
368371
newdata = newdata(model)
369372

marginaleffects/model_sklearn.py

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ def get_predict(self, params, newdata: pl.DataFrame):
8181
def fit_sklearn(
8282
formula: str, data: pl.DataFrame, engine, kwargs_engine={}, kwargs_fit={}
8383
):
84+
"""
85+
fit_sklearn docstring (TO DO)
86+
"""
8487
d = listwise_deletion(formula, data=data)
8588
y, X = model_matrices(formula, d)
8689
# formulaic returns a matrix when the response is character or categorical

marginaleffects/model_statsmodels.py

+3
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ def get_df(self):
109109
def fit_statsmodels(
110110
formula: str, data: pl.DataFrame, engine, kwargs_engine={}, kwargs_fit={}
111111
):
112+
"""
113+
fit docstring (TO DO)
114+
"""
112115
d = fml.listwise_deletion(formula, data=data)
113116
y, X = fml.model_matrices(formula, d)
114117
mod = engine(endog=y, exog=X, **kwargs_engine)

marginaleffects/slopes.py

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ def slopes(
1515
eps=1e-4,
1616
eps_vcov=None,
1717
):
18+
"""
19+
slopes docstring (TO DO)
20+
"""
1821
if callable(newdata):
1922
newdata = newdata(model)
2023

@@ -54,6 +57,9 @@ def avg_slopes(
5457
eps=1e-4,
5558
eps_vcov=None,
5659
):
60+
"""
61+
avg slopes docstring (TO DO)
62+
"""
5763
if callable(newdata):
5864
newdata = newdata(model)
5965

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ dev-dependencies = [
3333
"pytest >=8.1.1,<9",
3434
"pytest-xdist >=3.6.1",
3535
"ruff>=0.6.4",
36-
"quartodoc"
3736
]
3837

3938

uv.lock

+2-507
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)