diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc7f652..a79ea88 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,6 @@ repos: rev: v0.790 hooks: - id: mypy - args: [ --ignore-missing-imports ] - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.4 hooks: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..96d4e0d --- /dev/null +++ b/CONTRIBUTING.md @@ -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! diff --git a/LICENSE b/LICENSE index 65368b7..c4c7018 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016,2017,2018,2019,2020,2021 Joohwan Oh +Copyright (c) 2016-2021 Joohwan Oh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MANIFEST.in b/MANIFEST.in index c2e5560..8815dcc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,2 @@ include README.md LICENSE prune tests -recursive-include gifs diff --git a/README.md b/README.md index 753b346..0633426 100644 --- a/README.md +++ b/README.md @@ -295,20 +295,3 @@ print(root.values) ``` Check out the [documentation](http://binarytree.readthedocs.io) for more details. - -Contributing -============ - -Set up dev environment: - -```shell -cd ~/your/binarytree/clone # Activate venv if you have one (recommended) -pip install -e .[dev] # Install dev dependencies (black, mypy, pre-commit etc.) -pre-commit install # Install git pre-commit hooks -``` - -Run unit tests with coverage: - -```shell -py.test --cov=binarytree --cov-report=html -``` diff --git a/docs/conf.py b/docs/conf.py index 669c0d5..670def1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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" diff --git a/pyproject.toml b/pyproject.toml index 3fba808..3b3a65f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,16 @@ [build-system] requires = [ "setuptools>=42", + "setuptools_scm[toml]>=3.4", "wheel", - "setuptools_scm[toml]>=3.4" ] build-backend = "setuptools.build_meta" [tool.coverage.run] -omit = ["binarytree/version.py"] +omit = [ + "binarytree/version.py", + "setup.py" +] [tool.isort] profile = "black" diff --git a/setup.py b/setup.py index 739dbec..bdb3a78 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,7 @@ author="Joohwan Oh", author_email="joohwan.oh@outlook.com", 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", ], )