stage0_py_utils
This repo publishes the a pypl module that contains utility code used throughout the stage0 system. See the server.py for an example of how to use this code. See the ECHO documentation for information on how the Stage0 Echo Bot is implemented.
Contributing
Prerequisites
- Stage0 Developer Edition #TODO for now just Docker
- Python 3.12
- Pipenv
Optional
- Mongo Compass - if you want a way to look into the database
Folder structure for source code
📁 stage0_py_utils/ # Repo root
│── 📁 stage0_py_utils/
│ │── 📁 agents/ # Echo Agents (Bot, Conversation, Echo)
│ │── 📁 config/ # System Wide configuration
│ │── 📁 echo/ # Echo Chat AI Framework
│ │── 📁 echo_utils/ # Echo related utilities
│ │── 📁 flask_utils/ # Flask related utilities
│ │── 📁 mongo_utils/ # MongoDB Utilities
│ │── 📁 evaluator/ # Echo evaluation utility
│ │── 📁 routes/ # Echo Flask Routes
│ │── 📁 services/ # Echo Persistence Services (Bot, Conversation)
│
│── 📁 tests/ # unittest code structure matches source
│ │── 📁 agents/
│ │── 📁 config/
│ │── 📁 echo/
│ │── ....
│ │── 📁 test_data/ # Testing Data
│ │ │── 📁 config/ # Config file testing data
│ │ │── 📁 evaluate/ # Echo Evaluate test data
│
│── README.md
│── ...
Pipenv Commands
We use pipenv automation to manage dependencies and automate common tasks. Note that running the sample server will use the configuration values (Tokens, ID's, Port, etc.) from the FRAN bot. You can not run the sample server if the FRAN bot is already running.
Install Dependencies
pipenv install
Clean any previous build output
pipenv run clean
Build the Package
pipenv run build
Check the Package is ready for publication
pipenv run check
Publish the Package
pipenv run publish
NOTE: You should not need to use this, publishing is handled by GitHub Actions CI
Run sample server locally
pipenv run local
Run sample server locally with DEBUG logging
pipenv run debug
Run stepCI testing of Flask API endpoints
pipenv run stepci
NOTE: This assumes that the server is running at localhost:8580. Use pipenv run local to start the server if needed
Metadata
Release files for stage0-py-utils 0.2.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stage0_py_utils-0.2.15.tar.gz | 29.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stage0_py_utils-0.2.15-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 70.2 kB
Release files / stage0_py_utils-0.2.15.tar.gz
| Download URL | stage0_py_utils-0.2.15.tar.gz |
|---|---|
| Size | 29.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa34fb9e777914c11d77cd1df462cbc0e7365e02faca9bd201995e28158f8651
|
|
BLAKE2b-256 checksum How to use checksums |
02ea59f56bbb46d851f07546bf4511422d53bfda2d1a144073397542af6f86eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / stage0_py_utils-0.2.15-py3-none-any.whl
| Download URL | stage0_py_utils-0.2.15-py3-none-any.whl |
|---|---|
| Size | 40.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23fb80f78dc3e009c8ac22c207f19be06ca3d37f97f536e851bdb84a7edc8a87
|
|
BLAKE2b-256 checksum How to use checksums |
ccd03dc4fa84fe613d8d099b208f10a544a2800096cb1836856ad5a2b5fa4410
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|