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.5.3.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

allowed-1.5.3-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: allowed-1.5.3.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Darwin/24.6.0

File hashes

Hashes for allowed-1.5.3.tar.gz
Algorithm Hash digest
SHA256 46c89e9e2024553cab35309bc3b3e803735fb571e78640845da5665b441f7ffe
MD5 4e9cb2c54e6ad6447a1f76ca99db32f8
BLAKE2b-256 f8264857447e53a1d43748c4554708d7f16d47f315113491d211b0fb611bdc1c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: allowed-1.5.3-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Darwin/24.6.0

File hashes

Hashes for allowed-1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a38320d231cc875f23f308b2a06dc2ede73adce2a4b75cd0967954149f67e5fb
MD5 fdce05a636b127ceab0b34894d05476f
BLAKE2b-256 e5b4426e29b320f7ad9d455a41e9cd9822c4a17c87f606b4d7bd206641500f5c

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