Skip to content

Commit dcf58c9

Browse files
committed
chore(release): bump version to 0.2.1 πŸš€
Features: - Added build script for PyInstaller Improvements: - Replaced the use of PyFiglet with a simplified ASCII art banner for better performance Fixed: - Minor stability improvements and optimizations
1 parent 1ac46d1 commit dcf58c9

File tree

6 files changed

+70
-8
lines changed

6 files changed

+70
-8
lines changed

β€Ždocs/CHANGELOG.mdβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ All notable changes to this project will be documented in this file.
77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

10+
## [0.2.1] - 2024-02-16
11+
12+
### Added
13+
- Added build script for PyInstaller
14+
15+
### Changed
16+
- Replaced the use of PyFiglet for an simplified ASCII art banner
17+
1018
## [0.2.0] - 2024-02-16
1119

1220
### Added

β€Žscripts/build.pyβ€Ž

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import os
2+
import platform
3+
import subprocess
4+
5+
def build():
6+
# Determine the platform-specific separator
7+
is_windows = platform.system() == "Windows"
8+
separator = ";" if is_windows else ":"
9+
10+
# Base command
11+
cmd = [
12+
"pyinstaller",
13+
"--name=devtool",
14+
"--onefile",
15+
"--clean",
16+
f"--add-data=config{separator}config",
17+
"--hidden-import=rich",
18+
"--hidden-import=questionary",
19+
"--collect-all=pyfiglet",
20+
]
21+
22+
# Add icon according the platform
23+
#if is_windows:
24+
# cmd.append("--icon=assets/icon.ico")
25+
#else:
26+
# cmd.append("--icon=assets/icon.png")
27+
28+
# Add the main file
29+
cmd.append("src/main.py")
30+
31+
# Execute the command
32+
subprocess.run(cmd)
33+
34+
if __name__ == "__main__":
35+
build()

β€Žsetup.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="devtooling-cli",
9-
version="0.2.0",
9+
version="0.2.1",
1010
packages=find_packages(),
1111
include_package_data=True,
1212
install_requires=[

β€Žsrc/__init__.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
DevTooling CLI - A CLI tool for project analysis and management
33
"""
44

5-
__version__ = '0.2.0'
5+
__version__ = '0.2.1'
66
__author__ = 'KloutDevs'

β€Žsrc/ui/banner.pyβ€Ž

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,20 @@ def _clear_screen(self):
1717
os.system('cls' if os.name == 'nt' else 'clear')
1818

1919
def _create_banner_text(self) -> str:
20-
"""Creates the banner text using figlet."""
20+
"""Crea el texto del banner."""
2121
try:
22-
figlet = pyfiglet.Figlet(font='slant')
23-
return figlet.renderText('DevTooling CLI')
22+
# Now we use an ASCII art banner instead of pyfiglet
23+
return """
24+
____ _____ _ _
25+
| _ \ _____ _|_ _|__ ___ | (_)_ __ __ _
26+
| | | |/ _ \ \ / / | |/ _ \ / _ \| | | '_ \ / _` |
27+
| |_| | __/\ V / | | (_) | (_) | | | | | | (_| |
28+
|____/ \___| \_/ |_|\___/ \___/|_|_|_| |_|\__, |
29+
|___/
30+
"""
2431
except Exception as e:
2532
self.logger.error(f"Error creating banner: {str(e)}")
26-
return "DevTooling CLI" # Fallback
33+
return "DevTooling CLI" # Fallback simple
2734

2835
def show(self):
2936
"""Shows the banner with animation."""

β€Žsrc/utils/config.pyβ€Ž

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1+
import os
2+
import sys
13
import json
24
from typing import Dict, Any
35

6+
def get_config_path() -> str:
7+
"""Get the absolute path to the config directory."""
8+
if hasattr(sys, '_MEIPASS'):
9+
# PyInstaller creates a temp folder and stores path in _MEIPASS
10+
return os.path.join(sys._MEIPASS, 'config')
11+
12+
return os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'config')
13+
414
def load_config(filename: str) -> Dict[str, Any]:
5-
with open(f'config/{filename}', 'r', encoding='utf-8') as f:
15+
"""Load a configuration file."""
16+
config_path = os.path.join(get_config_path(), filename)
17+
with open(config_path, 'r', encoding='utf-8') as f:
618
return json.load(f)
719

820
def get_version() -> str:
9-
return "0.2.0"
21+
return "0.2.1"

0 commit comments

Comments
Β (0)