Skip to content

Commit

Permalink
Merge pull request #40 from samdoghor/v1.0.0b1
Browse files Browse the repository at this point in the history
# fix: import error
  • Loading branch information
samdoghor authored Jan 25, 2024
2 parents 8030cc9 + ef8d239 commit 5c6b5c5
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 55 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
MANIFEST.in

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include packages/create_myte/utils/info.json

recursive-include packages/create_myte/templates *

recursive-exclude packages/create_myte/templates/*/env *
recursive-exclude packages/create_myte/templates *.env
recursive-exclude tests *
102 changes: 58 additions & 44 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/create_myte/resources/create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from rich.console import Console
from rich.text import Text

from ..utils.secret_key_generator import GenerateSecretKey
from ..utils.constants import current_dir, messages, system_os, template_folder
from ..utils.secret_key_generator import GenerateSecretKey


class CreateProject:
Expand Down
24 changes: 17 additions & 7 deletions packages/create_myte/resources/setup_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from rich import print as mprint
from rich.prompt import Prompt

from ..utils.errors import UKeyboardInterrupt
from .create_project import CreateProject
from .delete_project import DeleteProject
from ..utils.errors import UKeyboardInterrupt


class SetupProject:
Expand All @@ -26,12 +26,22 @@ def project_setup():
"Project Name", default="myte-project")
mprint("\n")

if project_name == ".":
DeleteProject.delete_files()
else:
DeleteProject.delete_dir(project_name)
mprint(f"[green] ✅ Project name: {project_name} [/green]")
mprint("\n")
try:
if project_name == ".":
DeleteProject.delete_files()
else:
DeleteProject.delete_dir(project_name)
mprint(f"[green] ✅ Project name: {project_name} [/green]")
mprint("\n")
except UKeyboardInterrupt as e:
mprint(f"{e.message}") # noqa
raise typer.Abort()
except KeyboardInterrupt as e:
mprint(f"The Programme was terminated due to {e} Error") # noqa
raise typer.Abort()
except TypeError as e:
mprint(f"The Programme was terminated due to {e} Error") # noqa
raise typer.Abort()

# get framework choice
try:
Expand Down
2 changes: 1 addition & 1 deletion packages/create_myte/utils/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"environment_variable": "[cyan] - Rename example.env to .env [/cyan]",

"database_configuration": " - Go to config.py, decide the database you want to use, uncomment it and run the pip instructions there ",
"secret_key_configuration": "[cyan] - Go to .env, replace 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' in SECRETKEY with[/cyan]"
"secret_key_configuration": "[cyan] - Rename example.envi to .env, Go to .env, replace 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' in SECRETKEY with[/cyan]"

},
"os":{
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ build-backend = "setuptools.build_meta"

[project]
name = "myte"
version = "1.0.0a1"
version = "1.0.0b1"
dependencies = [
"typer",
"inquirer",
"rich"
]
authors = [
{ name="Samuel Doghor", email="talkto@samdoghor.com" },
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = myte
version = 1.0.0a1
version = 1.0.0b1
author = Samuel Doghor
author_email = talkto@samdoghor.com
description = Myte allows users to choose from popular web frameworks like Flask, FastAPI, and Tornado etc when initializing a new project. After entering a project name, the user selects their preferred framework which then generates the basic directory structure and boilerplate code to get started.
Expand All @@ -23,6 +23,7 @@ include_package_data = True
install_requires =
typer
inquirer
rich

[options.entry_points]
console_scripts =
Expand Down

0 comments on commit 5c6b5c5

Please sign in to comment.