Ensures generated code does no more than your spec demands.
Project description
specfence
A proof-of-concept implementation of Specification Fencing (essay coming soon).
Demo
example/fizzbuzz.py contains a simple implementation of FizzBuzz, but with scattered print and logging statements that do not change any observed behavior as defined by example/fizzbuzz_test.py. Running specfence on this file identifies these lines as specification fencing violations, and suggests deleting them.
$ uvx specfence example/fizzbuzz.py example/fizzbuzz_test.py
8| print("FizzBuzz!")
11| logger.info("Divisible by 3")
14| logger.info("Divisible by 5")
17| print("Returning number")
4 specification fencing violations found. Delete these lines as they do not change any observed behavior.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file specfence-0.0.14.tar.gz.
File metadata
- Download URL: specfence-0.0.14.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d5c06f8ac46c7c3d2fc81c5fcfdb503a6b527398440f40dfcbe181068a67671
|
|
| MD5 |
cbad687866a5cb327d26362f08c2b949
|
|
| BLAKE2b-256 |
b59f96537f797901e6f8858dde7ef9eaaaf0ba9c24fc6640be2872d62d0ecc73
|
File details
Details for the file specfence-0.0.14-py3-none-any.whl.
File metadata
- Download URL: specfence-0.0.14-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
229ae14534a670cab245e9c4e12d5668f865b3cf62672f6bd1b6878f4ff98615
|
|
| MD5 |
22df13a9cca286ca2bffed879e53ae26
|
|
| BLAKE2b-256 |
e64a82e912615ab4ab7a924ef77b5375211e531dc6885379115a99fba3345e18
|