mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-30 10:38:37 +00:00
Add py-dpcontracts 0.6.0
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. WWW: https://github.com/deadpixi/contracts
This commit is contained in:
parent
42f010068b
commit
c046f79805
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=551174
@ -4335,6 +4335,7 @@
|
||||
SUBDIR += py-dogpile.cache
|
||||
SUBDIR += py-doit
|
||||
SUBDIR += py-dotted
|
||||
SUBDIR += py-dpcontracts
|
||||
SUBDIR += py-dtfabric
|
||||
SUBDIR += py-durus
|
||||
SUBDIR += py-dynrules
|
||||
|
20
devel/py-dpcontracts/Makefile
Normal file
20
devel/py-dpcontracts/Makefile
Normal file
@ -0,0 +1,20 @@
|
||||
# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= dpcontracts
|
||||
PORTVERSION= 0.6.0
|
||||
CATEGORIES= devel python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= sunpoet@FreeBSD.org
|
||||
COMMENT= Simple implementation of contracts for Python
|
||||
|
||||
LICENSE= LGPL3+
|
||||
|
||||
USES= python:3.5+
|
||||
USE_PYTHON= autoplist concurrent distutils
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
.include <bsd.port.mk>
|
3
devel/py-dpcontracts/distinfo
Normal file
3
devel/py-dpcontracts/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1601627925
|
||||
SHA256 (dpcontracts-0.6.0.tar.gz) = 6cf9df1f16beaa48523b798b41170dabf7a536a6133328731665cdb29c42234a
|
||||
SIZE (dpcontracts-0.6.0.tar.gz) = 11156
|
23
devel/py-dpcontracts/pkg-descr
Normal file
23
devel/py-dpcontracts/pkg-descr
Normal file
@ -0,0 +1,23 @@
|
||||
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.
|
||||
|
||||
WWW: https://github.com/deadpixi/contracts
|
Loading…
Reference in New Issue
Block a user