Files
bpe-jigsaw/design_docs/DESIGN.md
2025-10-28 21:56:46 -04:00

3.5 KiB

Prepping Project

UV project management

# I want to use uv for managing the python project
cd <directory where I want the project folder>
uv init -v --author-from git --package --vcs git --build-backend uv --color always bpe-jigsaw
cd bpe-jigsaw
uv add pip    # To avoid confusion of using the system pip
uv add fastapi httpx pycord cc-ampapi
uv add --dev pytest pytest-cov

# Applying my preferences
sed -Ei 's/"bpe_jigsaw:main"/"bpe_jigsaw.cli:main"/' pyproject.toml
mkdir -p src/bpe_jigsaw
echo -e "def main() -> None:\n    print('TODO')\n\nif __name__ == \"__main__\":\n    main()" > src/bpe_jigsaw/cli.py
echo -e "from importlib.metadata import version\n" > src/bpe_jigsaw/__init__.py
echo -e "try:\n    __version__ = version(__package__ or __name__)" >> src/bpe_jigsaw/__init__.py
echo -e "exception Exception:\n    __version__ = \"0.0.0\"" >> src/bpe_jigsaw/__init__.py
echo -e "from bpe_jigsaw.cli import main\n\nif __name__ == '__main__':\n    main()" > src/bpe_jigsaw/__main__.py
mkdir -p tests
curl -L 'https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Python.gitignore' -o .gitignore
echo '.secrets' >> .gitignore

# For my vscode usage
mkdir -p ./.vscode
echo -e "{\n  \"python.testing.pytestArgs\": [\n    \"tests\"\n  ],\n  \"python.testing.unittestEnabled\": false,\n  \"python.testing.pytestEnabled\": true\n}" > ./.vscode/settings.json

git add -A .
git commit -m "Initial Commit"
git remote add origin https://gitea.wolfeden.online/Doc/bpe-jigsaw.git
git push -u origin master

Goals for the program

Initial logical structure

  • Core Functions
  • Web page interface
  • Discord bot interface
  • Scheduled tasks

Core

  • Import in basic settings file. Toml? Or YAML?

Amp Interaction

  • Authenticate
  • List instances

Web page interface

  • Display a landing page

Discord bot interface

  • Connect to Discord

Scheduled tasks

Possible future modules

HTML rendering

  • Jinja. Can do scripting type templating, or just plain templating.

External Refs

LLM Session for info gathering