cliops 1.0.3__tar.gz → 1.0.4__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.
Files changed (28) hide show
  1. {cliops-1.0.3/cliops.egg-info → cliops-1.0.4}/PKG-INFO +7 -2
  2. {cliops-1.0.3 → cliops-1.0.4}/README.md +6 -1
  3. {cliops-1.0.3 → cliops-1.0.4/cliops.egg-info}/PKG-INFO +7 -2
  4. cliops-1.0.4/post_install.py +74 -0
  5. {cliops-1.0.3 → cliops-1.0.4}/setup.py +68 -68
  6. cliops-1.0.3/post_install.py +0 -15
  7. {cliops-1.0.3 → cliops-1.0.4}/LICENSE +0 -0
  8. {cliops-1.0.3 → cliops-1.0.4}/MANIFEST.in +0 -0
  9. {cliops-1.0.3 → cliops-1.0.4}/cliops.egg-info/SOURCES.txt +0 -0
  10. {cliops-1.0.3 → cliops-1.0.4}/cliops.egg-info/dependency_links.txt +0 -0
  11. {cliops-1.0.3 → cliops-1.0.4}/cliops.egg-info/entry_points.txt +0 -0
  12. {cliops-1.0.3 → cliops-1.0.4}/cliops.egg-info/not-zip-safe +0 -0
  13. {cliops-1.0.3 → cliops-1.0.4}/cliops.egg-info/requires.txt +0 -0
  14. {cliops-1.0.3 → cliops-1.0.4}/cliops.egg-info/top_level.txt +0 -0
  15. {cliops-1.0.3 → cliops-1.0.4}/core/__init__.py +0 -0
  16. {cliops-1.0.3 → cliops-1.0.4}/core/analyzer.py +0 -0
  17. {cliops-1.0.3 → cliops-1.0.4}/core/config.py +0 -0
  18. {cliops-1.0.3 → cliops-1.0.4}/core/optimizer.py +0 -0
  19. {cliops-1.0.3 → cliops-1.0.4}/core/patterns.py +0 -0
  20. {cliops-1.0.3 → cliops-1.0.4}/core/state.py +0 -0
  21. {cliops-1.0.3 → cliops-1.0.4}/main.py +0 -0
  22. {cliops-1.0.3 → cliops-1.0.4}/presets.py +0 -0
  23. {cliops-1.0.3 → cliops-1.0.4}/requirements.txt +0 -0
  24. {cliops-1.0.3 → cliops-1.0.4}/setup.cfg +0 -0
  25. {cliops-1.0.3 → cliops-1.0.4}/tests/__init__.py +0 -0
  26. {cliops-1.0.3 → cliops-1.0.4}/tests/test_integration.py +0 -0
  27. {cliops-1.0.3 → cliops-1.0.4}/tests/test_optimizer.py +0 -0
  28. {cliops-1.0.3 → cliops-1.0.4}/tests/test_patterns.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cliops
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Advanced CLI tool for structured, pattern-based prompt optimization and state management
5
5
  Home-page: https://github.com/cliops/cliops
6
6
  Author: CliOps Development Team
@@ -65,10 +65,15 @@ A powerful CLI tool for structured, pattern-based prompt optimization and state
65
65
 
66
66
  ## Installation
67
67
 
68
+ The installer will attempt to add the necessary directory to your system's PATH. Please restart your terminal after installation for the changes to take effect.
69
+
68
70
  ```bash
69
- pip install -e .
71
+ pip install .
70
72
  ```
71
73
 
74
+ If you still have issues, you may need to add the Python scripts directory to your PATH manually.
75
+
76
+
72
77
  ## Quick Start
73
78
 
74
79
  ```bash
@@ -12,10 +12,15 @@ A powerful CLI tool for structured, pattern-based prompt optimization and state
12
12
 
13
13
  ## Installation
14
14
 
15
+ The installer will attempt to add the necessary directory to your system's PATH. Please restart your terminal after installation for the changes to take effect.
16
+
15
17
  ```bash
16
- pip install -e .
18
+ pip install .
17
19
  ```
18
20
 
21
+ If you still have issues, you may need to add the Python scripts directory to your PATH manually.
22
+
23
+
19
24
  ## Quick Start
20
25
 
21
26
  ```bash
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cliops
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Advanced CLI tool for structured, pattern-based prompt optimization and state management
5
5
  Home-page: https://github.com/cliops/cliops
6
6
  Author: CliOps Development Team
@@ -65,10 +65,15 @@ A powerful CLI tool for structured, pattern-based prompt optimization and state
65
65
 
66
66
  ## Installation
67
67
 
68
+ The installer will attempt to add the necessary directory to your system's PATH. Please restart your terminal after installation for the changes to take effect.
69
+
68
70
  ```bash
69
- pip install -e .
71
+ pip install .
70
72
  ```
71
73
 
74
+ If you still have issues, you may need to add the Python scripts directory to your PATH manually.
75
+
76
+
72
77
  ## Quick Start
73
78
 
74
79
  ```bash
@@ -0,0 +1,74 @@
1
+
2
+
3
+ import os
4
+ import sys
5
+ import subprocess
6
+ from pathlib import Path
7
+
8
+ def get_scripts_dir():
9
+ """Get the Python scripts directory."""
10
+ if os.name == 'nt':
11
+ return Path(sys.prefix) / 'Scripts'
12
+ else:
13
+ return Path(sys.prefix) / 'bin'
14
+
15
+ def add_to_path_windows(path: Path):
16
+ """
17
+ Adds a directory to the user's PATH on Windows using setx.
18
+ We need to be careful not to exceed the 1024 character limit of setx.
19
+ """
20
+ try:
21
+ # Get current user PATH
22
+ current_path = subprocess.check_output('reg query "HKEY_CURRENT_USER\Environment" /v Path', shell=True)
23
+ current_path = current_path.decode('utf-8').split()[-1]
24
+
25
+ if str(path) not in current_path:
26
+ # Append the new path
27
+ new_path = f"{current_path};{str(path)}"
28
+ if len(new_path) > 1024:
29
+ print(f"Warning: New PATH exceeds 1024 characters. Manual addition required.")
30
+ return
31
+
32
+ subprocess.run(f'setx PATH "{new_path}"', shell=True, check=True)
33
+ print(f"Successfully added {path} to your PATH.")
34
+ print("Please restart your terminal for the changes to take effect.")
35
+ else:
36
+ print(f"{path} is already in your PATH.")
37
+
38
+ except (subprocess.CalledProcessError, FileNotFoundError) as e:
39
+ print(f"Error adding to PATH: {e}")
40
+ print(f"Please add '{path}' to your PATH manually.")
41
+
42
+ def add_to_path_posix(path: Path):
43
+ """
44
+ Adds a directory to the user's PATH on Linux/macOS by updating shell profiles.
45
+ """
46
+ home = Path.home()
47
+ path_str = f'export PATH="$PATH:{str(path)}"'
48
+ profiles = [home / '.bashrc', home / '.zshrc', home / '.profile']
49
+
50
+ for profile in profiles:
51
+ if profile.exists():
52
+ with open(profile, 'r+') as f:
53
+ if path_str not in f.read():
54
+ f.write(f'\n{path_str}\n')
55
+ print(f"Added to {profile}. Please restart your shell or run 'source {profile}'.")
56
+
57
+ def main():
58
+ scripts_dir = get_scripts_dir()
59
+ if not scripts_dir.exists():
60
+ print(f"Could not find scripts directory: {scripts_dir}")
61
+ return
62
+
63
+ print(f"Detected scripts directory: {scripts_dir}")
64
+
65
+ if os.name == 'nt':
66
+ add_to_path_windows(scripts_dir)
67
+ elif os.name == 'posix':
68
+ add_to_path_posix(scripts_dir)
69
+ else:
70
+ print(f"Unsupported OS: {os.name}")
71
+ print(f"Please add '{scripts_dir}' to your PATH manually.")
72
+
73
+ if __name__ == "__main__":
74
+ main()
@@ -1,68 +1,68 @@
1
- from setuptools import setup, find_packages
2
- from pathlib import Path
3
-
4
- # Read README for long description
5
- this_directory = Path(__file__).parent
6
- long_description = (this_directory / "README.md").read_text(encoding='utf-8')
7
-
8
- # Read requirements
9
- requirements = (this_directory / "requirements.txt").read_text().strip().split('\n')
10
-
11
- setup(
12
- name='cliops',
13
- version='1.0.3',
14
- author='CliOps Development Team',
15
- author_email='contact@cliops.dev',
16
- description='Advanced CLI tool for structured, pattern-based prompt optimization and state management',
17
- long_description=long_description,
18
- long_description_content_type='text/markdown',
19
- url='https://github.com/cliops/cliops',
20
- project_urls={
21
- 'Bug Reports': 'https://github.com/cliops/cliops/issues',
22
- 'Source': 'https://github.com/cliops/cliops',
23
- 'Documentation': 'https://cliops.readthedocs.io',
24
- },
25
- packages=find_packages(exclude=['tests*']),
26
- py_modules=['main', 'presets'],
27
- include_package_data=True,
28
- install_requires=requirements,
29
- extras_require={
30
- 'dev': [
31
- 'pytest>=7.0.0',
32
- 'pytest-cov>=4.0.0',
33
- 'black>=22.0.0',
34
- 'flake8>=5.0.0',
35
- ],
36
- 'test': [
37
- 'pytest>=7.0.0',
38
- 'pytest-cov>=4.0.0',
39
- ],
40
- },
41
- entry_points={
42
- 'console_scripts': [
43
- 'cliops=main:main',
44
- ],
45
- },
46
- scripts=['post_install.py'],
47
- classifiers=[
48
- 'Development Status :: 5 - Production/Stable',
49
- 'Intended Audience :: Developers',
50
- 'Intended Audience :: System Administrators',
51
- 'License :: OSI Approved :: MIT License',
52
- 'Operating System :: OS Independent',
53
- 'Programming Language :: Python :: 3.8',
54
- 'Programming Language :: Python :: 3.9',
55
- 'Programming Language :: Python :: 3.10',
56
- 'Programming Language :: Python :: 3.11',
57
- 'Programming Language :: Python :: 3.12',
58
- 'Topic :: Software Development :: Libraries :: Python Modules',
59
- 'Topic :: Software Development :: Build Tools',
60
- 'Topic :: System :: Systems Administration',
61
- 'Topic :: Utilities',
62
- 'Topic :: Text Processing :: Linguistic',
63
- 'Environment :: Console',
64
- ],
65
- keywords='cli prompt optimization ai llm prompt-engineering patterns state-management',
66
- python_requires='>=3.8',
67
- zip_safe=False,
68
- )
1
+ from setuptools import setup, find_packages
2
+ from pathlib import Path
3
+
4
+ # Read README for long description
5
+ this_directory = Path(__file__).parent
6
+ long_description = (this_directory / "README.md").read_text(encoding='utf-8')
7
+
8
+ # Read requirements
9
+ requirements = (this_directory / "requirements.txt").read_text().strip().split('\n')
10
+
11
+ setup(
12
+ name='cliops',
13
+ version='1.0.4',
14
+ author='CliOps Development Team',
15
+ author_email='contact@cliops.dev',
16
+ description='Advanced CLI tool for structured, pattern-based prompt optimization and state management',
17
+ long_description=long_description,
18
+ long_description_content_type='text/markdown',
19
+ url='https://github.com/cliops/cliops',
20
+ project_urls={
21
+ 'Bug Reports': 'https://github.com/cliops/cliops/issues',
22
+ 'Source': 'https://github.com/cliops/cliops',
23
+ 'Documentation': 'https://cliops.readthedocs.io',
24
+ },
25
+ packages=find_packages(exclude=['tests*']),
26
+ py_modules=['main', 'presets'],
27
+ include_package_data=True,
28
+ install_requires=requirements,
29
+ extras_require={
30
+ 'dev': [
31
+ 'pytest>=7.0.0',
32
+ 'pytest-cov>=4.0.0',
33
+ 'black>=22.0.0',
34
+ 'flake8>=5.0.0',
35
+ ],
36
+ 'test': [
37
+ 'pytest>=7.0.0',
38
+ 'pytest-cov>=4.0.0',
39
+ ],
40
+ },
41
+ entry_points={
42
+ 'console_scripts': [
43
+ 'cliops=main:main',
44
+ ],
45
+ },
46
+
47
+ classifiers=[
48
+ 'Development Status :: 5 - Production/Stable',
49
+ 'Intended Audience :: Developers',
50
+ 'Intended Audience :: System Administrators',
51
+ 'License :: OSI Approved :: MIT License',
52
+ 'Operating System :: OS Independent',
53
+ 'Programming Language :: Python :: 3.8',
54
+ 'Programming Language :: Python :: 3.9',
55
+ 'Programming Language :: Python :: 3.10',
56
+ 'Programming Language :: Python :: 3.11',
57
+ 'Programming Language :: Python :: 3.12',
58
+ 'Topic :: Software Development :: Libraries :: Python Modules',
59
+ 'Topic :: Software Development :: Build Tools',
60
+ 'Topic :: System :: Systems Administration',
61
+ 'Topic :: Utilities',
62
+ 'Topic :: Text Processing :: Linguistic',
63
+ 'Environment :: Console',
64
+ ],
65
+ keywords='cli prompt optimization ai llm prompt-engineering patterns state-management',
66
+ python_requires='>=3.8',
67
+ zip_safe=False,
68
+ )
@@ -1,15 +0,0 @@
1
- import os
2
- import sys
3
- from pathlib import Path
4
-
5
- def add_to_path():
6
- """Add Python Scripts directory to PATH if not already present"""
7
- scripts_dir = Path(sys.executable).parent / "Scripts"
8
- current_path = os.environ.get('PATH', '')
9
-
10
- if str(scripts_dir) not in current_path:
11
- print(f"Add this to your PATH: {scripts_dir}")
12
- print("Or run: setx PATH \"%PATH%;{}\"".format(scripts_dir))
13
-
14
- if __name__ == "__main__":
15
- add_to_path()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes