Giter Site home page Giter Site logo

pythonista-bot's Introduction

Pythonista-Bot

Primary Discord Bot for the Pythonista Guild!

Setup Requirements

  • Python 3.11+
  • PostgreSQL 15+

You must make a valid copy of the config file named config.toml, fill in the blanks, and then...

Optional

  • Docker / Snekbox capability This will allow for public evals. To disable the functionality entirely, ensure the [SNEKBOX] key is not present in the config file.

Running the bot

In the future we'll provide a systemd unit, pm2 config and maybe a Dockerfile for running the bot, but for now you can use your ideal terminal and:-

python -O launcher.py

(we run with python -O because we use assert for type checking purposes).

Docker

We also provide both Dockerfile and docker-compose.yml files for running the bot in Docker. The default compose file assumes you want snekbox too, however you can comment out or remove that entire key if this is not the case.

Make a copy of .template.env and name it to .env, edit the values as you see fit (the defaults will work too, and be okay so long as you don't expose this database to the internet). Then a simple docker compose up will bring your bot up!

NOTE: If you want to enable the snekbox service for sandboxed open eval, do:

docker compose --profile snekbox up

which will enable all services and snekbox.

(or docker-compose if you are not on the latest versions...)

Notes

This also means that it will use internal docker networking to resolve the database and snekbox names. By default these will be database and snekbox, but these will be the service names in docker-compose.yml if you change them. Please keep this in mind when editing your config file.

We also provide a file for ignoring git blame references. You can enable this with:-

git config blame.ignoreRevsFile .git-blame-ignore-revs

Support

As this bot is not really designed for use outside of our Guild, support provided will be very limited. But if you wish to chat to us, feel free to open a discussion, an issue or even a PR (for fixes and whatnot)!

Or chat to us on discord:-

pythonista-bot's People

Contributors

abstractumbra avatar chillymosh avatar duued avatar evieepy avatar iamtomahawkx avatar lostluma avatar ncplayz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pythonista-bot's Issues

GitHub Integration

Add commands to be able to manage and retrieve information about our orgs github repositories.

Main feature wanted would be something for quick previewing issues:
##50 in chat would show issue #50 of the bot repo
wave##50 would show issue #50 of wavelink
etc

There's a chance quite a few different features could be beneficial under this group though, and some fun stuff might be able to be played with using the Github GraphQL.

Sandboxed Open Eval

The bot will need a publicly usable command that can run code in a contained, safe environment.

Umbra had proposed to use Python Discord's snekbox for running Python.

There was discussions on possibly adding the ability to also run C/C++ code in their own respective contained environments also.

Database Management

We need to decide on the appropriate database tech, libs and form of interaction such as ORM / plain SQL.

Core Functionality

A list of core-functionality the bot will need to function and that aren't put within an extension.

  • Extension/cog handling
  • Error handling

Git commit guidelines

This repo will need Git commit guide lines, along with some python formatting guidelines.

I imagine this would be best in a .github folder with a CONTRIBUTING.MD

Automatic Deployment and Testing

The project is to have automated deployment, but as we don't currently have the appropriate server setup for it, I'll have to work on getting that done at the same time as this.

Overall, PRs and main branch will be given some Github Actions treatment, with lint checks being done for both, and automatic docker image build and publishing to the Github Container Registery for the main branch.

The server will receive an event once a release is published, and it will pull the new image and deploy it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.