Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
308 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ pip install -e . | |
## Tests | ||
|
||
```sh | ||
pytest --cov==bff | ||
make all | ||
``` | ||
|
||
## Release History | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import recommonmark | ||
from recommonmark.transform import AutoStructify | ||
|
||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# http://www.sphinx-doc.org/en/master/config | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'bff' | ||
copyright = '2019, Axel Fahy' | ||
author = 'Axel Fahy' | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = '0.1.4' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
'recommonmark', | ||
'sphinx.ext.autodoc', | ||
'sphinx_autodoc_typehints', | ||
'sphinx.ext.napoleon', # Needed to separate type from variable name in docstrings. | ||
'numpydoc', | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = [] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'sphinx_rtd_theme' # Read the Docs theme. | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] | ||
|
||
# Theme from Read the Docs. | ||
html_theme_options = { | ||
'display_version': False, | ||
'prev_next_buttons_location': 'both', | ||
# Toc options | ||
'collapse_navigation': False, | ||
'sticky_navigation': True, | ||
} | ||
|
||
def setup(app): | ||
app.add_config_value('recommonmark_config', { | ||
'url_resolver': lambda url: github_doc_root + url, | ||
'auto_toc_tree_section': 'Contents', | ||
}, True) | ||
app.add_transform(AutoStructify) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
bff | ||
=== | ||
|
||
All of bff's functions. | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
:toctree: generated/ | ||
|
||
bff.concat_with_categories | ||
bff.get_peaks | ||
bff.idict | ||
bff.mem_usage_pd | ||
bff.parse_date | ||
bff.plot_history | ||
bff.plot_predictions | ||
bff.plot_series | ||
bff.plot_true_vs_pred | ||
bff.read_sql_by_chunks | ||
bff.sliding_window | ||
bff.value_2_list | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.concat\_with\_categories | ||
============================ | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: concat_with_categories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.get\_peaks | ||
============== | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: get_peaks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.idict | ||
========= | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: idict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.mem\_usage\_pd | ||
================== | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: mem_usage_pd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.parse\_date | ||
=============== | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: parse_date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.plot\_history | ||
================= | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: plot_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.plot\_predictions | ||
===================== | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: plot_predictions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.plot\_series | ||
================ | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: plot_series |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.plot\_true\_vs\_pred | ||
======================== | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: plot_true_vs_pred |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.read\_sql\_by\_chunks | ||
========================= | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: read_sql_by_chunks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.sliding\_window | ||
=================== | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: sliding_window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
bff.value\_2\_list | ||
================== | ||
|
||
.. currentmodule:: bff | ||
|
||
.. autofunction:: value_2_list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. bff documentation master file, created by | ||
sphinx-quickstart on Thu Jun 27 21:58:58 2019. | ||
You can adapt this file completely to your liking, but it should at least | ||
contain the root `toctree` directive. | ||
bff | ||
=== | ||
|
||
*Best Fancy Functions, your Best Friend Forever* | ||
|
||
The bff package contains some utility functions from plots to data manipulations and could become your new bff. | ||
|
||
The goal of this package is to have easy access of the functions I am using frequently on projects. | ||
|
||
This is still a work in progress, contributions are welcome. | ||
|
||
Contents | ||
-------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Getting Started | ||
|
||
quickstart | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: User Guide | ||
|
||
fancy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. _quickstart: | ||
|
||
Quick Start | ||
=========== | ||
|
||
Install bff | ||
----------- | ||
|
||
If you use ``pip``, you can install it with:: | ||
|
||
pip install bff | ||
|
||
Development | ||
----------- | ||
|
||
You can run the test using:: | ||
|
||
make all | ||
|
||
This will run unittests for code and code style checks. | ||
|
||
Contributing | ||
------------ | ||
|
||
Contributions are welcome! | ||
|
||
If you want to contribute, you should proceed as follows:: | ||
|
||
1. Fork it (<https://github.com/yourname/yourproject/fork>) | ||
2. Create your feature branch (`git checkout -b feature/fooBar`) | ||
3. Commit your changes (`git commit -am 'Add some fooBar'`) | ||
4. Push to the branch (`git push origin feature/fooBar`) | ||
5. Create a new Pull Request | ||
|
||
If this is supposed to be a new realease, the new version must be set in the tag:: | ||
|
||
git tag vx.y.z | ||
git push --tags | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
coveralls | ||
flake8 | ||
numpydoc | ||
pytest | ||
pytest-codestyle | ||
pytest-cov | ||
pytest-docstyle | ||
pytest-pylint | ||
python-coveralls | ||
recommonmark | ||
Sphinx | ||
sphinx-autodoc-typehints | ||
sphinx-rtd-theme |