Skip to content

Package Project (add pyproject.toml) #9

@Dnysus

Description

@Dnysus

Problem Currently, freq-checker is run as a raw script (python main.py). This makes it difficult to install, distribute, or import into other Python projects. Users have to manually manage requirements.txt and ensure they are in the correct directory to run the tool.

Goal Standardize the project packaging using pyproject.toml to support installation via pip and allow execution from anywhere in the terminal.

Proposed Solution:

  1. Create pyproject.toml:
  • Define build system (likely setuptools or hatch).

  • Specify project metadata (name, version (0.1.0), description, authors).

  • Migrate dependencies from requirements.txt to the dependencies array.

  1. Entry Point:
  • Define a [project.scripts] entry point (e.g., freq-check = "freq_checker.main:main") so users can type freq-check instead of python main.py.

  • Refactor Imports: verify relative imports in freq_checker work when installed as a package.

Acceptance Criteria:

  • Running pip install . in the root directory successfully installs the package and its dependencies (pandas, openpyxl, thefuzz, etc.).

  • The command freq-check --help works from any directory in the terminal.

  • import freq_checker works in a Python REPL.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions