GithubHelp home page GithubHelp logo

eggbot-discord's Introduction

Code style: black pre-commit pre-commit.ci status Python package

{{Module Name}}

{{Module Description}}

Requirements

Internal Links


Local developer installation

It is strongly recommended to use a virtual environment (venv) when working with python projects. Leveraging a venv will ensure the installed dependency files will not impact other python projects or any system dependencies.

The following steps outline how to install this repo for local development. See the CONTRIBUTING.md file in the repo root for information on contributing to the repo.

Windows users: Depending on your python install you will use py in place of python to create the venv.

Linux/Mac users: Replace python, if needed, with the appropriate call to the desired version while creating the venv. (e.g. python3 or python3.8)

All users: Once inside an active venv all systems should allow the use of python for command line instructions. This will ensure you are using the venv's python and not the system level python.


Installation steps

Clone this repo and enter root directory of repo:

$ git clone https://github.com/{{ORG_NAME}}/{{REPO_NAME}}
$ cd {{REPO_NAME}}

Create the venv:

$ python -m venv venv

Activate the venv:

# Linux/Mac
$ . venv/bin/activate

# Windows
$ venv\Scripts\activate

The command prompt should now have a (venv) prefix on it. python will now call the version of the interpreter used to create the venv

Install editable library and development requirements:

# Update pip and tools
$ python -m pip install --upgrade pip

# Install editable version of library
$ python -m pip install --editable .[dev]

Install pre-commit (see below for details):

$ pre-commit install

Misc Steps

Run pre-commit on all files:

$ pre-commit run --all-files

Run tests:

$ tox [-r] [-e py3x]

Build dist:

$ python -m pip install --upgrade build

$ python -m build

To deactivate (exit) the venv:

$ deactivate

Note on flake8:

flake8 is included in the requirements-dev.txt of the project. However it disagrees with black, the formatter of choice, on max-line-length and two general linting errors. .pre-commit-config.yaml is already configured to ignore these. flake8 doesn't support pyproject.toml so be sure to add the following to the editor of choice as needed.

--ignore=W503,E203
--max-line-length=88

A framework for managing and maintaining multi-language pre-commit hooks.

This repo is setup with a .pre-commit-config.yaml with the expectation that any code submitted for review already passes all selected pre-commit checks. pre-commit is installed with the development requirements and runs seemlessly with git hooks.


Makefile

This repo has a Makefile with some quality of life scripts if the system supports make. Please note there are no checks for an active venv in the Makefile.

PHONY Description
init Update pip to newest version
install install the project
install-test install test requirements and project as editable install
install-dev install development/test requirements and project as editable install
upgrade-dev update all dependencies, regenerate requirements.txt
build-dist Build source distribution and wheel distribution
clean-artifacts Deletes python/mypy artifacts, cache, and pyc files
clean-tests Deletes tox, coverage, and pytest artifacts
clean-build Deletes build artifacts
clean-all Runs all clean scripts

eggbot-discord's People

Contributors

pre-commit-ci[bot] avatar preocts avatar

Watchers

 avatar  avatar

Forkers

rustyxlol

eggbot-discord's Issues

Moderation actions

  • update method
  • add member ID
  • deactivate method
  • get by member ID (active/all)

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.