Skip to content

Commit

Permalink
Release 0.2 (#27)
Browse files Browse the repository at this point in the history
* add swagger static

* refactor Azamat's docker-compose.yaml

* add static for swagger

* add API event_black for searching without creds in modeus.py

* add search Modeus API
Complete #6 tasks

* Fix bug with empty list

* add get course, rewrite from requests to httpx

* mypy fixes

* add route get calendar #20

* rewrite from black sheep to fast api, add Netology routes.

* delete black-sheep

* add routes for modeus

* remove sg_reg_date from NetologyCookies

* linter fixes

* Add design pages home and login, redirect from home to login

* Fix Azamat's docker-compose.yaml

* rewrite exceptions

* Fastapi init (#22)

* add swagger static

* refactor Azamat's docker-compose.yaml

* add static for swagger

* add API event_black for searching without creds in modeus.py

* add search Modeus API
Complete #6 tasks

* Fix bug with empty list

* add get course, rewrite from requests to httpx

* mypy fixes

* add route get calendar #20

* rewrite from black sheep to fast api, add Netology routes.

* delete black-sheep

* add routes for modeus

* remove sg_reg_date from NetologyCookies

* linter fixes

* Fix Azamat's docker-compose.yaml

* rewrite exceptions

* fix import error

* Add validator for time_min, time_max

* Refactor validators

* Mypy refactor

* Fix review

* Fastapi init (#21)

* Update README.md

* rewrite from black sheep to fast api, add Netology routes.

* delete black-sheep

* add routes for modeus

* remove sg_reg_date from NetologyCookies

* linter fixes

* Add design pages home and login, redirect from home to login

* Fix Azamat's docker-compose.yaml

* rewrite exceptions

* fix import error

* Add validator for time_min, time_max

* Refactor validators

* Mypy refactor

* Fix review

---------

Co-authored-by: KytakBR <gusmanov2006@gmail.com>

* Fix cors problem

* delete reload setting

* Co-authored-by: Ivan <depocoder@users.noreply.github.com>

* Add redis cache for JWT tokens

* Refactor query parameters

* redis cache with decorator

* Co-authored-by: Gregory <MrGosling@users.noreply.github.com>
* Co-authored-by: Ivan <depocoder@users.noreply.github.com>

* fix some issues

* Fix merge conflict

---------

Co-authored-by: KytakBR <gusmanov2006@gmail.com>
  • Loading branch information
depocoder and KytakBR authored Sep 28, 2024
1 parent c519f14 commit f4e996c
Show file tree
Hide file tree
Showing 67 changed files with 4,420 additions and 2,141 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ This product can replace Modeus calendar & Netology calendar.

### How to run?
```
docker-compose up
docker compose up
```

2 changes: 1 addition & 1 deletion backend/.env.dist
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MODEUS_USERNAME=test_username
MODEUS_PASSWORD=test_password
MODEUS_PASSWORD=test_password
25 changes: 17 additions & 8 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
FROM python:3.10-slim-bullseye
FROM python:3.11.4-slim-bullseye as prod

RUN pip install poetry==1.8.3

WORKDIR /app
COPY poetry.lock pyproject.toml /app
RUN pip install poetry==1.8.2

RUN POETRY_VIRTUALENVS_CREATE=false poetry install
COPY . /app
# Configuring poetry
RUN poetry config virtualenvs.create false
RUN poetry config cache-dir /tmp/poetry_cache

ENTRYPOINT ["python3"]
CMD ["prod.py"]
# Copying requirements of a project
COPY pyproject.toml poetry.lock /app/src/
WORKDIR /app/src

# Installing requirements
RUN --mount=type=cache,target=/tmp/poetry_cache poetry install --only main

# Copying actuall application
COPY . /app/src/
RUN --mount=type=cache,target=/tmp/poetry_cache poetry install

CMD ["/usr/local/bin/python", "-m", "yet_another_calendar"]
9 changes: 4 additions & 5 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# CalendarIT
Project template for [BlackSheep](https://github.com/Neoteroi/BlackSheep)
web framework to start Web APIs.
# YetAnotherCalendar
This project is created to replace Modeus/Netology calendars

## Getting started

Expand All @@ -15,7 +14,7 @@ curl -sSL https://install.python-poetry.org | python3 -

poetry install

poetry run python dev.py
poetry run python -m yet_another_calendar
```

### Running with Docker Compose
Expand All @@ -30,4 +29,4 @@ If code was changed, rebuild images:
docker compose up --build -d
```

### Open [OpenAPI](http://localhost:44777/docs)
### Open [OpenAPI](http://localhost:8000/api/docs)
Empty file removed backend/app/__init__.py
Empty file.
13 changes: 0 additions & 13 deletions backend/app/auth.py

This file was deleted.

43 changes: 0 additions & 43 deletions backend/app/binders.py

This file was deleted.

Empty file.
34 changes: 0 additions & 34 deletions backend/app/controllers/examples.py

This file was deleted.

95 changes: 0 additions & 95 deletions backend/app/controllers/modeus.py

This file was deleted.

45 changes: 0 additions & 45 deletions backend/app/controllers/netology.py

This file was deleted.

35 changes: 0 additions & 35 deletions backend/app/docs/__init__.py

This file was deleted.

56 changes: 0 additions & 56 deletions backend/app/docs/binders.py

This file was deleted.

Loading

0 comments on commit f4e996c

Please sign in to comment.