Skip to content

Refactor with typer #36

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

Merged
merged 1 commit into from
Jul 28, 2025
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
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,3 @@ python -m venv .venv
source .venv/bin/activate
just install
```

## Usage

```
Usage: dm [OPTIONS] COMMAND [ARGS]...
Django MongoDB CLI
System executable:
/Users/alexclark/Developer/django-mongodb-cli/.venv/bin/python
Options:
--help Show this message and exit.
Commands:
app Create Django apps configured to test django-mongodb-backend.
proj Create Django projects configured to test django-mongodb-backend.
repo Run tests configured to test django-mongodb-backend.
```
30 changes: 14 additions & 16 deletions django_mongodb_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import click
import sys
import os
import typer

from .app import app
from .proj import proj
from .repo import repo


def get_help_text():
help_text = """
Django MongoDB CLI
help_text = (
"""
return f"\n\n{help_text.strip()}\n\nSystem executable:\n\n{sys.executable}\n"

Django MongoDB CLI
@click.group(help=get_help_text())
def cli():
"""Django MongoDB CLI"""
System executable:
"""
+ os.sys.executable
)

dm = typer.Typer(
help=help_text,
add_completion=False,
context_settings={"help_option_names": ["-h", "--help"]},
)

cli.add_command(app)
cli.add_command(proj)
cli.add_command(repo)
dm.add_typer(repo, name="repo")
72 changes: 0 additions & 72 deletions django_mongodb_cli/app.py

This file was deleted.

173 changes: 0 additions & 173 deletions django_mongodb_cli/proj.py

This file was deleted.

Loading