Project lacks proper Python package structure #17

Open
opened 2026-03-19 17:31:22 +00:00 by llabeyrie · 0 comments
Owner

Description

The project is organized as loose directories with hyphens in names, making it impossible to use as a Python package:

juicepyter/
├── app.py
├── card_generator_adapter.py
├── fetch_card.py
├── prompt_to_card_pipeline.py
├── clean-text-to-keywords/     ← hyphenated, no __init__.py
│   ├── keyword_extractor.py
│   ├── json_inference.py
│   └── infer_json_usage.py
├── text-cleaner/               ← hyphenated, no __init__.py
│   └── text_cleaning_pipeline.py
└── pokemon_card_lora/          ← model weights, not code

Problems

  • Directory names with hyphens (clean-text-to-keywords, text-cleaner) are invalid Python package names
  • No __init__.py files anywhere
  • Modules communicate via subprocess calls instead of direct imports
  • The pipeline in prompt_to_card_pipeline.py dynamically loads modules from file paths instead of importing them

Suggested structure

juicepyter/
├── pyproject.toml
├── src/
│   └── juicepyter/
│       ├── __init__.py
│       ├── app.py
│       ├── pipeline.py
│       ├── text_cleaner/
│       │   ├── __init__.py
│       │   └── cleaning.py
│       ├── keyword_inference/
│       │   ├── __init__.py
│       │   ├── extractor.py
│       │   └── inference.py
│       └── card_generator/
│           ├── __init__.py
│           └── adapter.py
├── models/
│   └── pokemon_card_lora/
├── tests/
└── data/

This would allow direct imports, proper testing, and standard packaging.

## Description The project is organized as loose directories with hyphens in names, making it impossible to use as a Python package: ``` juicepyter/ ├── app.py ├── card_generator_adapter.py ├── fetch_card.py ├── prompt_to_card_pipeline.py ├── clean-text-to-keywords/ ← hyphenated, no __init__.py │ ├── keyword_extractor.py │ ├── json_inference.py │ └── infer_json_usage.py ├── text-cleaner/ ← hyphenated, no __init__.py │ └── text_cleaning_pipeline.py └── pokemon_card_lora/ ← model weights, not code ``` ### Problems - Directory names with hyphens (`clean-text-to-keywords`, `text-cleaner`) are **invalid Python package names** - No `__init__.py` files anywhere - Modules communicate via subprocess calls instead of direct imports - The pipeline in `prompt_to_card_pipeline.py` dynamically loads modules from file paths instead of importing them ### Suggested structure ``` juicepyter/ ├── pyproject.toml ├── src/ │ └── juicepyter/ │ ├── __init__.py │ ├── app.py │ ├── pipeline.py │ ├── text_cleaner/ │ │ ├── __init__.py │ │ └── cleaning.py │ ├── keyword_inference/ │ │ ├── __init__.py │ │ ├── extractor.py │ │ └── inference.py │ └── card_generator/ │ ├── __init__.py │ └── adapter.py ├── models/ │ └── pokemon_card_lora/ ├── tests/ └── data/ ``` This would allow direct imports, proper testing, and standard packaging.
llabeyrie added the priority: lowstructure labels 2026-03-19 17:31:51 +00:00
Sign in to join this conversation.