[V3 Everything] Package bot and write setup scripts (#964)

Ya'll are gonna hate me.

* Initial modifications

* Add initial setup.py

* working setup py help

* Modify setup file to package stuff

* Move a bunch of shit and fix imports

* Fix or skip tests

* Must add init files for find_packages to work

* Move main to scripts folder and rename

* Add shebangs

* Copy over translation files

* WORKING PIP INSTALL

* add dependency information

* Hardcoded version for now, will need to figure out a better way to do this

* OKAY ITS FINALLY FUCKING WORKING

* Add this guy

* Fix stuff

* Change readme to rst

* Remove double sentry opt in

* Oopsie

* Fix this thing

* Aaaand fix test

* Aaaand fix test

* Fix core cog importing and default cog install path

* Adjust readme

* change instance name from optional to required

* Ayyy let's do more dependency injection
This commit is contained in:
Will
2017-09-08 23:14:32 -04:00
committed by GitHub
parent 6b1fc786ee
commit d69fd63da7
85 changed files with 451 additions and 255 deletions

View File

@@ -1,9 +1,10 @@
from collections import namedtuple
from raven.versioning import fetch_git_sha
from pathlib import Path
import pytest
from cogs.downloader.repo_manager import RepoManager, Repo
from pathlib import Path
from raven.versioning import fetch_git_sha
from redbot.cogs.downloader.repo_manager import RepoManager, Repo
async def fake_run(*args, **kwargs):
@@ -37,8 +38,6 @@ def repo_manager(tmpdir_factory, config):
@pytest.fixture
def repo(tmpdir):
from cogs.downloader.repo_manager import Repo
repo_folder = Path(str(tmpdir)) / 'repos' / 'squid'
repo_folder.mkdir(parents=True, exist_ok=True)
@@ -69,8 +68,6 @@ def bot_repo(event_loop):
def test_existing_git_repo(tmpdir):
from cogs.downloader.repo_manager import Repo
repo_folder = Path(str(tmpdir)) / 'repos' / 'squid' / '.git'
repo_folder.mkdir(parents=True, exist_ok=True)
@@ -103,7 +100,7 @@ async def test_clone_repo(repo_norun, capsys):
@pytest.mark.asyncio
async def test_add_repo(monkeypatch, repo_manager):
monkeypatch.setattr("cogs.downloader.repo_manager.Repo._run",
monkeypatch.setattr("redbot.cogs.downloader.repo_manager.Repo._run",
fake_run_noprint)
squid = await repo_manager.add_repo(

View File

@@ -1,9 +1,10 @@
import pytest
import json
from cogs.downloader.installable import Installable, InstallableType
from pathlib import Path
import pytest
from redbot.cogs.downloader.installable import Installable, InstallableType
INFO_JSON = {
"author": (
"tekulvw",