Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal setup for development #52

Merged
merged 98 commits into from
Aug 22, 2024
Merged

Minimal setup for development #52

merged 98 commits into from
Aug 22, 2024

Conversation

Spotika
Copy link
Member

@Spotika Spotika commented Aug 6, 2024

  • General: removed old functiional, going to develop from here. New response format

  • DevOps-Infra: static linters, integration tests written in TS, workflows for them

  • Code-Infra: improved folders architecture: (models + schemas) -> types. own redefined BaseModel class, new SuccessfulResponse class, improved handle errors from FastAPI.

  • Authorization: pass token param via header, instead of query param, siginin + siginup API methods.

  • Configuration: json configs with validation through pydantic

  • Types: there is some unused types, which was refactored some time ago. Them will be used in future

Spotika and others added 29 commits February 6, 2024 22:00
This commit contains following changes:
* GroupCreated in db/models. Represents group that creating from api
* GroupMember - group member pepresentation with connected id, roles, and p>
* GroupRole - role in group that has role code, name and description
* Added ALL_PERMISSIONS_CODE - number that contain 31 true bit
* Added logging in domain database manager
* Fixed Typing and Linting
Example config was change to version with some null fields
About fields and how fill them see https://app.clickup.com/9015604104/v/dc/8cnycw8-115/8cnycw8-155
* refactor: rebananing db module

* replace motor with pymogo
* remove database managers
* make new autoincrement (delete class, create pure method)
* create new field in config - "internal counters"
* move annotations out of models
* create schemas dir
* create methods dir
* create db and client variables in __init__ in db

* refactor: slightly refactored schemas and models

* dont care

* refactor: refactor user base model

* feat: collections mock

* fix: replace db.get*...* by collections module

* fix: improve type hints

* fix: improve type hints x2

* feat: add indexes to users collection

* feat: create indexes in db module

* refactor: refactor role base model

* refactor: refactor group base model

* feat: add group member base model

* feat: add group_members to collections

* refactor: refactor contest base model

* feat: add contest index

* feat: add contest member base model

* fix: fix clickup link

* refactor: refactor entity model

* refactor: refactor problem model

* fix: fix typing error in MongoClient

* refactor: refactor submission model

* fix: fix annotations import

* feat: add role code base model

* fix: fix models __init__.py

* refactor: some visual refactor

* feat: user frendly config validation error

* fix: fix circular imports. Breaking changes in auth module

* feat: add mongo service to docker-compose

Now mongodb only for backend.
Added folder for mongodb data `mongodb_data`
Changed connection string in example config to work with mongo in docker

* refactor: remove all endpoints and refator main.py

* fix: fix partial user indexes

* refactor: clear all schemas

* fix: fix docker compose

* feat: run without docker

* feat: new configs: with and without docker

* feat: new option 'show_config' in config

* feat: new response format implementation

* ♻️ refactor(db): Change db/ directory hierarchy

* 🔧 chore(gitignore): Update gitignore

* 🐛 fix(db): Fix circular import

* ✨ feat(api): Create endpoinds for test response specification

* ✨ feat(api): Create response with custom error code

* ♻️ refactor(auth): Move out shcme. Fix fole code naming

* ♻️ refactor(auth): Move out schemas. Refactor naming in auth.utils + recreate main functions

* 🐛 fix(auth): Fix imports

* ✨ feat(methods): Create stub for getting user by id

* ♻️ refactor(models): Change import structure

* ✨ feat(auth): Create new auth_user dependency to auth through header

* 🐛 fix(db): Replace ... = Field(...) by ... = ...

* 🐛 fix(methods): Fix get methods

* ✅ test: Make integration test which ruhs with docker

* chore: general code structure refactor

* refactor: refactor auth module

* test: create test infra

* refactor: fix pylint

* chore: fix workflow actions versions

* chore: try to change workflow node version

* chore: change the latest version of actions in workflow

* chore: test pyright workflow

* chore: test pyright workflow

* chore: add poetry to workflow

* chore: fix all linters

* chore: create test workflow

* chore: fix test workflow

* chore: fix test workflow

* chore: fix test workflow

* chore: fix test workflow

* chore: fix test workflow

* chore: show test logs through docker compose

* chore: change actions target branch to master

* feat(auth): create siginin and signup

* feat: create super user on startup

* feat: create super user on startup

---------

Co-authored-by: Spotika <[email protected]>
@Spotika Spotika self-assigned this Aug 6, 2024
@Spotika Spotika requested a review from difhel August 22, 2024 12:45
Copy link
Member Author

@Spotika Spotika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Финальные фиксы стиля кода. Считаю что готово к слиянию

src/db/types/user.py Outdated Show resolved Hide resolved
@Spotika Spotika requested a review from difhel August 22, 2024 14:37
src/routers/auth.py Outdated Show resolved Hide resolved
src/routers/auth.py Outdated Show resolved Hide resolved
src/utils/response.py Outdated Show resolved Hide resolved
src/utils/auth/auth.py Outdated Show resolved Hide resolved
@difhel difhel removed their assignment Aug 22, 2024
@difhel
Copy link
Member

difhel commented Aug 22, 2024

@Spotika your turn

@Spotika Spotika requested a review from difhel August 22, 2024 19:30
src/routers/auth.py Outdated Show resolved Hide resolved
@Spotika Spotika requested a review from difhel August 22, 2024 19:48
@difhel
Copy link
Member

difhel commented Aug 22, 2024

@Spotika your turn

@Spotika Spotika merged commit c4e5a29 into master Aug 22, 2024
3 checks passed
@Spotika Spotika deleted the total-fix branch August 22, 2024 20:03
@Spotika Spotika removed their assignment Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants