Skip to content

Commit

Permalink
bump to 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zackees committed Feb 19, 2024
1 parent 3c17c9c commit 6d3c201
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,5 @@ dmypy.json
.pyre/
.activate.sh
.DS_Store
.MyAppTest/
.MyAppTest

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ To run all linters and tests, simply go to the root directory and run `tox`
To upload your project to pypi simply run `. ./upload_package.sh`

# Versions

* `1.2.1` - Adds retries to get correct parameters and auto corrects parameters instead of exiting.
* `1.2.0` - Refresh with new modern practices like an installation script.
* `1.1.1` - Adds chmod +x to shell scripts and adds post install instructions.
* `1.1.0` - createpythonapp -> createpythoncmd.
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ classifiers = ["Programming Language :: Python :: 3"]
dependencies = []
# Change this with the version number bump.
# Also make the change in zcmds/version.py
version = "1.2.0"
version = "1.2.1"

[project.scripts]
createpythoncmd = "create_python_cmd.cli:main"
create-python-cmd = "create_python_cmd.cli:main"
41 changes: 29 additions & 12 deletions src/create_python_cmd/createapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,41 @@ def create_python_app() -> None:
# check if git exists
if not shutil.which("git"):
raise RuntimeError("Git is not installed.")
app_name = input("Python app name: ")
check_name(app_name)
while True:
try:
app_name = input("Python app name: ").replace("-", "_")
check_name(app_name)
break
except ValueError as e:
print(f"Error: {e}, try again")
continue

app_description = input("Python app description: ")
app_keywords = input("Python app keywords: ")
app_author = input("Python app author: ")
github_url = input("GitHub URL: ")
version = input("Version [1.0.0]: ")
if not version:
version = "1.0.0"
check_semantic_version(version)
while True:
try:
version = input("Version [1.0.0]: ")
if not version:
version = "1.0.0"
check_semantic_version(version)
break
except ValueError as e:
print(f"Error: {e}, try again")
continue
add_command = input("Add a command? [y/N]: ").lower() == "y"
command_name = None
if add_command:
command_name = input("Command name: ")
check_name(command_name)
while True:
try:
command_name = input("Command name: ")
command_name = command_name.replace("-", "_")
check_name(command_name)
break
except ValueError as e:
print(f"Error: {e}, try again")
continue
do_create_python_app(
app_description=app_description,
app_author=app_author,
Expand All @@ -177,10 +197,7 @@ def create_python_app() -> None:
github_url=github_url,
command_name=command_name,
)
print(
"\nDone! Now execute the following commands in git-bash:\n"
f" .install\n"
)
print("\nDone! Now execute the following commands in git-bash:\n" f" ./install\n")
print("If you are currently in VSCode then close the Program and reopen it.")
print(
"If running from the command line, make sure you enter into the virtual"
Expand Down

0 comments on commit 6d3c201

Please sign in to comment.