-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from samudradev/on_start
🚀 BUMP: v0.9.1
- Loading branch information
Showing
31 changed files
with
558 additions
and
1,506 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
[tool.poetry] | ||
name = "samudra" | ||
version = "0.9.0" | ||
version = "0.9.1" | ||
description = "" | ||
authors = ["Thaza_Kun <[email protected]>"] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8" | ||
pytomlpp = "^1.0.11" | ||
fastapi = "^0.79.0" | ||
uvicorn = "^0.18.2" | ||
pydantic = "^1.9.1" | ||
pandas = "^1.4.3" | ||
openpyxl = "^3.0.10" | ||
python-dotenv = "^0.20.0" | ||
psycopg2 = { version = "^2.9.3", optional = true } | ||
cryptography = { version = "^37.0.4", optional = true } | ||
|
@@ -23,8 +18,6 @@ bcrypt = "^3.2.2" | |
python-multipart = "^0.0.5" | ||
peewee = "^3.15.1" | ||
requests = "^2.28.1" | ||
typer = "^0.6.1" | ||
rich = "^12.6.0" | ||
|
||
[tool.poetry.extras] | ||
mysql = ["cryptography", "PyMySQL"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from typing import List | ||
from peewee import JOIN | ||
|
||
import peewee as pw | ||
from samudra import models | ||
|
||
|
||
class LemmaBuilder: | ||
_query_stmt = models.Lemma.select() | ||
|
||
def __init__(self, nama: str) -> None: | ||
self._query_stmt = self._query_stmt.where(models.Lemma.nama == nama) | ||
self.get_konsep() | ||
|
||
def get_konsep(self) -> "LemmaBuilder": | ||
self._query_stmt = self._query_stmt.join_from( | ||
models.Lemma, models.Konsep, JOIN.LEFT_OUTER | ||
) | ||
return self | ||
|
||
def get_cakupan(self) -> "LemmaBuilder": | ||
self._query_stmt = self._query_stmt.join_from( | ||
models.Konsep, models.CakupanXKonsep, JOIN.LEFT_OUTER | ||
).join(models.Cakupan, JOIN.LEFT_OUTER) | ||
return self | ||
|
||
def get_kata_asing(self) -> "LemmaBuilder": | ||
self._query_stmt = self._query_stmt.join_from( | ||
models.Konsep, models.KataAsingXKonsep, JOIN.LEFT_OUTER | ||
).join(models.KataAsing, JOIN.LEFT_OUTER) | ||
return self | ||
|
||
def query(self) -> List[models.Lemma]: | ||
return pw.prefetch(self._query_stmt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.