Releases: ianktoo/mkpyenv-cli
🚀 Release Notes: mkpyenv v2.0.0
🚀 Release Notes: mkpyenv v2.0.0
Summary
This is a critical security and stability patch release. Version v2.0.0 fixes a critical bug where the standard --help flag failed to execute, instead incorrectly attempting to create a project directory named --help. This release also introduces mandatory self-update enforcement and improves scripting reliability with enhanced error handling.
🔒 Key Features and Fixes
| Feature | Type | Description |
|---|---|---|
| Critical Bug Fix | Fix |
Corrected the input validation logic to properly recognize and execute the standard --help (-h) usage flag, resolving the script's failure to display help information. |
| Mandatory Update | Security |
Implemented a version enforcement check (v1.0.0 will auto-abort). Users running deprecated versions are now required to update, guaranteeing that all users are running the latest, fixed code. |
| Robust Error Handling | Security |
Added the set -o pipefail directive to ensure that the script exits immediately if any command in a pipeline (e.g., `cd |
| Safer Placeholder Replacement | Enhancement |
Updated the sed command to use the -i.bak flag, creating a temporary backup file (.bak) during placeholder replacement before deleting it, offering a small buffer against unexpected write errors. |
| Clean Exit on Help | Refactor |
The --help flag now executes a clean exit status of 0, aligning with Unix conventions for successful information retrieval. |
⚠️ Action Required: Upgrade Instructions
If you are running any version older than v2.0.0, your script will now fail and print mandatory upgrade instructions.
To ensure you are using the latest, stable version, please run the following command. This command will download and overwrite your local mkpyenv file with the fixed script.
# This command finds the script's location and replaces it with the new v2.0.0 file.
curl -sL https://raw.githubusercontent.com/ianktoo/mkpyenv-cli/main/mkpyenv -o "$(which mkpyenv)" && chmod +x "$(which mkpyenv)"v1.0.0 - Initial Public Release: Automated Python Project Scaffolding
We are excited to announce the first public release of mkpyenv (Make Python Environment)! This command-line utility is designed to streamline your development process by instantly creating organized Python project structures and isolated virtual environments.
Our goal with this initial release is to eliminate repetitive setup tasks, allowing you to jump straight into coding.
✨ New Features in v1.0.0
This release introduces the core functionality and template engine that makes mkpyenv an efficient tool for system administrators and developers alike.
- Automated Virtual Environment Setup:
- Isolation Guarantee: Running mkpyenv automatically creates a project directory and initializes a clean, isolated Python virtual environment (
.venv) inside it. This prevents dependency conflicts with your system Python or other projects.
- Template System: We introduce two distinct templates to structure your projects immediately:
standard(Default): For simple scripts, utility tools, and quick development. Includes main.py and a basic README.md.data: For data science, machine learning, and complex analysis. This template includes a robust folder structure: data/raw, data/processed, src/ (for custom modules), notebooks/ (with a starter notebook), and a .env file.
- Smart File Generation
- Hydration: The script automatically replaces the
{{PROJECT_NAME}}placeholder with the actual name you provide in the command, personalizing yourREADME.mdand starter files. - Essentials: Every project includes a .gitignore (pre-configured to ignore .venv and data files in the data template) and a placeholder
LICENSE.
- Improved User Experience
- Self-Help: Added the
--helpflag for quick reference on usage and available template types. - Easy Installation: Provided the
install.shscript to automate the setup of the script and its persistent template directories (~/binand~/templates).
🚀 Getting Started
To use the new features, ensure you have run the install.sh script and sourced your shell (source ~/.bashrc).
To create a new Data Project:
mkpyenv my-new-analysis dataTo create a Standard Project:
mkpyenv my-cli-toolWe look forward to your feedback and contributions!