Skip to main content

Check if a program only uses a subset of the Python language.

Project description

Courses often use a restricted subset of a programming language and its library, to reduce cognitive load, focus on concepts, simplify marking, etc.

allowed is a program that checks if your code files and Jupyter notebooks only use the Python constructs that were taught.

allowed enables instructors to check in advance their examples, exercises and assessment for inadvertent use of constructs that weren't taught. It also allows students and instructors to check submitted code against the taught constructs. To do its job, allowed requires a short file that lists which constructs were introduced in which 'unit' of the course. That file can be used as a reference document to onboard new tutors and to discuss the design of the course, e.g. to check if important constructs are missing or if some units are overloaded.

Like all static analysis tools, allowed isn't perfect and will never be. There may be false positives (code reported to be a violation, but isn't) and false negatives (code that uses disallowed constructs but isn't reported).

To refer to allowed in a publication, please cite

Michel Wermelinger. Checking Conformance to a Subset of the Python Language. Proceedings of the Conference on Innovation and Technology in Computer Science Education (ITiCSE), vol. 2, pp. 573–574. ACM, 2023.

Instructions

If you're an M269 student or tutor, follow the M269 software installation instructions, and use the M269 technical forum or the tutor forum to report issues and ask questions.

Otherwise, follow the instructions on how to install, use and configure allowed. If you need help, post your query in the Q & A discussion forum.

Contributing

Any help to improve allowed is welcome and appreciated.

  • If you use allowed, please share your experience and tips in the show & tell forum.
  • If you require a new feature, please suggest it in the ideas discussion forum.
  • If you spot an error in the code or documentation, please check if it has been reported, before creating a new issue.
  • If you want to contribute code or documentation that addresses an open issue, please read first our code contribution guide. Your contribution will become available under the terms below.

Licences

The code and text in this repository are Copyright © 2023 by The Open University, UK. The code is licensed under a BSD 3-clause licence. The text is licensed under a Creative Commons Attribution 4.0 International Licence.

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

allowed-1.4.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

allowed-1.4.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file allowed-1.4.0.tar.gz.

File metadata

  • Download URL: allowed-1.4.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.11 Darwin/22.6.0

File hashes

Hashes for allowed-1.4.0.tar.gz
Algorithm Hash digest
SHA256 812028acc29e8d47add3b68d778f9e261e5adfc04e6702b313b363ead99654dc
MD5 2a5e0fa5e10c89edfcdd7f771fc4e8a7
BLAKE2b-256 bb1915e2e9f7480956d30610d17428dcbb40e466707b22d04f7befa7e0ab4691

See more details on using hashes here.

File details

Details for the file allowed-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: allowed-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.11 Darwin/22.6.0

File hashes

Hashes for allowed-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cf6f65c9a53a58d9dabce349cf6fae90a652d735158305ed46f7c8abea0e2a8
MD5 02ecb65f71f601f10dfcca56ea6da7b1
BLAKE2b-256 08b50e6b16b59db6ab544fd5df1f35465029a59bb0ce80d708ba9311e9552419

See more details on using hashes here.

Supported by

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