Skip to content

Commit 980f855

Browse files
authored
[ENHANCEMENT] New structure to be able to install it via pip
* New structure to be able to install it via pip * removing the version from the binary script * updated the module path in the tests as well.
1 parent f6cdf65 commit 980f855

File tree

22 files changed

+81
-16
lines changed

22 files changed

+81
-16
lines changed

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
*svn*
2+
*.ipynb
3+
*.pyc
4+
*.pyo
5+
.project
6+
.pydevproject
7+
*.swp
8+
*.swo
9+
build
10+
dist
11+
*.egg-info
12+
pip-wheel-metadata/
13+
.settings
14+
*.wpr
15+
*.wpu
16+
.idea
17+
.coverage
18+
cover
19+
.DS_Store
20+
*,cover
21+
tags
22+
.pytest_cache
23+
.venv
24+
25+
#VScode
26+
.vscode/

bin/crhc-cli

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env python
2+
import os
3+
4+
project_dir = os.path.dirname(os.path.dirname(__file__))
5+
os.sys.path.append(project_dir)
6+
7+
from crhc_cli import crhc
8+
crhc.parse.main_menu()

conf/__init__.py

Whitespace-only changes.

credential/__init__.py

Whitespace-only changes.

conf/conf.py renamed to crhc_cli/conf/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@
4848

4949
# Items per page when doing the API call
5050
ITEMS_PER_PAGE = 50
51+
5152
# Ansible has a max limit of 25 Items per page when doing the API call
5253
ANSIBLE_ITEMS_PER_PAGE = 25
File renamed without changes.
File renamed without changes.

crhc.py renamed to crhc_cli/crhc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
console.redhat.com (Inventory, Subscription and much more)
77
"""
88

9-
from parse import parse
9+
from crhc_cli.parse import parse
1010

1111
if __name__ == "__main__":
1212
parse.main_menu()

execution/execution.py renamed to crhc_cli/execution/execution.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
import time
1515
import requests
1616
import datetime
17-
from report import report
18-
from credential import token
19-
from conf import conf
17+
from crhc_cli.report import report
18+
from crhc_cli.credential import token
19+
from crhc_cli.conf import conf
2020

2121
# FIELDS_TO_RETRIEVE = "?fields[system_profile]=number_of_sockets"
2222
FIELDS_TO_RETRIEVE = ""
File renamed without changes.

0 commit comments

Comments
 (0)