1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-02 16:43:12 +00:00
tux/README.md
2024-03-24 16:22:14 -04:00

5.9 KiB

Tux

Banner

About

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec euismod, nisl eget ultricies ultricies, nunc nisl ultricies nunc, quis aliquam nisl nunc eu nisl. Donec euismod, nisl eget ultricies ultricies, nunc nisl ultricies nunc, quis aliquam nisl nunc eu nisl. Donec euismod, nisl eget ultricies ultricies, nunc nisl ultricies nunc, quis aliquam nisl nunc eu nisl. Donec euismod, nisl eget ultricies ultricies, nunc nisl ultricies nunc, quis aliquam nisl nunc eu nisl. Donec euismod, nisl eget ultricies ultricies, nunc nisl ultricies nunc, quis aliquam nisl nunc eu nisl.

Requirements

  • Python 3.11
  • Poetry
  • Docker (optional)

Development Setup

Docker Setup

  • Clone the repository
  • Create a .env file based on the .env.example file
  • Run docker-compose up

Testing

  • Run poetry run pytest to run all tests
  • Run poetry run pytest tests/<test_file> to run a specific test file

Linting

  • Run poetry run pre-commit run --all-files to run all pre-commit hooks
  • Run poetry run pre-commit run <hook_id> to run a specific pre-commit hook

Architecture

Tux is built using the discord.py library. It is a Python wrapper for the Discord API. The application is built using the Command Pattern and Event Driven Architecture. The application is split into two main parts: commands and events. Commands are used to execute actions in the application, while events are used to react to actions in the application. The application is also split into modules, which are used to group related commands and events together. The application is also split into cogs, which are used to group related modules together. The application is also split into utils, which are used to group related utility functions together.

Key Files

Project Structure

tux/
├─ .git/                                   # Git source repository
├─ .venv/                                  # Python virtual environment
├─ config/                                 # Configuration files directory
│  ├─ settings.ini                         # App configuration settings
├─ docs/                                   # Documentation files directory
│  ├─ DOCS.md                              # Main documentation file
├─ logs/                                   # Log files directory
│  ├─ application.log                      # Application's log file
├─ scripts/                                # Scripts directory
│  ├─ seed_db.sh                           # Script for seeding the database
├─ tux/                                    # Main application directory
│  ├─ commands/                            # Directory for command files
│  │  ├─ quick_ban.py                      # File for the 'quick ban' command
│  ├─ events/                              # Directory for event files
│  │  ├─ on_message.py                     # File for the 'on message' event
│  ├─ utils/                               # Utility files directory
│  │  ├─ completions.py                    # Helper file for autocompletions
│  │  ├─ db.py                             # Database helper file
│  │  ├─ permissions.py                    # File to manage user permissions
│  │  ├─ tux_logger.py                     # Application's logger file
│  ├─ main.py                              # Main execution file
│  ├─ cog_loader.py                        # File for loading cogs/modules
├─ tests/                                  # Test files directory
│  ├─ commands/                            # Directory for command tests
│  │  ├─ test_quick_ban.py                 # Tests for the 'quick ban' command
│  ├─ events/                              # Directory for event tests
│  │  ├─ test_on_message.py                # Tests for the 'on message' event
│  ├─ utils/                               # Directory for utils tests
│  │  ├─ test_permissions.py               # Tests for user permissions file
├─ .env                                    # Environment variables
├─ .env.example                            # Example for setting up your own .env
├─ .gitignore                              # Specifies files to ignore in git
├─ .pre-commit-config.yaml                 # Configuration for pre-commit hooks
├─ docker-compose.yml                      # Docker compose for containerization
├─ LICENSE.md                              # Application's license
├─ Makefile                                # Make file for building the app
├─ poetry.lock                             # Lock file created by Poetry, ensuring consistent package versions
├─ pyproject.toml                          # Python project config file (used by poetry)
├─ README.md                               # Readme file with project info and setup guide
└─ requirements.txt                        # List of Python dependencies

License

This project is licensed under the terms of the The Unlicense license. See the LICENSE file for details.