pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/MylesLandais/Workspace

fd3be8.css" /> GitHub - MylesLandais/Workspace · GitHub
Skip to content

MylesLandais/Workspace

Repository files navigation

contributing

  • See deployment.md for production setup and infrastructure requirements.

prerequisites

  • NixOS or nix package manager
  • Docker with compose plugin
  • uv (provided by shell.nix)

getting started

Enter the nix shell to get all dependencies:

NIXPKGS_ALLOW_UNFREE=1 nix-shell shell.nix

The shell hook checks that required infrastructure (Postgres, Lavalink) is healthy and warns if anything is down.

infrastructure

Shared services live under infra/. Each has its own docker-compose.yml.

postgres

Shared PostgreSQL 16 instance used by Maya and other services.

cd infra/postgres && docker compose up -d

Connection: postgresql://maya:maya@localhost:5432/maya

Async driver (Python): postgresql+asyncpg://maya:maya@localhost:5432/maya

Tables are auto-created by SQLAlchemy init_db() on first run.

lavalink

Audio streaming server for the Discord bot.

cd infra/lavalink && docker compose up -d

Endpoint: localhost:2333, password: youshallnotpass

comfyui

Image generation. See infra/comfyui/ for setup details.

project structure

infra/           shared infrastructure (postgres, lavalink, comfyui)
lib/             shared libraries (db, otel, sources, comfy, etc.)
src/             applications (maya, discord-bot, tts, feed, crawlers)
tests/           mirrors lib/ and src/
notebooks/       jupyter notebooks
data/            inputs, outputs, datasets
  • lib/ = shared code, src/ = applications
  • One pyproject.toml at root manages the uv workspace
  • Members declared in [tool.uv.workspace]

running maya

# start dependencies
cd infra/postgres && docker compose up -d
cd infra/lavalink && docker compose up -d

# run the bot
cd src/maya && uv run python -m bot.main

Configuration is in src/maya/.env.

database

Maya uses PostgreSQL via SQLAlchemy async. Models are in src/maya/db/models.py.

To record a play event manually (bot offline):

cd src/maya && uv run python -m scripts.record_play URL USER [TITLE] [ARTIST]

To inspect data directly:

docker exec postgres psql -U maya -c "SELECT * FROM play_events ORDER BY played_at DESC LIMIT 10;"

testing

# all tests
uv run pytest tests/ -v --tb=short

# with coverage
uv run pytest tests/ --cov=lib --cov=src --cov-report=term-missing

# maya smoke tests (requires infra running)
cd src/maya && uv run pytest tests/ -v

Coverage minimum: 33%.

conventions

  • Conventional Commits (feat, fix, refactor, test, chore, etc.)
  • No emojis in commits or code
  • Python: snake_case, type hints where useful
  • Use uv add / uv remove for dependencies
  • Use docker compose (space, not hyphen)
  • Prefer editing existing files over creating new ones

About

No description, website, or topics provided.

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy