Skip to content

Reorganize code directories into python package organization #31

@penguinistakc

Description

@penguinistakc

Critical Package Structure Changes

  1. Add Build System Configuration to pyproject.toml
    Missing [build-system] section
    Should specify build backend (recommend hatchling or setuptools)
  2. Update Package Metadata in pyproject.toml
    Replace placeholder description: "Add your description here" → actual description
    Add missing fields:
    authors (name and email)
    license (you have a LICENSE file)
    keywords
    classifiers (Python versions, Development Status, License, Topic)
    urls (Homepage, Repository, Documentation, Issues)
    Consider renaming package to avoid PyPI conflicts (e.g., openstates-jurisdictions)
  3. Populate init.py
    Currently empty
    Should export version and key public APIs
    Add package-level docstring
  4. Add Console Scripts / Entry Points
    main.py should be available as a CLI command
    Add [project.scripts] section to pyproject.toml
  5. Configure Package Data
    state_lookup.json needs to be included
    Add package data configuration for non-Python files
    Code Cleanup Changes
  6. Move or Remove Root-Level Sample Files
    ohio_jurisdictions_CONSOLIDATED.py → move to sample_data or delete
    jurisdictions_sample.py → move to sample_data or delete
    These appear to be sample/test data, not production code
  7. Handle Root-Level CSV Files
    ocdid_no_validation_asof_2026-02-01T02:55:04.887642+00:00.csv
    ocdid_no_validation_asof_2026-02-01T03:00:51.325043+00:00.csv
    Either add to .gitignore or move to data directory
  8. Add Ruff Configuration
    Currently using ruff but no [tool.ruff] configuration in pyproject.toml
    Should specify linting rules, line length, exclude patterns
    Documentation Updates
  9. Update Installation Instructions in README.md
    Add instructions for installing as a package
    Add pip install -e . or uv pip install -e . for dev mode
  10. Create MANIFEST.in (if needed)
    Only if using setuptools and need to include non-code files
    May not be needed with proper pyproject.toml configuration
    Optional Improvements
  11. Add Type Checking Configuration
    Add [tool.mypy] or [tool.pyright] configuration
    Already using type hints extensively
  12. Versioning Strategy
    Consider dynamic versioning from git tags
    Or use version = "0.1.0" for initial release
  13. Add all Exports
    In module init.py files to control public API
    Especially in src/models/init.py, src/utils/init.py
  14. Consolidate dev dependencies
    Currently using [dependency-groups] (uv-specific)
    Consider adding [project.optional-dependencies] for broader compatibility

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions