forked from yoda-pa/yoda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup basic CLI project with typer and all instructions
- Loading branch information
Man Parvesh Singh Randhawa
committed
Oct 4, 2024
1 parent
a993f5f
commit 212a9ed
Showing
10 changed files
with
37 additions
and
37 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 |
---|---|---|
|
@@ -123,6 +123,8 @@ celerybeat.pid | |
# SageMath parsed files | ||
*.sage.py | ||
|
||
.idea | ||
|
||
# Environments | ||
.env | ||
.venv | ||
|
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,3 +1,18 @@ | ||
# Yoda PA | ||
|
||
PyPi link: https://pypi.org/project/yodapa/ | ||
|
||
## Development setup | ||
|
||
```bash | ||
# 1. Install poetry from their website: https://python-poetry.org/docs/#installation | ||
|
||
# 2. Install dependencies and this package | ||
poetry install | ||
|
||
# 3. Activate the virtual environment | ||
poetry shell | ||
|
||
# Now you should be able to communicate with yoda | ||
yoda --help | ||
``` |
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 |
---|---|---|
|
@@ -5,6 +5,9 @@ description = "Personal Assistant on the command line" | |
authors = ["Man Parvesh Singh Randhawa <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
packages = [ | ||
{ include = "yodapa", from = "src" } | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
|
@@ -17,3 +20,6 @@ pytest = "^8.3.3" | |
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
yoda = "cli.yoda:app" |
Empty file.
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,12 @@ | ||
import typer | ||
from yodapa import hi | ||
|
||
app = typer.Typer() | ||
|
||
@app.command() | ||
def hello(name: str): | ||
"""Greet someone by name.""" | ||
typer.echo(hi.hu(name)) | ||
|
||
if __name__ == "__main__": | ||
app() |
Empty file.
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,2 @@ | ||
def hu(s: str) -> str: | ||
return f"Hellowww {s}" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.