Port details on branch 2022Q2 |
- py-dpcontracts Simple implementation of contracts for Python
- 0.6.0 devel =0 0.6.0Version of this port present on the latest quarterly branch.
- Maintainer: sunpoet@FreeBSD.org
- Port Added: 2020-10-02 13:15:31
- Last Update: 2023-06-27 19:34:34
- Commit Hash: 3d9a815
- Also Listed In: python
- License: LGPL3+
- WWW:
- https://github.com/deadpixi/contracts
- Description:
- This module provides a collection of decorators that makes it easy to write
software using contracts.
Contracts are a debugging and verification tool. They are declarative statements
about what states a program must be in to be considered "correct" at runtime.
They are similar to assertions, and are verified automatically at various
well-defined points in the program. Contracts can be specified on functions and
on classes.
Contracts serve as a form of documentation and a way of formally specifying
program behavior. Good practice often includes writing all of the contracts
first, with these contract specifying the exact expected state before and after
each function or method call and the things that should always be true for a
given class of object.
Contracts consist of two parts: a description and a condition. The description
is simply a human-readable string that describes what the contract is testing,
while the condition is a single function that tests that condition. The
condition is executed automatically and passed certain arguments (which vary
depending on the type of contract), and must return a boolean value: True if the
condition has been met, and False otherwise.
- ¦ ¦ ¦ ¦
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - There is no configure plist information for this port.
- Dependency lines:
-
- ${PYTHON_PKGNAMEPREFIX}dpcontracts>0:devel/py-dpcontracts@${PY_FLAVOR}
- To install the port:
- cd /usr/ports/devel/py-dpcontracts/ && make install clean
- To add the package, run one of these commands:
- pkg install devel/py-dpcontracts
- pkg install py39-dpcontracts
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py39-dpcontracts listed in the above command, you can pick from the names under the Packages section.- PKGNAME: py39-dpcontracts
- Package flavors (<flavor>: <package>)
- distinfo:
- TIMESTAMP = 1601627925
SHA256 (dpcontracts-0.6.0.tar.gz) = 6cf9df1f16beaa48523b798b41170dabf7a536a6133328731665cdb29c42234a
SIZE (dpcontracts-0.6.0.tar.gz) = 11156
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- py39-setuptools>=63.1.0 : devel/py-setuptools@py39
- python3.9 : lang/python39
- Test dependencies:
-
- python3.9 : lang/python39
- Runtime dependencies:
-
- py39-setuptools>=63.1.0 : devel/py-setuptools@py39
- python3.9 : lang/python39
- This port is required by:
- for Run
-
- devel/py-hypothesis
Configuration Options:
- No options to configure
- Options name:
- devel_py-dpcontracts
- USES:
- python
- FreshPorts was unable to extract/find any pkg message
- Master Sites:
|