A FastAPI-based server that wraps JPlag command-line tool for plagiarism detection in Hydro OJ.
- Python 3.11+
- uv (for dependency management)
- Clone the repository:
git clone https://github.com/DrSmoothl/Phosphorus
cd Phosphorus- Create virtual environment and install dependencies:
uv venv
uv pip install -e ".[dev]"- Activate virtual environment:
# Windows
.venv\Scripts\activate
# Unix/macOS
source .venv/bin/activateOption 1 - Using the main script:
uv run python main.pyOption 2 - Using the console script:
uv run phosphorusOption 3 - Using the development runner:
uv run python run_dev.pyuv run pytestuv run ruff check .
uv run ruff format ./src # Main source code
/api # API route handlers
/common # Common modules (logger, config)
/core # Core business logic
/utils # Utility functions
/tests # Unit tests
Once the server is running, visit:
- Interactive API docs: http://localhost:8000/docs
- ReDoc documentation: http://localhost:8000/redoc