maya-cli 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- maya_cli-0.1.0/LICENSE +1 -0
- maya_cli-0.1.0/PKG-INFO +25 -0
- maya_cli-0.1.0/README.md +1 -0
- maya_cli-0.1.0/maya_cli/__init__.py +1 -0
- maya_cli-0.1.0/maya_cli/cli.py +27 -0
- maya_cli-0.1.0/maya_cli/project_generator.py +28 -0
- maya_cli-0.1.0/maya_cli.egg-info/PKG-INFO +25 -0
- maya_cli-0.1.0/maya_cli.egg-info/SOURCES.txt +14 -0
- maya_cli-0.1.0/maya_cli.egg-info/dependency_links.txt +1 -0
- maya_cli-0.1.0/maya_cli.egg-info/entry_points.txt +2 -0
- maya_cli-0.1.0/maya_cli.egg-info/requires.txt +1 -0
- maya_cli-0.1.0/maya_cli.egg-info/top_level.txt +1 -0
- maya_cli-0.1.0/pyproject.toml +4 -0
- maya_cli-0.1.0/setup.cfg +4 -0
- maya_cli-0.1.0/setup.py +29 -0
- maya_cli-0.1.0/tests/test_maya.py +42 -0
maya_cli-0.1.0/LICENSE
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# LICENSE
|
maya_cli-0.1.0/PKG-INFO
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: maya-cli
|
3
|
+
Version: 0.1.0
|
4
|
+
Summary: Maya CLI - AI Project Generator
|
5
|
+
Home-page: https://github.com/anointingmayami/Maya.ai
|
6
|
+
Author: King Anointing Joseph Mayami
|
7
|
+
Author-email: anointingmayami@gmail.com
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Requires-Python: >=3.7
|
12
|
+
Description-Content-Type: text/markdown
|
13
|
+
License-File: LICENSE
|
14
|
+
Requires-Dist: click
|
15
|
+
Dynamic: author
|
16
|
+
Dynamic: author-email
|
17
|
+
Dynamic: classifier
|
18
|
+
Dynamic: description
|
19
|
+
Dynamic: description-content-type
|
20
|
+
Dynamic: home-page
|
21
|
+
Dynamic: requires-dist
|
22
|
+
Dynamic: requires-python
|
23
|
+
Dynamic: summary
|
24
|
+
|
25
|
+
# README.md
|
maya_cli-0.1.0/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# README.md
|
@@ -0,0 +1 @@
|
|
1
|
+
# __init__.py
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# cli.py
|
2
|
+
import os
|
3
|
+
import click
|
4
|
+
from project_generator import create_project_structure, PROJECT_STRUCTURE
|
5
|
+
|
6
|
+
@click.group()
|
7
|
+
def maya():
|
8
|
+
"Maya CLI - AI Project Generator"
|
9
|
+
pass
|
10
|
+
|
11
|
+
@click.command()
|
12
|
+
@click.argument("project_name")
|
13
|
+
def create(project_name):
|
14
|
+
"Create a new AI project structure"
|
15
|
+
base_path = os.path.join(os.getcwd(), project_name)
|
16
|
+
if os.path.exists(base_path):
|
17
|
+
click.echo(f"Error: Project '{project_name}' already exists.")
|
18
|
+
return
|
19
|
+
os.makedirs(base_path, exist_ok=True)
|
20
|
+
create_project_structure(base_path, PROJECT_STRUCTURE)
|
21
|
+
click.echo(f"✅ AI project '{project_name}' created successfully!")
|
22
|
+
|
23
|
+
# Add commands to CLI
|
24
|
+
maya.add_command(create)
|
25
|
+
|
26
|
+
if __name__ == "__main__":
|
27
|
+
maya()
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# project_generator.py
|
2
|
+
import os
|
3
|
+
|
4
|
+
# Define the AI Project Structure
|
5
|
+
PROJECT_STRUCTURE = {
|
6
|
+
"data_source": {"ingestion": {}, "processing": {}, "storage": {}},
|
7
|
+
"knowledge_base": {"models": {}, "training": {}, "evaluation": {}},
|
8
|
+
"ai_governance": {"compliance": {}, "fairness": {}, "monitoring": {}},
|
9
|
+
"api": {"endpoints": {}, "authentication": {}},
|
10
|
+
"tests": {},
|
11
|
+
"docs": {},
|
12
|
+
"scripts": {},
|
13
|
+
"configs": {}
|
14
|
+
}
|
15
|
+
|
16
|
+
# Function to create folders
|
17
|
+
def create_project_structure(base_path, structure):
|
18
|
+
for folder, subfolders in structure.items():
|
19
|
+
folder_path = os.path.join(base_path, folder)
|
20
|
+
os.makedirs(folder_path, exist_ok=True)
|
21
|
+
|
22
|
+
# Create __init__.py for package folders
|
23
|
+
init_file = os.path.join(folder_path, "__init__.py")
|
24
|
+
with open(init_file, "w") as f:
|
25
|
+
f.write(f"# {folder.replace('_', ' ').title()} package\n")
|
26
|
+
|
27
|
+
if isinstance(subfolders, dict):
|
28
|
+
create_project_structure(folder_path, subfolders)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: maya-cli
|
3
|
+
Version: 0.1.0
|
4
|
+
Summary: Maya CLI - AI Project Generator
|
5
|
+
Home-page: https://github.com/anointingmayami/Maya.ai
|
6
|
+
Author: King Anointing Joseph Mayami
|
7
|
+
Author-email: anointingmayami@gmail.com
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
10
|
+
Classifier: Operating System :: OS Independent
|
11
|
+
Requires-Python: >=3.7
|
12
|
+
Description-Content-Type: text/markdown
|
13
|
+
License-File: LICENSE
|
14
|
+
Requires-Dist: click
|
15
|
+
Dynamic: author
|
16
|
+
Dynamic: author-email
|
17
|
+
Dynamic: classifier
|
18
|
+
Dynamic: description
|
19
|
+
Dynamic: description-content-type
|
20
|
+
Dynamic: home-page
|
21
|
+
Dynamic: requires-dist
|
22
|
+
Dynamic: requires-python
|
23
|
+
Dynamic: summary
|
24
|
+
|
25
|
+
# README.md
|
@@ -0,0 +1,14 @@
|
|
1
|
+
LICENSE
|
2
|
+
README.md
|
3
|
+
pyproject.toml
|
4
|
+
setup.py
|
5
|
+
maya_cli/__init__.py
|
6
|
+
maya_cli/cli.py
|
7
|
+
maya_cli/project_generator.py
|
8
|
+
maya_cli.egg-info/PKG-INFO
|
9
|
+
maya_cli.egg-info/SOURCES.txt
|
10
|
+
maya_cli.egg-info/dependency_links.txt
|
11
|
+
maya_cli.egg-info/entry_points.txt
|
12
|
+
maya_cli.egg-info/requires.txt
|
13
|
+
maya_cli.egg-info/top_level.txt
|
14
|
+
tests/test_maya.py
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
click
|
@@ -0,0 +1 @@
|
|
1
|
+
maya_cli
|
maya_cli-0.1.0/setup.cfg
ADDED
maya_cli-0.1.0/setup.py
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# setup.py
|
2
|
+
|
3
|
+
from setuptools import setup, find_packages
|
4
|
+
|
5
|
+
setup(
|
6
|
+
name="maya-cli",
|
7
|
+
version="0.1.0",
|
8
|
+
author="King Anointing Joseph Mayami",
|
9
|
+
author_email="anointingmayami@gmail.com",
|
10
|
+
description="Maya CLI - AI Project Generator",
|
11
|
+
long_description=open("README.md").read(),
|
12
|
+
long_description_content_type="text/markdown",
|
13
|
+
url="https://github.com/anointingmayami/Maya.ai",
|
14
|
+
packages=find_packages(),
|
15
|
+
install_requires=[
|
16
|
+
"click",
|
17
|
+
],
|
18
|
+
entry_points={
|
19
|
+
"console_scripts": [
|
20
|
+
"maya=maya.cli:maya",
|
21
|
+
],
|
22
|
+
},
|
23
|
+
classifiers=[
|
24
|
+
"Programming Language :: Python :: 3",
|
25
|
+
"License :: OSI Approved :: MIT License",
|
26
|
+
"Operating System :: OS Independent",
|
27
|
+
],
|
28
|
+
python_requires=">=3.7",
|
29
|
+
)
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# test_maya.py
|
2
|
+
import os
|
3
|
+
import shutil
|
4
|
+
import unittest
|
5
|
+
from click.testing import CliRunner
|
6
|
+
from maya_cli.cli import maya
|
7
|
+
from maya_cli.project_generator import PROJECT_STRUCTURE
|
8
|
+
|
9
|
+
test_project_name = "test_ai_project"
|
10
|
+
|
11
|
+
def project_exists(base_path, structure):
|
12
|
+
""" Recursively check if project structure exists """
|
13
|
+
for folder in structure.keys():
|
14
|
+
folder_path = os.path.join(base_path, folder)
|
15
|
+
if not os.path.exists(folder_path):
|
16
|
+
return False
|
17
|
+
if isinstance(structure[folder], dict) and not project_exists(folder_path, structure[folder]):
|
18
|
+
return False
|
19
|
+
return True
|
20
|
+
|
21
|
+
class TestMayaCLI(unittest.TestCase):
|
22
|
+
def setUp(self):
|
23
|
+
self.runner = CliRunner()
|
24
|
+
|
25
|
+
def tearDown(self):
|
26
|
+
if os.path.exists(test_project_name):
|
27
|
+
shutil.rmtree(test_project_name)
|
28
|
+
|
29
|
+
def test_create_project(self):
|
30
|
+
result = self.runner.invoke(maya, ["create", test_project_name])
|
31
|
+
self.assertEqual(result.exit_code, 0)
|
32
|
+
self.assertIn(f"✅ AI project '{test_project_name}' created successfully!", result.output)
|
33
|
+
self.assertTrue(project_exists(test_project_name, PROJECT_STRUCTURE))
|
34
|
+
|
35
|
+
def test_create_existing_project(self):
|
36
|
+
os.makedirs(test_project_name, exist_ok=True)
|
37
|
+
result = self.runner.invoke(maya, ["create", test_project_name])
|
38
|
+
self.assertEqual(result.exit_code, 0)
|
39
|
+
self.assertIn(f"Error: Project '{test_project_name}' already exists.", result.output)
|
40
|
+
|
41
|
+
if __name__ == "__main__":
|
42
|
+
unittest.main()
|