-
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 #25 from samudradev/on_start
⚙ FIX: Implemented builder pattern for queries
- Loading branch information
Showing
18 changed files
with
8 additions
and
486 deletions.
There are no files selected for viewing
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,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "samudra" | ||
version = "0.8.3" | ||
version = "0.9.0" | ||
description = "" | ||
authors = ["Thaza_Kun <[email protected]>"] | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
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 |
---|---|---|
@@ -1,20 +1,11 @@ | ||
from typer import Typer | ||
from samudra.conf.setup import bind_proxy_to_database | ||
|
||
from samudra.conf.database.core import get_active_database | ||
from samudra.models.base import database_proxy | ||
from samudra.cli import database, lemma, golongan_kata | ||
|
||
app = Typer() | ||
app.add_typer(database.app, name="db", rich_help_panel="Interact with the database") | ||
app.add_typer(lemma.app, name="lemma", rich_help_panel="Interact with lemmas") | ||
app.add_typer( | ||
golongan_kata.app, name="class", rich_help_panel="Interact with word classes" | ||
) | ||
def start_app() -> None: | ||
bind_proxy_to_active_databse() | ||
|
||
|
||
if __name__ == "__main__": | ||
try: | ||
active = get_active_database() | ||
database_proxy.initialize(active) | ||
except KeyError: | ||
pass | ||
app() | ||
print( | ||
"The current codebase is written as a library. Please do not run this as a script." | ||
) |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.