Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstrings standardization #586

Merged
merged 5 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
'sphinx.ext.mathjax',
koaning marked this conversation as resolved.
Show resolved Hide resolved
'sphinx.ext.viewcode',
'nbsphinx',
'recommonmark'
'recommonmark',
'numpydoc'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
129 changes: 129 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Project information
site_name: scikit-lego

# Repository information
repo_name: koaning/scikit-lego
repo_url: https://github.com/koaning/scikit-lego
edit_uri: edit/main/docs/

# Configuration
watch:
- sklego

docs_dir: mkdocs

use_directory_urls: true
theme:
name: material
logo: _static/logo.png
favicon: _static/logo.png
font:
text: Ubuntu
code: Ubuntu Mono
highlightjs: true
hljs_languages:
- bash
- python
- r
features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.sections
- navigation.expand
- navigation.path
- navigation.indexes
- navigation.footer
- navigation.top
- navigation.tracking

- content.action.edit
- content.action.view
- content.code.annotate
- content.code.copy
- content.tooltips
- content.tabs.link

- search.suggest
- search.highlight
- search.share

- toc.follow

# Plugins
plugins:
- autorefs
- mkdocstrings:
handlers:
python:
options:
docstring_style: numpy
docstring_section_style: table # table, list or spacy
filters:
- "!^_" # Hide semi-private functions and methods
- "!^__" # Hide private functions and methods
- search:
separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'

# Extensions
markdown_extensions:
- abbr
- admonition
- attr_list
- codehilite
- def_list
- footnotes
- md_in_html
- tables
- toc:
permalink: true
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem:
smart_enable: all
- pymdownx.snippets:
check_paths: true
- pymdownx.caret
- pymdownx.details
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.magiclink:
repo_url_shorthand: true
user: squidfunk
repo: mkdocs-material
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
- pymdownx.snippets

extra_javascript:
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

nav:
- Home: index.md
- API Reference:
- Base: api/base.md
- Common: api/common.md
- Datasets: api/datasets.md
- Decomposition: api/decomposition.md
- Dummy: api/dummy.md
- Linear Model: api/linear-model.md
- Meta: api/meta.md
- Metrics: api/metrics.md
- Mixture: api/mixture.md
- Model Selection: api/model-selection.md
- Naive Bayes: api/naive-bayes.md
- Neighbors: api/neighbors.md
- Pandas Utils: api/pandas-utils.md
- Pipeline: api/pipeline.md
- Preprocessing: api/preprocessing.md
31 changes: 31 additions & 0 deletions mkdocs/api/base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Base

::: sklego.base.ClustererMeta
options:
show_root_full_path: true
show_root_heading: true

::: sklego.base.Clusterer
options:
show_root_full_path: true
show_root_heading: true

::: sklego.base.OutlierModelMeta
options:
show_root_full_path: true
show_root_heading: true

::: sklego.base.OutlierModel
options:
show_root_full_path: true
show_root_heading: true

::: sklego.base.ProbabilisticClassifierMeta
options:
show_root_full_path: true
show_root_heading: true

::: sklego.base.ProbabilisticClassifier
options:
show_root_full_path: true
show_root_heading: true
28 changes: 28 additions & 0 deletions mkdocs/api/common.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Common

Module with common classes and functions used across the package.

::: sklego.common.TrainOnlyTransformerMixin
options:
show_root_full_path: true
show_root_heading: true

::: sklego.common.as_list
options:
show_root_full_path: true
show_root_heading: true

::: sklego.common.flatten
options:
show_root_full_path: true
show_root_heading: true

::: sklego.common.expanding_list
options:
show_root_full_path: true
show_root_heading: true

::: sklego.common.sliding_window
options:
show_root_full_path: true
show_root_heading: true
41 changes: 41 additions & 0 deletions mkdocs/api/datasets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Datasets

::: sklego.datasets.load_abalone
options:
show_root_full_path: true
show_root_heading: true

::: sklego.datasets.load_arrests
options:
show_root_full_path: true
show_root_heading: true

::: sklego.datasets.load_chicken
options:
show_root_full_path: true
show_root_heading: true

::: sklego.datasets.load_heroes
options:
show_root_full_path: true
show_root_heading: true

::: sklego.datasets.load_hearts
options:
show_root_full_path: true
show_root_heading: true

::: sklego.datasets.load_penguins
options:
show_root_full_path: true
show_root_heading: true

::: sklego.datasets.make_simpleseries
options:
show_root_full_path: true
show_root_heading: true

::: sklego.datasets.fetch_creditcard
options:
show_root_full_path: true
show_root_heading: true
11 changes: 11 additions & 0 deletions mkdocs/api/decomposition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Decomposition

::: sklego.decomposition.pca_reconstruction.PCAOutlierDetection
options:
show_root_full_path: true
show_root_heading: true

::: sklego.decomposition.umap_reconstruction.UMAPOutlierDetection
options:
show_root_full_path: true
show_root_heading: true
6 changes: 6 additions & 0 deletions mkdocs/api/dummy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Dummy

::: sklego.dummy.RandomRegressor
options:
show_root_full_path: true
show_root_heading: true
46 changes: 46 additions & 0 deletions mkdocs/api/linear-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Linear Models

::: sklego.linear_model.LowessRegression
options:
show_root_full_path: true
show_root_heading: true

::: sklego.linear_model.ProbWeightRegression
options:
show_root_full_path: true
show_root_heading: true

::: sklego.linear_model.DeadZoneRegressor
options:
show_root_full_path: true
show_root_heading: true

::: sklego.linear_model.DemographicParityClassifier
options:
show_root_full_path: true
show_root_heading: true

::: sklego.linear_model.EqualOpportunityClassifier
options:
show_root_full_path: true
show_root_heading: true

::: sklego.linear_model.BaseScipyMinimizeRegressor
options:
show_root_full_path: true
show_root_heading: true

::: sklego.linear_model.ImbalancedLinearRegression
options:
show_root_full_path: true
show_root_heading: true

::: sklego.linear_model.QuantileRegression
options:
show_root_full_path: true
show_root_heading: true

::: sklego.linear_model.LADRegression
options:
show_root_full_path: true
show_root_heading: true
51 changes: 51 additions & 0 deletions mkdocs/api/meta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Meta Models

::: sklego.meta.confusion_balancer.ConfusionBalancer
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.decay_estimator.DecayEstimator
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.estimator_transformer.EstimatorTransformer
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.grouped_predictor.GroupedPredictor
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.grouped_transformer.GroupedTransformer
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.outlier_classifier.OutlierClassifier
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.regression_outlier_detector.RegressionOutlierDetector
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.subjective_classifier.SubjectiveClassifier
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.thresholder.Thresholder
options:
show_root_full_path: true
show_root_heading: true

::: sklego.meta.zero_inflated_regressor.ZeroInflatedRegressor
options:
show_root_full_path: true
show_root_heading: true
21 changes: 21 additions & 0 deletions mkdocs/api/metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Metrics

::: sklego.metrics.correlation_score
options:
show_root_full_path: true
show_root_heading: true

::: sklego.metrics.equal_opportunity_score
options:
show_root_full_path: true
show_root_heading: true

::: sklego.metrics.p_percent_score
options:
show_root_full_path: true
show_root_heading: true

::: sklego.metrics.subset_score
options:
show_root_full_path: true
show_root_heading: true
Loading
Loading