Skip to content
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

Change modules architecture #25

Merged
merged 11 commits into from
Apr 25, 2024
4 changes: 2 additions & 2 deletions .github/workflows/test-clir.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python package
name: Test Clir

on:
pull_request:
Expand All @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.7","3.8","3.9","3.10"]
python-version: ["3.8","3.9","3.10"]

steps:
- uses: actions/checkout@v4
Expand Down
22 changes: 12 additions & 10 deletions clir/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
import subprocess
from rich.prompt import Prompt
from clir.utils.objects import Command
from clir.utils.objects import CommandTable
from clir.command import Command
from clir.command import CommandTable

@click.group()
def cli():
Expand All @@ -23,17 +23,19 @@ def init():
os.makedirs(dir_path, exist_ok=True)

# Define the file path and name
file_path = os.path.join(dir_path, 'commands.json')
files = ['commands.json', 'credentials.json']

# Check if the file already exists
if not os.path.exists(file_path):
# Create the file
with open(file_path, 'w') as file:
file.write('{}')
for file in files:
file_path = os.path.join(dir_path, file)
if not os.path.exists(file_path):
# Create the file
with open(file_path, 'w') as file_object:
file_object.write('{}')

print(f'File "{file_path}" created successfully.')
else:
print(f'A clir environment already exists in "{dir_path}".')
print(f'File "{file_path}" created successfully.')
else:
print(f'A clir environment already exists in "{dir_path}".')

@cli.command(help="Save new command 💾")
@click.option('-c', '--command', help="Command to be saved", prompt=True)
Expand Down
File renamed without changes.
Empty file removed clir/utils/__init__.py
Empty file.
82 changes: 59 additions & 23 deletions poetry.lock

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

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ repository = "https://github.com/elkinaguas/clir"
"Bug Tracker" = "https://github.com/elkinaguas/clir/issues"

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"
rich = "^13.5.2"
click = "^8.1.7"
rich-click = "^1.7.0"
textual = "^0.47.1"

[build-system]
requires = ["poetry-core"]
Expand Down
Loading