Skip to content

Commit 755a60c

Browse files
authored
unify docs base modules and creation closes #167 (#184)
* unify docs base modules and creation * fix line too long * unify and expand arbitrary discretisation docs * fixed indentation in docstrings * add link fix indentation * expand doc discretisation with trees * expand rest of discretisers * expand and unify doc for encoders * fix raises docstring format * fix raises docstring format * enhance doc layout, add navigation tabs * expand docs for imputers * expand docs for transformers * expand docs for wrapper * expand docs for outliers * fix style error * fix import and errors in boxcox yeojohsnon * tweak conf further * link API docs to github * final edit to imputers * final edits encoders and imputers * final edits var transformers * final edits discretisation * final edits outliers * final edit creation * unify docstrings selectors * updated changelog * tidy docs * final edits, ready to merge, waiting to see if can resolve warning issue * fix tedious warning on fit, transform methods * add missing attribute to recursive selector
1 parent d97b0d0 commit 755a60c

File tree

120 files changed

+3357
-1632
lines changed

Some content is hidden

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

120 files changed

+3357
-1632
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@import url("theme.css");
2+
3+
.highlight a {
4+
text-decoration: underline;
5+
}
6+
7+
.wy-nav-content {
8+
max-width: 1200px !important;
9+
}
10+
11+
12+
.wy-table-responsive {
13+
overflow: visible !important;
14+
}

docs/_templates/breadcrumbs.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{%- extends "sphinx_rtd_theme/breadcrumbs.html" %}
2+
3+
{% block breadcrumbs_aside %}
4+
{% endblock %}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{index}}
2+
{{summary}}
3+
{{extended_summary}}
4+
{{parameters}}
5+
{{returns}}
6+
{{yields}}
7+
{{other_parameters}}
8+
{{attributes}}
9+
{{raises}}
10+
{{warns}}
11+
{{warnings}}
12+
{{see_also}}
13+
{{notes}}
14+
{{references}}
15+
{{examples}}
16+
{{methods}}

docs/about.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. -*- mode: rst -*-
2+
3+
About
4+
=====
5+
6+
Coming Soon!

docs/blogs.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Blogs and Videos
2+
================
3+
4+
Articles and videos about Feature-engine and feature engineering and selection in general.
5+
6+
Blogs
7+
-----
8+
9+
- `Feature-engine: A new open-source Python package for feature engineering <https://www.trainindatablog.com/feature-engine-a-new-open-source-python-package-for-feature-engineering/>`_.
10+
- `Practical Code Implementations of Feature Engineering for Machine Learning with Python <https://www.trainindatablog.com/practical-code-implementations-of-feature-engineering-for-machine-learning-with-python/>`_.
11+
- `Streamlining Feature Engineering Pipelines with Feature-engine <https://towardsdatascience.com/streamlining-feature-engineering-pipelines-with-feature-engine-e781d551f470?gi=e0fa6e5c0c1a/>`_.
12+
- `Feature Engineering for Machine Learning: A comprehensive Overvoew <https://www.trainindatablog.com/feature-engineering-for-machine-learning-comprehensive-overview/>`_.
13+
- `Feature Selection for Machine Learning: A comprehensive Overview <https://www.trainindatablog.com/feature-selection-for-machine-learning-comprehensive-overview/>`_.
14+
15+
16+
Videos
17+
------
18+
19+
- Coming soon!
20+
21+
En Español
22+
----------
23+
24+
- `Ingeniería de variables para machine learning <https://www.udemy.com/course/ingenieria-de-variables-para-machine-learning/?referralCode=CE398C784F17BD87482C>`_, Curso Online.
25+
- `Ingeniería de variables, MachinLenin <https://www.youtube.com/watch?v=NhCxOOoFXds>`_, charla con video online.
26+
- `Ingeniería de atributos para aprendizaje automático: una revisión completa <https://www.trainindatablog.com/ingenieria-de-variables-aprendizaje-de-maquinas/>`_, Artículo.
27+
- `Paquetes Python de código abierto para la ingeniería de atributos: Comparaciones y conclusiones <https://www.trainindatablog.com/paquetes-python-de-para-ingenieria-de-atributos/>`_, Artículo.
28+
- `Feature-engine: Un paquete Python de código abierto para la ingeniería de atributos <https://www.trainindatablog.com/feature-engine-un-paquete-python-de-codigo-abierto-para-la-ingenieria-de-atributos/>`_, Artículo.
29+
30+
More resources will be added as they appear online!

docs/books.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Books
2+
=====
3+
4+
You can learn more about how to use Feature-engine and feature engineering in general
5+
in the following books:
6+
7+
.. figure:: images/cookbook.png
8+
:width: 200
9+
:align: left
10+
:target: https://www.packtpub.com/product/python-feature-engineering-cookbook/9781789806311
11+
12+
Python Feature Engineering Cookbook

docs/conf.py

Lines changed: 89 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,63 +13,71 @@
1313
# All configuration values have a default; values that are commented out
1414
# serve to show the default.
1515

16-
# If extensions (or modules to document with autodoc) are in another directory,
17-
# add these directories to sys.path here. If the directory is relative to the
18-
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
#
2016
import os
2117
import sys
18+
import sphinx_rtd_theme
2219

23-
sys.path.insert(0, os.path.abspath("."))
24-
sys.path.insert(0, os.path.abspath("../"))
20+
# If extensions (or modules to document with autodoc) are in another directory,
21+
# add these directories to sys.path here. If the directory is relative to the
22+
# documentation root, use os.path.abspath to make it absolute, like shown here.
23+
# sys.path.insert(0, os.path.abspath("."))
24+
# sys.path.insert(0, os.path.abspath("../"))
2525
sys.path.insert(1, os.path.dirname(os.path.abspath("../")) + os.sep + "feature_engine")
26+
sys.path.insert(0, os.path.abspath("sphinxext"))
27+
from github_link import make_linkcode_resolve
2628

2729
# -- General configuration ------------------------------------------------
2830

2931
# If your documentation needs a minimal Sphinx version, state it here.
30-
#
3132
# needs_sphinx = '1.0'
3233

3334
# Add any Sphinx extension module names here, as strings. They can be
3435
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3536
# ones.
3637
extensions = [
37-
"sphinx.ext.autodoc",
38-
# 'sphinx.ext.doctest',
39-
"sphinx.ext.intersphinx",
40-
"sphinx.ext.todo",
41-
"sphinx.ext.coverage",
42-
# 'sphinx.ext.mathjax',
43-
# 'sphinx.ext.ifconfig',
44-
"sphinx.ext.viewcode",
45-
"sphinx.ext.githubpages",
46-
# 'sphinx.ext.autosummary',
47-
"sphinx.ext.napoleon",
38+
"sphinx.ext.autodoc", # Core Sphinx library for auto html doc generation from docstrings
39+
"sphinx.ext.autosummary", # Create neat summary tables for modules/classes/methods etc
40+
"sphinx.ext.intersphinx", # Link to other project's documentation (see mapping below)
41+
"sphinx_autodoc_typehints", # Automatically document param types (less noise in class signature)
4842
"numpydoc",
43+
"sphinx.ext.linkcode",
44+
# "sphinx.ext.doctest",
45+
# "sphinx.ext.todo",
46+
# "sphinx.ext.coverage",
47+
# "sphinx.ext.mathjax",
48+
# "sphinx.ext.ifconfig",
49+
# "sphinx-prompt",
4950
]
5051

52+
# this is needed for some reason...
53+
# see https://github.com/numpy/numpydoc/issues/69
5154
numpydoc_show_class_members = False
55+
numpydoc_attributes_as_param_list = False
5256

53-
napoleon_google_docstring = False
54-
napoleon_use_param = True
55-
napoleon_use_ivar = False
57+
# autodoc_default_options = {
58+
# # "members": True,
59+
# # "inherited-members": False,
60+
# # }
5661

5762
# Add any paths that contain templates here, relative to this directory.
5863
templates_path = ["_templates"]
5964

65+
# generate autosummary even if no references
66+
autosummary_generate = True
67+
autosummary_imported_members = True
68+
6069
# The suffix(es) of source filenames.
6170
# You can specify multiple suffix as a list of string:
62-
#
6371
# source_suffix = ['.rst', '.md']
6472
source_suffix = ".rst"
6573

6674
# The master toctree document.
6775
master_doc = "index"
6876

6977
# General information about the project.
70-
project = "feature-engine"
71-
copyright = "2018-2020, Soledad Galli"
72-
author = "Soledad Galli"
78+
project = "Feature-engine"
79+
copyright = "2018-2021, Feature-engine developers"
80+
author = "Feature-engine developers"
7381

7482
# The version info for the project you're documenting, acts as replacement for
7583
# |version| and |release|, also used in various other places throughout the
@@ -78,7 +86,7 @@
7886
VERSION_PATH = "../feature_engine/VERSION"
7987
with open(VERSION_PATH, "r") as version_file:
8088
v = version_file.read().strip()
81-
#
89+
8290
# The short X.Y version.
8391
version = v
8492
# The full version, including alpha/beta/rc tags.
@@ -94,7 +102,11 @@
94102
# List of patterns, relative to source directory, that match files and
95103
# directories to ignore when looking for source files.
96104
# This patterns also effect to html_static_path and html_extra_path
97-
exclude_patterns = []
105+
exclude_patterns = ["_build", "_templates"]
106+
107+
# The reST default role (single back ticks `dict`) cross links to any code
108+
# object (including Python, but others as well).
109+
default_role = "literal"
98110

99111
# If true, '()' will be appended to :func: etc. cross-reference text.
100112
add_function_parentheses = True
@@ -110,6 +122,9 @@
110122
# The name of the Pygments (syntax highlighting) style to use.
111123
pygments_style = "sphinx"
112124

125+
# Custom style
126+
html_style = "css/feature-engine.css"
127+
113128
# If true, `todo` and `todoList` produce output, else they produce nothing.
114129
todo_include_todos = False
115130

@@ -124,13 +139,38 @@
124139
# further. For a list of options available for each theme, see the
125140
# documentation.
126141
#
127-
# html_theme_options = {}
142+
html_theme_options = {
143+
"logo_only": True,
144+
"style_nav_header_background": "#e09200",
145+
"canonical_url": "https://feature-engine.readthedocs.io/en/latest/",
146+
}
147+
148+
# Add any paths that contain custom themes here, relative to this directory.
149+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
128150

129151
# Add any paths that contain custom static files (such as style sheets) here,
130152
# relative to this directory. They are copied after the builtin static files,
131153
# so a file named "default.css" will overwrite the builtin "default.css".
132-
html_static_path = []
133-
autoclass_content = "both"
154+
html_static_path = ["_static"]
155+
# autoclass_content = "both"
156+
157+
# The name for this set of Sphinx documents. If None, it defaults to
158+
# "<project> v<release> documentation".
159+
html_title = version
160+
161+
# The name of an image file (relative to this directory) to place at the top
162+
# of the sidebar.
163+
html_logo = "images/Logo.png"
164+
165+
# The name of an image file (within the static path) to use as favicon of the
166+
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
167+
# pixels large.
168+
html_favicon = "images/favicon.png"
169+
170+
# Add any paths that contain custom static files (such as style sheets) here,
171+
# relative to this directory. They are copied after the builtin static files,
172+
# so a file named "default.css" will overwrite the builtin "default.css".
173+
# html_static_path = ['_static']
134174

135175
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
136176
html_show_sphinx = True
@@ -168,11 +208,21 @@
168208
master_doc,
169209
"feature_engine.tex",
170210
"feature\\_engine Documentation",
171-
"Soledad Galli",
211+
"Feature-engine Developers",
172212
"manual",
173213
),
174214
]
175215

216+
# intersphinx configuration
217+
intersphinx_mapping = {
218+
"python": ("https://docs.python.org/{.major}".format(sys.version_info), None),
219+
"numpy": ("https://docs.scipy.org/doc/numpy/", None),
220+
"pandas": ("https://pandas.pydata.org/docs/", None),
221+
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
222+
"matplotlib": ("https://matplotlib.org/", None),
223+
"sklearn": ("http://scikit-learn.org/stable", None),
224+
}
225+
176226
# -- Options for manual page output ---------------------------------------
177227

178228
# One entry per manual page. List of tuples
@@ -220,3 +270,11 @@
220270

221271
# Example configuration for intersphinx: refer to the Python standard library.
222272
intersphinx_mapping = {"https://docs.python.org/": None}
273+
274+
# The following is used by sphinx.ext.linkcode to provide links to github
275+
linkcode_resolve = make_linkcode_resolve(
276+
"feature_engine",
277+
"https://github.com/solegalli/feature_engine/"
278+
"blob/master/"
279+
"{package}/{path}#L{lineno}",
280+
)
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ A typical contributing workflow goes like this:
99

1010
1. **Find** a bug while using Feature-engine, **suggest** new functionality, or **pick
1111
up** an issue from our `repo <https://github.com/solegalli/feature_engine/issues/>`_.
12-
2. **Discuss** with us how you would like to get involved and your approach to resolve
13-
the issue.
1412

13+
2. **Discuss** with us your approach to resolve the issue.
1514
3. Then, **fork** the repository into your GitHub account.
1615
4. **Clone** your fork into your local computer.
1716
5. **Code** the feature, the tests and update or add the documentation.
File renamed without changes.

0 commit comments

Comments
 (0)