Skip to content

Commit

Permalink
fix: try to make railway happy again
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee committed Oct 9, 2024
1 parent 3a29068 commit b22d757
Show file tree
Hide file tree
Showing 55 changed files with 94 additions and 94 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from sqlalchemy.exc import SAWarning

from __metadata__ import __project__
from src.__metadata__ import __project__

# -- Environmental Data ------------------------------------------------------
warnings.filterwarnings("ignore", category=SAWarning)
Expand Down
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from rich import get_console
from rich.traceback import install as rich_tracebacks

from __metadata__ import __version__
from src.__metadata__ import __version__
from src import app, byte, cli, server, utils

__all__ = (
Expand Down
6 changes: 3 additions & 3 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def create_app() -> Litestar:
from litestar import Litestar
from pydantic import SecretStr

from server import domain
from server.lib import (
from src.server import domain
from src.server.lib import (
cors,
db,
exceptions,
Expand All @@ -30,7 +30,7 @@ def create_app() -> Litestar:
static_files,
template,
)
from server.lib.dependencies import create_collection_dependencies
from src.server.lib.dependencies import create_collection_dependencies

dependencies = create_collection_dependencies()

Expand Down
4 changes: 2 additions & 2 deletions src/byte/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Byte Bot Bot."""
from __future__ import annotations

from byte import bot, lib
from byte.lib.log import setup_logging
from src.byte import bot, lib
from src.byte.lib.log import setup_logging

__all__ = ["bot", "lib"]

Expand Down
4 changes: 2 additions & 2 deletions src/byte/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from discord.ext.commands import Bot, CommandError, Context, ExtensionAlreadyLoaded
from dotenv import load_dotenv

from byte.lib import settings
from byte.lib.log import get_logger
from src.byte.lib import settings
from src.byte.lib.log import get_logger

__all__ = [
"Byte",
Expand Down
2 changes: 1 addition & 1 deletion src/byte/lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Byte library module."""

from byte.lib import common, log, settings, utils
from src.byte.lib import common, log, settings, utils

__all__ = [
"settings",
Expand Down
2 changes: 1 addition & 1 deletion src/byte/lib/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. todo:: temporary, these are not multi-guild friendly.
"""

from byte.lib.common import assets, colors, guilds, links
from src.byte.lib.common import assets, colors, guilds, links

__all__ = (
"assets",
Expand Down
2 changes: 1 addition & 1 deletion src/byte/lib/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from rich.logging import RichHandler # noqa: F401
from rich.traceback import install

from byte.lib import settings
from src.byte.lib import settings

__all__ = [
"setup_logging",
Expand Down
6 changes: 3 additions & 3 deletions src/byte/lib/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from pydantic import ValidationError, field_validator
from pydantic_settings import BaseSettings, SettingsConfigDict

import utils
from __metadata__ import __version__ as version
from src import utils
from src.__metadata__ import __version__ as version

__all__ = [
"discord",
Expand All @@ -25,7 +25,7 @@

DEFAULT_MODULE_NAME: str = "src"
BASE_DIR: Final = utils.module_to_os_path(DEFAULT_MODULE_NAME)
PLUGINS_DIR: Final = utils.module_to_os_path("byte.plugins")
PLUGINS_DIR: Final = utils.module_to_os_path("src.byte.plugins")


class DiscordSettings(BaseSettings):
Expand Down
4 changes: 2 additions & 2 deletions src/byte/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from discord.ext import commands
from ruff.__main__ import find_ruff_bin # type: ignore[import-untyped]

from byte.lib import settings
from byte.lib.common.links import pastebin
from src.byte.lib import settings
from src.byte.lib.common.links import pastebin

if TYPE_CHECKING:
from collections.abc import Iterable
Expand Down
2 changes: 1 addition & 1 deletion src/byte/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Pluggable modules for Byte."""

from byte.plugins import admin, custom, events, forums, general, testing
from src.byte.plugins import admin, custom, events, forums, general, testing

__all__ = [
"custom",
Expand Down
2 changes: 1 addition & 1 deletion src/byte/plugins/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from discord.ext import commands
from discord.ext.commands import Bot, Cog, Context, command, group, is_owner

from byte.lib.utils import is_byte_dev
from src.byte.lib.utils import is_byte_dev

__all__ = ("AdminCommands", "setup")

Expand Down
10 changes: 5 additions & 5 deletions src/byte/plugins/astral.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
from discord.app_commands import command as app_command
from discord.ext.commands import Bot, Cog

from byte.lib.common.assets import ruff_logo
from byte.lib.common.colors import astral_purple, astral_yellow
from byte.lib.utils import chunk_sequence, format_ruff_rule, query_all_ruff_rules
from byte.views.astral import RuffView
from src.byte.lib.common.assets import ruff_logo
from src.byte.lib.common.colors import astral_purple, astral_yellow
from src.byte.lib.utils import chunk_sequence, format_ruff_rule, query_all_ruff_rules
from src.byte.views.astral import RuffView

if TYPE_CHECKING:
from byte.lib.utils import RuffRule
from src.byte.lib.utils import RuffRule

__all__ = ("Astral", "setup")

Expand Down
2 changes: 1 addition & 1 deletion src/byte/plugins/custom/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Custom Pluggable modules for Byte."""

from byte.plugins.custom import litestar
from src.byte.plugins.custom import litestar

__all__ = [
"litestar",
Expand Down
4 changes: 2 additions & 2 deletions src/byte/plugins/custom/litestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from discord.utils import MISSING
from httpx import codes

from byte.lib.utils import is_byte_dev, mention_role, mention_user
from server.domain.github.helpers import github_client
from src.byte.lib.utils import is_byte_dev, mention_role, mention_user
from src.server.domain.github.helpers import github_client

__all__ = ("LitestarCommands", "setup")

Expand Down
8 changes: 4 additions & 4 deletions src/byte/plugins/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from discord import Embed
from discord.ext.commands import Bot, Cog

from byte.lib.common.assets import litestar_logo_yellow
from byte.lib.common.links import mcve
from byte.lib.utils import linker
from byte.views.forums import HelpThreadView
from src.byte.lib.common.assets import litestar_logo_yellow
from src.byte.lib.common.links import mcve
from src.byte.lib.utils import linker
from src.byte.views.forums import HelpThreadView

__all__ = ("Events", "setup")

Expand Down
6 changes: 3 additions & 3 deletions src/byte/plugins/forums.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from discord.app_commands import command as app_command
from discord.ext.commands import Bot, Cog, Context, command, hybrid_command

from byte.lib.common.assets import litestar_logo_yellow
from byte.lib.common.links import mcve
from byte.lib.utils import linker
from src.byte.lib.common.assets import litestar_logo_yellow
from src.byte.lib.common.links import mcve
from src.byte.lib.utils import linker

__all__ = ("ForumCommands", "setup")

Expand Down
6 changes: 3 additions & 3 deletions src/byte/plugins/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from discord.app_commands import command as app_command
from discord.ext.commands import Bot, Cog

from byte.lib.common.assets import litestar_logo_yellow
from byte.lib.common.links import markdown_guide, pastebin
from byte.lib.utils import linker
from src.byte.lib.common.assets import litestar_logo_yellow
from src.byte.lib.common.links import markdown_guide, pastebin
from src.byte.lib.utils import linker

__all__ = ("GeneralCommands", "setup")

Expand Down
10 changes: 5 additions & 5 deletions src/byte/plugins/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from discord.app_commands import command as app_command
from discord.ext.commands import Bot, Cog

from byte.lib.common.assets import python_logo
from byte.lib.common.colors import python_blue, python_yellow
from byte.lib.utils import PEP, query_all_peps
from byte.views.embed import ExtendedEmbed, Field
from byte.views.python import PEPView
from src.byte.lib.common.assets import python_logo
from src.byte.lib.common.colors import python_blue, python_yellow
from src.byte.lib.utils import PEP, query_all_peps
from src.byte.views.embed import ExtendedEmbed, Field
from src.byte.views.python import PEPView

__all__ = ("Python", "setup")

Expand Down
2 changes: 1 addition & 1 deletion src/byte/views/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Views for the bot."""

from byte.views import forums
from src.byte.views import forums

__all__ = [
"forums",
Expand Down
4 changes: 2 additions & 2 deletions src/byte/views/astral.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Discord UI views used in Astral commands."""
from __future__ import annotations

from byte.lib.log import get_logger
from byte.views.abstract_views import BaseEmbedView
from src.byte.lib.log import get_logger
from src.byte.views.abstract_views import BaseEmbedView

__all__ = ("RuffView",)

Expand Down
4 changes: 2 additions & 2 deletions src/byte/views/forums.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from discord.ext.commands import Bot
from discord.ui import Button, View, button

from byte.lib.common.links import litestar_issues
from byte.lib.log import get_logger
from src.byte.lib.common.links import litestar_issues
from src.byte.lib.log import get_logger

__all__ = ("HelpThreadView",)

Expand Down
4 changes: 2 additions & 2 deletions src/byte/views/python.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Discord UI views used in Python commands."""
from __future__ import annotations

from byte.lib.log import get_logger
from byte.views.abstract_views import BaseEmbedView
from src.byte.lib.log import get_logger
from src.byte.views.abstract_views import BaseEmbedView

__all__ = ("PEPView",)

Expand Down
2 changes: 1 addition & 1 deletion src/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import click
from rich import get_console

from server.lib import log, settings
from src.server.lib import log, settings

__all__ = [
"run_bot",
Expand Down
2 changes: 1 addition & 1 deletion src/server/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Byte Bot Server."""
from __future__ import annotations

from server import domain, lib
from src.server import domain, lib

__all__ = (
"domain",
Expand Down
2 changes: 1 addition & 1 deletion src/server/domain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from litestar.contrib.repository.filters import FilterTypes
from litestar.pagination import OffsetPagination

from server.domain import db, guilds, system, urls, web
from src.server.domain import db, guilds, system, urls, web

if TYPE_CHECKING:
from collections.abc import Mapping
Expand Down
2 changes: 1 addition & 1 deletion src/server/domain/db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Domain for database models."""
from server.domain.db import models
from src.server.domain.db import models

__all__ = ["models"]
2 changes: 1 addition & 1 deletion src/server/domain/github/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""GitHub domain."""

from server.domain.github import helpers
from src.server.domain.github import helpers

__all__ = ("helpers",)
2 changes: 1 addition & 1 deletion src/server/domain/github/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from githubkit import AppInstallationAuthStrategy, GitHub # type: ignore[reportMissingImports]

from server.lib import settings
from src.server.lib import settings

__all__ = ("github_client",)

Expand Down
2 changes: 1 addition & 1 deletion src/server/domain/guilds/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Guilds domain."""

from server.domain.guilds import controllers
from src.server.domain.guilds import controllers

__all__ = ("controllers",)
8 changes: 4 additions & 4 deletions src/server/domain/guilds/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from litestar.di import Provide
from litestar.params import Dependency, Parameter

from server.domain import urls
from server.domain.guilds.dependencies import provides_guilds_service
from server.domain.guilds.schemas import GuildSchema
from server.domain.guilds.services import GuildsService # noqa: TCH001
from src.server.domain import urls
from src.server.domain.guilds.dependencies import provides_guilds_service
from src.server.domain.guilds.schemas import GuildSchema
from src.server.domain.guilds.services import GuildsService # noqa: TCH001

if TYPE_CHECKING:
from advanced_alchemy.filters import FilterTypes
Expand Down
6 changes: 3 additions & 3 deletions src/server/domain/guilds/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

from sqlalchemy import select

from server.domain.db.models import Guild
from server.domain.guilds.services import GuildsService
from server.lib import log
from src.server.domain.db.models import Guild
from src.server.domain.guilds.services import GuildsService
from src.server.lib import log

if TYPE_CHECKING:
from collections.abc import AsyncGenerator
Expand Down
2 changes: 1 addition & 1 deletion src/server/domain/guilds/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pydantic import Field

from server.lib.schema import CamelizedBaseModel
from src.server.lib.schema import CamelizedBaseModel

__all__ = ("GuildCreate", "GuildSchema", "GuildUpdate")

Expand Down
8 changes: 4 additions & 4 deletions src/server/domain/guilds/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

from typing import Any

from server.domain.db.models import Guild
from server.lib import log
from server.lib.repository import SQLAlchemyAsyncSlugRepository
from server.lib.service import SQLAlchemyAsyncRepositoryService
from src.server.domain.db.models import Guild
from src.server.lib import log
from src.server.lib.repository import SQLAlchemyAsyncSlugRepository
from src.server.lib.service import SQLAlchemyAsyncRepositoryService

__all__ = ("GuildsRepository", "GuildsService")

Expand Down
2 changes: 1 addition & 1 deletion src/server/domain/system/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""System domain."""
from __future__ import annotations

from server.domain.system import controllers
from src.server.domain.system import controllers

__all__ = [
"controllers",
Expand Down
2 changes: 1 addition & 1 deletion src/server/domain/system/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""System domain controllers."""
from __future__ import annotations

from server.domain.system.controllers import system
from src.server.domain.system.controllers import system

__all__ = [
"system",
Expand Down
Loading

0 comments on commit b22d757

Please sign in to comment.