Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .docker/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
api:
container_name: manwha-reader-api
Expand Down
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd6
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb

# install chromedriver
ENV CHROMEDRIVER_VERSION=130.0.6723.58
ENV CHROMEDRIVER_VERSION=133.0.6943.53
RUN wget https://storage.googleapis.com/chrome-for-testing-public/$CHROMEDRIVER_VERSION/linux64/chromedriver-linux64.zip \
&& unzip chromedriver-linux64.zip \
&& rm -rf chromedriver_linux64.zip \
&& rm -rf chromedriver-linux64.zip \
&& mv ./chromedriver-linux64/chromedriver $DEPLOY_PATH/chromedriver \
&& rm -rf chromedriver-linux64/ \
&& chmod +x $DEPLOY_PATH/chromedriver
Expand Down
158 changes: 30 additions & 128 deletions backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
description = ""
authors = ["christopherfrige <chrisfrige@gmail.com>"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.11"
Expand All @@ -21,14 +22,26 @@ webdriver-manager = "^4.0.1"
requests = "^2.31.0"

[tool.poetry.group.dev.dependencies]
black = "^23.11.0"
flake8 = "^6.1.0"
pytest = "^8.1.1"
ruff = "^0.9.5"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.black]
line-length = 99
target-version = ['py311']
[tool.ruff]
line-length = 100

[tool.ruff.lint.per-file-ignores]
"*.py" = ["E712"]
"__init__.py" = ["F403", "F401"] # https://www.flake8rules.com/rules/F403.html
"conftest.py" = ["F401"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"

[tool.ruff.lint]
extend-select = ["I"]
5 changes: 3 additions & 2 deletions backend/src/domain/entities/alternative_name.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from sqlalchemy import Column, ForeignKey, Integer, TIMESTAMP, Text
from src.domain.entities import Base
from sqlalchemy import TIMESTAMP, Column, ForeignKey, Integer, Text
from sqlalchemy.sql.functions import now

from src.domain.entities import Base


class AlternativeNameSchema:
__table_args__ = {"schema": "alternative_name"}
Expand Down
5 changes: 3 additions & 2 deletions backend/src/domain/entities/artist.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from sqlalchemy import Column, Integer, TIMESTAMP, Text
from src.domain.entities import Base
from sqlalchemy import TIMESTAMP, Column, Integer, Text
from sqlalchemy.sql.functions import now

from src.domain.entities import Base


class ArtistSchema:
__table_args__ = {"schema": "artist"}
Expand Down
5 changes: 3 additions & 2 deletions backend/src/domain/entities/author.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from sqlalchemy import Column, Integer, TIMESTAMP, Text
from src.domain.entities import Base
from sqlalchemy import TIMESTAMP, Column, Integer, Text
from sqlalchemy.sql.functions import now

from src.domain.entities import Base


class AuthorSchema:
__table_args__ = {"schema": "author"}
Expand Down
13 changes: 11 additions & 2 deletions backend/src/domain/entities/chapter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
from sqlalchemy import Boolean, Column, Integer, ForeignKey, TIMESTAMP, Float, Text
from src.domain.entities import Base
from sqlalchemy import (
TIMESTAMP,
Boolean,
Column,
Float,
ForeignKey,
Integer,
Text,
)
from sqlalchemy.sql.functions import now

from src.domain.entities import Base


class ChapterSchema:
__table_args__ = {"schema": "chapter"}
Expand Down
5 changes: 3 additions & 2 deletions backend/src/domain/entities/genre.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from sqlalchemy import Column, Integer, Text, TIMESTAMP
from src.domain.entities import Base
from sqlalchemy import TIMESTAMP, Column, Integer, Text
from sqlalchemy.sql.functions import now

from src.domain.entities import Base


class GenreSchema:
__table_args__ = {"schema": "genre"}
Expand Down
3 changes: 2 additions & 1 deletion backend/src/domain/entities/manwha.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from sqlalchemy import Column, Integer, Text, TIMESTAMP, ForeignKey
from sqlalchemy import TIMESTAMP, Column, ForeignKey, Integer, Text
from sqlalchemy.sql.functions import now

from src.domain.entities import Base


Expand Down
5 changes: 3 additions & 2 deletions backend/src/domain/entities/scraper.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from sqlalchemy import Boolean, Column, Integer, Text, TIMESTAMP, ForeignKey
from src.domain.entities import Base
from sqlalchemy import TIMESTAMP, Boolean, Column, ForeignKey, Integer, Text
from sqlalchemy.sql.functions import now

from src.domain.entities import Base


class ScraperSchema:
__table_args__ = {"schema": "scraper"}
Expand Down
12 changes: 4 additions & 8 deletions backend/src/domain/exceptions/client.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
from src.domain.exceptions import DefaultException


class BadRequestException(DefaultException):
...
class BadRequestException(DefaultException): ...


class NotFoundException(DefaultException):
...
class NotFoundException(DefaultException): ...


class NotAcceptableException(DefaultException):
...
class NotAcceptableException(DefaultException): ...


class ConflictException(DefaultException):
...
class ConflictException(DefaultException): ...
3 changes: 1 addition & 2 deletions backend/src/domain/exceptions/server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from src.domain.exceptions import DefaultException


class BadGatewayException(DefaultException):
...
class BadGatewayException(DefaultException): ...
Loading
Loading