Docinstance is a package for managing docstrings as instances of a Python object, Docstring, rather than string literals. The goal of this package is to develop a framework that allows us to painlessly construct and modify docstrings in different styles.
Since this is a work in progress, we list the intended features of this module:
- Parse docstring into Docstring instances
- numpy docstring
- google docstring
- sphinx's rst docstring
- Write docstring from Docstring instance
- numpy docstring
- google docstring
- sphinx's rst docstring
- Translate docstrings from one style to another
- numpy to google or sphinx's rst style
- Inherit (parts of) docstrings
- from parent
- from other objects
- Generate docstring from code
- List of parameters
- List of methods/properties in a class
- List of functions/classes in a module
- Generate code from docstring
- static type checking
- Interface to IDE's
- Vim
- Emacs
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
To use this module, no other packages are needed except for the standard Python library for Python 3.
For testing, pytest
is the only prerequisite.
pip install pytest
For quality assurance, tox
is used along side pytest
, pytest-cov
,
flake8
, pylint
, pydocstyle
, and pycodestyle
.
pip install tox
pip install pytest
pip install pytest-cov
pip install flake8
pip install pylint
pip install pydocstyle
pip install pycodestyle
To install the package from PyPI, use pip:
pip install docinstance
To install the package from source, download the package using git, then install using pip:
git clone https://github.com/kimt33/docinstance.git
cd docinstance
pip install -e ./
To test the code, run pytest from the package directory.
cd /path/to/docinstance/
pytest
To run quality assurance, run tox from the package directory
cd /path/to/docinstance/
tox
Note that if you do not have different versions of Python installed, you may need to specify the python version.
tox -e py37
tox -e py36
tox -e py35
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Taewon David Kim - Initial work - kimt33
See also the list of contributors who participated in this project.
This project is licensed under the GPLv3 License - see the LICENSE.md file for details
- This README was templated from PurpleBooth/README-Template.md
- Inspiration
- etc