Skip to content

muhammad-fiaz/cp-dataset-gui

Repository files navigation

cp-dataset-gui logo

cp-dataset-gui

License Python CodeQL code style: black Linting: ruff pre-commit Dependabot Updates Last Commit Issues PRs

A collection and GUI for managing, visualizing, and analyzing competitive programming datasets with a user-friendly PyQt6-based interface.

Features

  • Dataset Management: Add, update, remove, and organize competitive programming datasets.
  • Visualization: Visualize problem statistics and dataset distributions.
  • Analysis Tools: Analyze dataset contents for insights and trends.
  • SQLite Integration: Works with SQLite databases for flexible data storage.
  • Modern GUI: Built with PyQt6 for a responsive and cross-platform experience.

Installation

Clone the Repository

First, clone the repository from GitHub:

git clone https://github.com/muhammad-fiaz/cp-dataset-gui.git
cd cp-dataset-gui

Prerequisites

  • Python 3.12 or higher
  • pip
  • (Optional but recommended for speed) uv (a fast Python package installer and resolver)

Install dependencies with pip

pip install -r requirements.txt

Or, if using a PEP 621-compliant build system:

pip install .

Install dependencies with uv (recommended for speed)

First, install uv if you don't have it:

pip install uv

Or use Homebrew (on macOS/Linux):

brew install uv

Then, install dependencies:

uv pip install -r requirements.txt

Or, for editable/development mode:

uv pip install -e .[dev]

Usage

Run the app from the root directory:

python main.py

Building Standalone Executables

You can build a standalone executable for your platform (Windows, Linux, or macOS) with one click using the provided build script. The executable will include all required Python dependencies and the assets folder (including icons/images).

Instructions

  1. Ensure your assets folder (with all images/icons) and main.py are present in the project root.

  2. Place your app icon at assets/images/logo.ico (for Windows) or assets/images/logo.icns (for macOS).

  3. Run the build script for your platform:

    python build.py
    • The script will:
      • Clean previous builds
      • Install PyInstaller if not already installed
      • Bundle all dependencies and assets into a single executable
      • Set your application icon (if present)
      • Output the final executable in the dist/ folder
  4. Note:

    • You must run the build on the OS you want to target (Windows for .exe, Linux for Linux binary, macOS for .app/binary).
    • Cross-compiling is not supported by PyInstaller.

Example

For Windows:

python build.py

Your standalone .exe will be in the dist/ folder.

For Linux or macOS:

python build.py

Your platform-specific binary will be in the dist/ folder.

Development

Install development dependencies

With pip:

pip install .[dev]

With uv:

uv pip install -e .[dev]

Linting

ruff .

Project Structure

cp-dataset-gui/
├── main.py
├── cp_dataset.db
├── assets/
│   └── images/
│       ├── logo.png
│       ├── logo.ico
│       └── logo_rounded.png
├── pyproject.toml
├── requirements.txt
├── build.py
├── README.md
└── LICENSE

Contributing

Contributions are welcome! Please open an issue or pull request on GitHub.

License

This project is licensed under the Apache License 2.0.

Author

Muhammad Fiaz
Email Me