Compare commits

..

5 Commits

Author SHA1 Message Date
dependabot[bot]
5fd8d7a217
Bump sentry-sdk from 1.35.0 to 1.38.0
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 1.35.0 to 1.38.0.
- [Release notes](https://github.com/getsentry/sentry-python/releases)
- [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-python/compare/1.35.0...1.38.0)

---
updated-dependencies:
- dependency-name: sentry-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-06 23:31:19 +00:00
cdec1efdef removed spacy 2023-12-07 02:24:25 +03:00
4dec3867ca minor fixes and updates, removed spacy 2023-12-07 02:22:37 +03:00
773fd2830e updated local compose 2023-11-29 17:36:54 +03:00
1644fa5403 updated local compose 2023-11-29 17:36:33 +03:00
11 changed files with 16 additions and 1314 deletions

View File

@ -12,7 +12,6 @@ https://git.akarpov.ru/sanspie/akarpov
### installation
```shell
$ poetry install & poetry shell
$ ./spacy_setup.sh
$ python3 manage.py migrate
```

View File

@ -10,8 +10,8 @@ def extract_file_text(file: str) -> str:
try:
rawdata = open(file, "rb").read()
enc = chardet.detect(rawdata)
with open(file, encoding=enc["encoding"]) as file:
text = file.read()
with open(file, encoding=enc["encoding"]) as f:
text = f.read()
except Exception:
return ""

View File

@ -1,7 +1,7 @@
from config.celery_app import app
def get_scheduled_tasks_name() -> [str]:
def get_scheduled_tasks_name() -> list[str]:
i = app.control.inspect()
t = i.scheduled()
all_tasks = []

View File

@ -52,10 +52,6 @@ COPY ./compose/local/django/start /start
RUN sed -i 's/\r$//g' /start
RUN chmod +x /start
COPY ./compose/local/django/spacy_setup /spacy_setup
RUN sed -i 's/\r$//g' /spacy_setup
RUN chmod +x /spacy_setup
COPY ./compose/local/django/start-redirect /start-redirect
RUN sed -i 's/\r$//g' /start-redirect
RUN chmod +x /start-redirect

View File

@ -1,3 +0,0 @@
python -m spacy download en_core_web_lg
python -m spacy download xx_sent_ud_sm
python -m spacy download ru_core_news_lg

View File

@ -7,4 +7,4 @@ set -o nounset
python manage.py migrate auth
python manage.py migrate
python manage.py runserver_plus 0.0.0.0:8000
daphne config.asgi:application --port 8000 --bind 0.0.0.0

View File

@ -4,8 +4,14 @@
from django.conf import settings
from django.core.asgi import get_asgi_application
from akarpov.common.channels import HeaderAuthMiddleware
from config import routing
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
# Initialize Django ASGI application early to ensure the AppRegistry
# is populated before importing code that may import ORM models.
django_asgi_app = get_asgi_application()
from akarpov.common.channels import HeaderAuthMiddleware # noqa
from config import routing # noqa
if settings.DEBUG:
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
@ -14,7 +20,7 @@
application = ProtocolTypeRouter(
{
"http": get_asgi_application(),
"http": django_asgi_app,
"websocket": HeaderAuthMiddleware(URLRouter(routing.websocket_urlpatterns)),
}
)

View File

@ -19,6 +19,7 @@ services:
- mailhog
- elasticsearch
volumes:
- /var/www/media:/app/akarpov/media
- .:/app:z
env_file:
- ./.envs/.local/.django
@ -44,7 +45,7 @@ services:
- ./.envs/.local/.django
- ./.envs/.local/.postgres
ports:
- "3000:3000"
- "3025:3000"
command: /start-redirect
postgres:

1297
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -95,8 +95,6 @@ yt-dlp = "^2023.7.6"
pytube = "^15.0.0"
urllib3 = ">=1.26"
requests = ">=2.25"
spacy = {extras = ["lookups"], version = "^3.6.1"}
spacy-transformers = "^1.2.5"
extract-msg = "0.28.7"
pytest-factoryboy = "2.3.1"
pytest-xdist = "^3.3.1"