Skip to content

DrSmoothl/Phosphorus

Repository files navigation

Phosphorus - JPlag based Plagiarism Checker Server for Hydro

A FastAPI-based server that wraps JPlag command-line tool for plagiarism detection in Hydro OJ.

Development Setup

Prerequisites

  • Python 3.11+
  • uv (for dependency management)

Installation

  1. Clone the repository:
git clone https://github.com/DrSmoothl/Phosphorus
cd Phosphorus
  1. Create virtual environment and install dependencies:
uv venv
uv pip install -e ".[dev]"
  1. Activate virtual environment:
# Windows
.venv\Scripts\activate
# Unix/macOS
source .venv/bin/activate

Development

Run the server:

Option 1 - Using the main script:

uv run python main.py

Option 2 - Using the console script:

uv run phosphorus

Option 3 - Using the development runner:

uv run python run_dev.py

Run tests:

uv run pytest

Code formatting and linting:

uv run ruff check .
uv run ruff format .

Project Structure

/src                 # Main source code
  /api               # API route handlers
  /common            # Common modules (logger, config)
  /core              # Core business logic
  /utils             # Utility functions
/tests               # Unit tests

API Documentation

Once the server is running, visit:

License

GPL v3.0

About

Phosphorus - JPlag based Plagiarism Checker Server for Hydro

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published