Skip to content

Commit 681b9c4

Browse files
committed
Add CONTRIBUTING.md and misc updates
1 parent c9a7279 commit 681b9c4

8 files changed

Lines changed: 36 additions & 78 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ repos:
2424
rev: v0.790
2525
hooks:
2626
- id: mypy
27-
args: [ --ignore-missing-imports ]
2827
- repo: https://gitlab.com/pycqa/flake8
2928
rev: 3.8.4
3029
hooks:

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributing
2+
3+
Set up dev environment:
4+
```shell
5+
cd ~/your/repository/fork # Activate venv if you have one (recommended)
6+
pip install -e .[dev] # Install dev dependencies (e.g. black, mypy, pre-commit)
7+
pre-commit install # Install git pre-commit hooks
8+
```
9+
10+
Run unit tests with coverage:
11+
12+
```shell
13+
py.test --cov=./ --cov-report=html # Open htmlcov/index.html in your browser
14+
```
15+
16+
Build and test documentation:
17+
18+
```shell
19+
python -m sphinx docs docs/_build # Open docs/_build/index.html in your browser
20+
```
21+
22+
Thank you for your contribution!

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016,2017,2018,2019,2020,2021 Joohwan Oh
3+
Copyright (c) 2016-2021 Joohwan Oh
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
include README.md LICENSE
22
prune tests
3-
recursive-include gifs

README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -295,20 +295,3 @@ print(root.values)
295295
```
296296

297297
Check out the [documentation](http://binarytree.readthedocs.io) for more details.
298-
299-
Contributing
300-
============
301-
302-
Set up dev environment:
303-
304-
```shell
305-
cd ~/your/binarytree/clone # Activate venv if you have one (recommended)
306-
pip install -e .[dev] # Install dev dependencies (black, mypy, pre-commit etc.)
307-
pre-commit install # Install git pre-commit hooks
308-
```
309-
310-
Run unit tests with coverage:
311-
312-
```shell
313-
py.test --cov=binarytree --cov-report=html
314-
```

docs/conf.py

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,11 @@
1-
# Configuration file for the Sphinx documentation builder.
2-
#
3-
# This file only contains a selection of the most common options. For a full
4-
# list see the documentation:
5-
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6-
7-
# -- Path setup --------------------------------------------------------------
8-
9-
# If extensions (or modules to document with autodoc) are in another directory,
10-
# add these directories to sys.path here. If the directory is relative to the
11-
# documentation root, use os.path.abspath to make it absolute, like shown here.
12-
#
13-
import os
14-
import sys
15-
16-
sys.path.insert(0, os.path.abspath(".."))
17-
18-
import binarytree
19-
20-
# -- Project information -----------------------------------------------------
21-
221
project = "binarytree"
23-
copyright = "2016,2017,2018,2019,2020,2021, Joohwan Oh"
2+
copyright = "2016-2021, Joohwan Oh"
243
author = "Joohwan Oh"
25-
26-
27-
# -- General configuration ---------------------------------------------------
28-
29-
# Add any Sphinx extension module names here, as strings. They can be
30-
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31-
# ones.
324
extensions = [
335
"sphinx_rtd_theme",
346
"sphinx.ext.autodoc",
357
"sphinx.ext.doctest",
368
"sphinx.ext.viewcode",
379
]
38-
39-
# List of patterns, relative to source directory, that match files and
40-
# directories to ignore when looking for source files.
41-
# This pattern also affects html_static_path and html_extra_path.
4210
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
43-
44-
# The version info for the project you're documenting, acts as replacement for
45-
# |version| and |release|, also used in various other places throughout the
46-
# built documents.
47-
version = binarytree.__version__
48-
release = binarytree.__version__
49-
50-
# The master toctree document.
51-
master_doc = "index"
52-
53-
# -- Options for HTML output -------------------------------------------------
54-
55-
# The theme to use for HTML and HTML Help pages. See the documentation for
56-
# a list of builtin themes.
57-
#
5811
html_theme = "sphinx_rtd_theme"
59-
60-
htmlhelp_basename = "binarytreedoc"

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
[build-system]
22
requires = [
33
"setuptools>=42",
4+
"setuptools_scm[toml]>=3.4",
45
"wheel",
5-
"setuptools_scm[toml]>=3.4"
66
]
77
build-backend = "setuptools.build_meta"
88

99
[tool.coverage.run]
10-
omit = ["binarytree/version.py"]
10+
omit = [
11+
"binarytree/version.py",
12+
"setup.py"
13+
]
1114

1215
[tool.isort]
1316
profile = "black"

setup.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
author="Joohwan Oh",
1212
author_email="joohwan.oh@outlook.com",
1313
url="https://github.com/joowani/binarytree",
14+
keywords=["tree", "heap", "bst", "education"],
1415
packages=find_packages(exclude=["tests"]),
1516
include_package_data=True,
1617
python_requires=">=3.6",
@@ -25,10 +26,10 @@
2526
extras_require={
2627
"dev": [
2728
"black",
28-
"flake8",
29+
"flake8>=3.8.4",
2930
"isort>=5.0.0",
30-
"mypy",
31-
"pre-commit",
31+
"mypy>=0.790",
32+
"pre-commit>=2.9.3",
3233
"pytest>=6.0.0",
3334
"pytest-cov>=2.0.0",
3435
"sphinx",
@@ -38,12 +39,12 @@
3839
classifiers=[
3940
"Intended Audience :: Developers",
4041
"License :: OSI Approved :: MIT License",
41-
"Operating System :: POSIX",
42+
"Natural Language :: English",
4243
"Operating System :: MacOS",
43-
"Operating System :: Unix",
4444
"Operating System :: Microsoft :: Windows",
45-
"Programming Language :: Python",
45+
"Operating System :: Unix",
4646
"Programming Language :: Python :: 3",
47+
"Topic :: Documentation :: Sphinx",
4748
"Topic :: Education",
4849
],
4950
)

0 commit comments

Comments
 (0)