Skip to content

Commit

Permalink
Initial repository desgion (#2)
Browse files Browse the repository at this point in the history
Initial attempt at some structuring of the repo
PaulJWright authored Aug 3, 2024
1 parent eebd8dc commit faeb245
Showing 10 changed files with 61 additions and 103 deletions.
File renamed without changes.
61 changes: 61 additions & 0 deletions weird_salads/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Overview
--------

* api (FastAPI)
* data [small data files (if needed), probably where the SQLite DB will be stored...]
* database (scripts alembic migrations)
* inventory [deals with inventory-related tasks]
* order [deals with the order tasks]
* streamlit_app (streamlit frontend)
* tests [openastronomy location for tests]


Repository Layout
=================

Below is the proposed directory structure for the `weird_salads` project:

.. code-block:: text
weird_salads/
├── weird_salads/ # Main application package
│ ├── README.rst
│ ├── data/ # Small data-related files (/SQLite DB)
│ ├── database/ # DB related utils, e.g. alembic
│ ├── api/ # FastAPI-related code
│ │ ├── __init__.py
│ │ ├── app.py # FastAPI app and routers
│ │ ├── endpoints/
│ │ ├── schemas/
│ │ │ ├── orders_schema.py # Orders Pydantic schemas
│ │ │ └── inventory_schema.py # Inventory Pydantic schemas
│ │ └── ...
│ ├── inventory/ # Inventory module
│ │ ├── inventory_service/ # Business logic
│ │ │ ├── exceptions.py # inventory-specific exceptions
│ │ │ ├── inventory_service.py
│ │ │ └── ...
│ │ ├── repository/ # Data layer access
│ │ │ ├── __init__.py
│ │ │ ├── inventory_repository.py
│ │ │ ├── models.py
│ │ │ └── ...
│ │ └── ...
│ ├── orders/ # Orders module (similar to Inventory)
│ │ ├── orders_service/
│ │ │ ├── exceptions.py
│ │ │ ├── orders_service.py
│ │ │ └── orders.py
│ │ ├── repository/
│ │ │ ├── __init__.py
│ │ │ ├── orders_repository.py
│ │ │ ├── models.py
│ │ │ └── ...
│ │ └── ...
│ ├── streamlit_app/ # Streamlit frontend
│ ├── tests/ # Unit and integration tests
│ ├── utils/ # Shared utility functions
│ │ ├── unit_of_work.py # Unit of work for transaction management
│ │ └── ...
│ └── version.py # Version information
└── ...
File renamed without changes.
94 changes: 0 additions & 94 deletions weird_salads/example_mod.py

This file was deleted.

5 changes: 0 additions & 5 deletions weird_salads/example_subpkg/__init__.py

This file was deleted.

Empty file.
Empty file added weird_salads/orders/__init__.py
Empty file.
Empty file.
4 changes: 0 additions & 4 deletions weird_salads/tests/test_example.py

This file was deleted.

Empty file added weird_salads/utils/__init__.py
Empty file.

0 comments on commit faeb245

Please sign in to comment.