-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CONTRIBUTING.md and misc updates
- Loading branch information
Showing
8 changed files
with
36 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Contributing | ||
|
||
Set up dev environment: | ||
```shell | ||
cd ~/your/repository/fork # Activate venv if you have one (recommended) | ||
pip install -e .[dev] # Install dev dependencies (e.g. black, mypy, pre-commit) | ||
pre-commit install # Install git pre-commit hooks | ||
``` | ||
|
||
Run unit tests with coverage: | ||
|
||
```shell | ||
py.test --cov=./ --cov-report=html # Open htmlcov/index.html in your browser | ||
``` | ||
|
||
Build and test documentation: | ||
|
||
```shell | ||
python -m sphinx docs docs/_build # Open docs/_build/index.html in your browser | ||
``` | ||
|
||
Thank you for your contribution! |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
include README.md LICENSE | ||
prune tests | ||
recursive-include gifs |
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 |
---|---|---|
@@ -1,60 +1,11 @@ | ||
# 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: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- 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("..")) | ||
|
||
import binarytree | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = "binarytree" | ||
copyright = "2016,2017,2018,2019,2020,2021, Joohwan Oh" | ||
copyright = "2016-2021, Joohwan Oh" | ||
author = "Joohwan Oh" | ||
|
||
|
||
# -- 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 = [ | ||
"sphinx_rtd_theme", | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.doctest", | ||
"sphinx.ext.viewcode", | ||
] | ||
|
||
# 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 = ["_build", "Thumbs.db", ".DS_Store"] | ||
|
||
# The version info for the project you're documenting, acts as replacement for | ||
# |version| and |release|, also used in various other places throughout the | ||
# built documents. | ||
version = binarytree.__version__ | ||
release = binarytree.__version__ | ||
|
||
# The master toctree document. | ||
master_doc = "index" | ||
|
||
# -- 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" | ||
|
||
htmlhelp_basename = "binarytreedoc" |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
author="Joohwan Oh", | ||
author_email="[email protected]", | ||
url="https://github.com/joowani/binarytree", | ||
keywords=["tree", "heap", "bst", "education"], | ||
packages=find_packages(exclude=["tests"]), | ||
include_package_data=True, | ||
python_requires=">=3.6", | ||
|
@@ -25,10 +26,10 @@ | |
extras_require={ | ||
"dev": [ | ||
"black", | ||
"flake8", | ||
"flake8>=3.8.4", | ||
"isort>=5.0.0", | ||
"mypy", | ||
"pre-commit", | ||
"mypy>=0.790", | ||
"pre-commit>=2.9.3", | ||
"pytest>=6.0.0", | ||
"pytest-cov>=2.0.0", | ||
"sphinx", | ||
|
@@ -38,12 +39,12 @@ | |
classifiers=[ | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: POSIX", | ||
"Natural Language :: English", | ||
"Operating System :: MacOS", | ||
"Operating System :: Unix", | ||
"Operating System :: Microsoft :: Windows", | ||
"Programming Language :: Python", | ||
"Operating System :: Unix", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Documentation :: Sphinx", | ||
"Topic :: Education", | ||
], | ||
) |