Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

specfence-0.0.17.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

specfence-0.0.17-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file specfence-0.0.17.tar.gz.

File metadata

  • Download URL: specfence-0.0.17.tar.gz
  • Upload date:
  • Size: 6.6 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

Hashes for specfence-0.0.17.tar.gz
Algorithm Hash digest
SHA256 4e06ead00f06f7a18d355cf3871e9512ff1550d04bddb5792ee97dfbfed12e67
MD5 cbd0c0f8fa4df02a72de080a0ebb7249
BLAKE2b-256 709c34b887a505facb3a82bfb15117d62176a92e8364ad9a54ee0fb361eff1a7

See more details on using hashes here.

File details

Details for the file specfence-0.0.17-py3-none-any.whl.

File metadata

  • Download URL: specfence-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 8.1 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

Hashes for specfence-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 8aec91f4c6b055e73a8139e34b8adb9cc4bf563c097b6e0a0b4d822349e8e2d2
MD5 a0b2b165dae29b557d4977626cff42c0
BLAKE2b-256 2f16615ea79990228dead73de8070c6dcaa977e8d547e319d8c4ce43edf3bad6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page