indoc
Developer Guide
Setup
# create conda environment
$ mamba env create -f env.yml
# update conda environment
$ mamba env update -n indoc --file env.yml
Install
pip install -e .
# install from pypi
pip install indoc
nbdev
# activate conda environment
$ conda activate indoc
# make sure the indoc package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to the indoc package
$ nbdev_prepare
Publishing
# publish to pypi
$ nbdev_pypi
# publish to conda
$ nbdev_conda --build_args '-c conda-forge'
$ nbdev_conda --mambabuild --build_args '-c conda-forge -c dsm-72'
Usage
Installation
Install latest from the GitHub repository:
$ pip install git+https://github.com/dsm-72/indoc.git
or from conda
$ conda install -c dsm-72 indoc
or from pypi
$ pip install indoc
Documentation
Documentation can be found hosted on GitHub repository pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.
indoc decorator
define (base / mixin) class with a docstring we want to pass to a subclass
@dataclass
class Mix:
r'''
A Mixin class
Attributes
----------
a : str
a string
i : int, optional
an int
b : bool, optional
a bool
Methods
-------
is_b(self) -> bool
checks if b is True
'''
a: str
_: KW_ONLY
i: int = 0
b: bool = False
@property
def prop(self):
return self.a
@abstractmethod
def is_b(self) -> bool:
return self.b
A subclass we want to have Mix’s docstring
foodoc = '''
A Foo class
Attributes
----------
q : bool
Methods
-------
is_q(self) -> bool
checks if q is True
'''
@indoc
@dataclass
class Foo(Mix):
__doc__ = foodoc
q: bool
def is_q(self) -> bool:
return self.q
Metadata
Release files for indoc 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| indoc-0.0.4.tar.gz | 15.0 kB | Without provenance | Details for indoc-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| indoc-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for indoc-0.0.4-py3-none-any.whl |
Total release size: 29.5 kB
Release files / indoc-0.0.4.tar.gz
| Download URL | indoc-0.0.4.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0500b466d1b78339142bb1d0b92d7a4cda6be0809ecd56940a612c619f8db05
|
|
BLAKE2b-256 checksum How to use checksums |
f1886a3158d416bfb3592f2f54b7770710e11276b85c00fd30b1bcd256d4c7c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / indoc-0.0.4-py3-none-any.whl
| Download URL | indoc-0.0.4-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d47938cdf2ec66bb599c53e373be3ec7124067cf2d72636e830c1db29a25a76
|
|
BLAKE2b-256 checksum How to use checksums |
0545f103dea4965c96391f5c872440fbae9601f772f1cbb4a923061efb176871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for indoc 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.