Skip to main content

CS2103T PE Toolkit: Practical Exam Helper CLI

Project description

PE Toolkit

A command-line tool for generating edge case test inputs, checking typos in PDF, and validating PDF links for CS2103/T practical exams.

Getting Started

Prerequisites

To use this tool, you will need Python 3.9 or higher. You can verify your Python installation via:

python3 --version

Installation

Option 1: Install via PyPI

  1. Install the package using pip:

    pip install pe-toolkit
    
  2. Verify the installation by checking the version:

    pe-toolkit --help
    

Option 2: Local Development Setup

  1. Clone the repository and install dependencies:

    git clone https://github.com/oadultradeepfield/cs2103-pe-toolkit.git
    cd pe-toolkit
    make install
    
  2. The following Makefile commands are available:

    Command Description
    make install Install dependencies from requirements.txt
    make lint Run Ruff lint
    make format Run Ruff format check
    make typecheck Run Mypy type checking
    make check Run all checks (install, lint, format, type)
    make clean Remove compiled artifacts

Quick Start

Generate Edge Case Inputs

  1. Create a JSON specification file:

    [
      {
        "variable": "email",
        "prefix": "e/",
        "type": "string",
        "min_length": 5,
        "max_length": 100
      },
      {
        "variable": "score",
        "prefix": "s/",
        "type": "double",
        "min": 0.0,
        "max": 100.0
      },
      {
        "variable": "birthdate",
        "prefix": "d/",
        "type": "date",
        "format": "%Y-%m-%d"
      }
    ]
    

    Below is the list of supported field types and their parameters.

    Type Configuration
    String "type": "string", "min_length": X, "max_length": Y
    Integer "type": "integer", "min": X, "max": Y
    Long "type": "long", "min": X, "max": Y
    Double "type": "double", "min": X, "max": Y
    Date "type": "date", "format": "%Y-%m-%d"
    Time "type": "time", "format": "%H:%M"

    Note that the minimum and maximum values are optional. If omitted, default values will be used.

  2. Generate test cases:

    pe-toolkit generate spec.json
    

Check PDF Typos

To check for typos in a PDF document, run:

pe-toolkit check-typos document.pdf

Check PDF Links

To validate all hyperlinks in a PDF document, run:

pe-toolkit check-links document.pdf

Development

For contributors or local development:

  • Run all checks:

    make check
    
  • Clean up build artifacts:

    make clean
    

License

This project is licensed under the MIT License. See the LICENSE file for more details.

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

pe_toolkit-1.2.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

pe_toolkit-1.2.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file pe_toolkit-1.2.0.tar.gz.

File metadata

  • Download URL: pe_toolkit-1.2.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pe_toolkit-1.2.0.tar.gz
Algorithm Hash digest
SHA256 d2c4332b36436cb3077859b46ae618db515e37ad2032e8556fae117230464915
MD5 6bc4d8e53bdd6b0bcdfe9ff1775cc734
BLAKE2b-256 9dfd1111f0d4637c5992304dd4f0796196f219192305778f304cf40f2be9fb9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pe_toolkit-1.2.0.tar.gz:

Publisher: publish.yml on oadultradeepfield/cs2103-pe-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pe_toolkit-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pe_toolkit-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pe_toolkit-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9688240198d3ab636f80832aa4c86202d9879b9cd024d73a1efc8f698b42abb
MD5 f0289f6f77923d5f6cf11d25c34acde8
BLAKE2b-256 5dae621c56fb843068e52faff74424629f0c31546fb07cc01c3445dd137d2099

See more details on using hashes here.

Provenance

The following attestation bundles were made for pe_toolkit-1.2.0-py3-none-any.whl:

Publisher: publish.yml on oadultradeepfield/cs2103-pe-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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