Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ A tool and framework to simplify construction of Python Dash applications.

* Create a project in the current working directory
```bash
> dash build
> dash init
```

* Create project called `testproject` in specified directory
```bash
> dash build testproject --location ~/projects
> dash init testproject --location ~/projects
```

* Add new page to current dash project in pages/ directory
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dependencies = [
]

[project.scripts]
dashb = "dash_builder.cli:app"
dash = "dash_builder.cli:app"

[build-system]
Expand Down
6 changes: 3 additions & 3 deletions src/dash_builder/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .templates import PageTemplate, ViewTemplate

app: typer.Typer = typer.Typer()
"""The `typer.Typer` applicaiton object."""
"""The `typer.Typer` application object."""


class Project:
Expand Down Expand Up @@ -229,8 +229,8 @@ def add_page(self, page_name: str, url_path: str | None = None):
)


@app.command("build")
def build(
@app.command("init")
def init(
project_name: Annotated[str, typer.Argument(help="The name of the project.")] = "",
template: Annotated[
str, typer.Argument(help="The template to use for the project.")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"project_name", ["test-project-1", "test_project_2", "testproject"]
)
def test_init_project_cli(runner, tmp_path, project_name):
app_params = ["build", project_name, "--location", str(tmp_path)]
app_params = ["init", project_name, "--location", str(tmp_path)]
result = runner.invoke(app, app_params)
project = tmp_path / project_name
app_file = project / "app.py"
Expand Down
Loading