cleepcli 1.40.0__tar.gz → 1.41.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.
- {cleepcli-1.40.0/cleepcli.egg-info → cleepcli-1.41.0}/PKG-INFO +1 -1
- {cleepcli-1.40.0 → cleepcli-1.41.0}/bin/ccli +3 -19
- {cleepcli-1.40.0 → cleepcli-1.41.0}/bin/cleep-cli +3 -19
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/ci.py +1 -1
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/docs.py +11 -3
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/version.py +1 -1
- {cleepcli-1.40.0 → cleepcli-1.41.0/cleepcli.egg-info}/PKG-INFO +1 -1
- {cleepcli-1.40.0 → cleepcli-1.41.0}/LICENSE +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/MANIFEST.in +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/README.md +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/__init__.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/check.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/cleepapi.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/config.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/console.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/file.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/git.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/module.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/package.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/test.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/tools.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli/watch.py +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli.egg-info/SOURCES.txt +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli.egg-info/dependency_links.txt +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli.egg-info/requires.txt +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/cleepcli.egg-info/top_level.txt +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/setup.cfg +0 -0
- {cleepcli-1.40.0 → cleepcli-1.41.0}/setup.py +0 -0
|
@@ -542,23 +542,6 @@ def moddoc(module):
|
|
|
542
542
|
logging.error(str(e))
|
|
543
543
|
sys.exit(1)
|
|
544
544
|
|
|
545
|
-
@docs.command()
|
|
546
|
-
@click.option('--module', callback=get_module_name, help='Module name.')
|
|
547
|
-
@click.option('--version', prompt="Module version", help='Module version.')
|
|
548
|
-
def moddoctest(module, version):
|
|
549
|
-
"""
|
|
550
|
-
Test
|
|
551
|
-
"""
|
|
552
|
-
try:
|
|
553
|
-
d = Docs()
|
|
554
|
-
docs = d.generate_module_docs(module)
|
|
555
|
-
res = d.publish_app_docs(module, version, docs)
|
|
556
|
-
except Exception as e:
|
|
557
|
-
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
|
|
558
|
-
logging.exception('Test module "%s" doc failed:' % module)
|
|
559
|
-
logging.error(str(e))
|
|
560
|
-
sys.exit(1)
|
|
561
|
-
|
|
562
545
|
@click.group()
|
|
563
546
|
def check():
|
|
564
547
|
pass
|
|
@@ -838,13 +821,14 @@ def cimodcheck(module):
|
|
|
838
821
|
@click.option('--version', prompt='Module version', help='Module version.')
|
|
839
822
|
@click.option('--ghtoken', prompt='Github access token', help='Github access token', default=None)
|
|
840
823
|
@click.option('--ghowner', prompt='Github repo owner', help='Github repo owner', default=None)
|
|
841
|
-
|
|
824
|
+
@click.option('--docfile', help='Already generated module doc', default=None, type=click.Path(exists=True))
|
|
825
|
+
def cimoddocpublish(module, version, ghtoken, ghowner, docfile):
|
|
842
826
|
"""
|
|
843
827
|
Publish module documentation to keep track of changes and detect breaking changes. Useful for CI
|
|
844
828
|
"""
|
|
845
829
|
d = Docs()
|
|
846
830
|
try:
|
|
847
|
-
d.publish_module_docs(module, version, ghtoken, ghowner)
|
|
831
|
+
d.publish_module_docs(module, version, ghtoken, ghowner, docfile)
|
|
848
832
|
except Exception as e:
|
|
849
833
|
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
|
|
850
834
|
logging.exception('Module doc publication failed:')
|
|
@@ -542,23 +542,6 @@ def moddoc(module):
|
|
|
542
542
|
logging.error(str(e))
|
|
543
543
|
sys.exit(1)
|
|
544
544
|
|
|
545
|
-
@docs.command()
|
|
546
|
-
@click.option('--module', callback=get_module_name, help='Module name.')
|
|
547
|
-
@click.option('--version', prompt="Module version", help='Module version.')
|
|
548
|
-
def moddoctest(module, version):
|
|
549
|
-
"""
|
|
550
|
-
Test
|
|
551
|
-
"""
|
|
552
|
-
try:
|
|
553
|
-
d = Docs()
|
|
554
|
-
docs = d.generate_module_docs(module)
|
|
555
|
-
res = d.publish_app_docs(module, version, docs)
|
|
556
|
-
except Exception as e:
|
|
557
|
-
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
|
|
558
|
-
logging.exception('Test module "%s" doc failed:' % module)
|
|
559
|
-
logging.error(str(e))
|
|
560
|
-
sys.exit(1)
|
|
561
|
-
|
|
562
545
|
@click.group()
|
|
563
546
|
def check():
|
|
564
547
|
pass
|
|
@@ -838,13 +821,14 @@ def cimodcheck(module):
|
|
|
838
821
|
@click.option('--version', prompt='Module version', help='Module version.')
|
|
839
822
|
@click.option('--ghtoken', prompt='Github access token', help='Github access token', default=None)
|
|
840
823
|
@click.option('--ghowner', prompt='Github repo owner', help='Github repo owner', default=None)
|
|
841
|
-
|
|
824
|
+
@click.option('--docfile', help='Already generated module doc', default=None, type=click.Path(exists=True))
|
|
825
|
+
def cimoddocpublish(module, version, ghtoken, ghowner, docfile):
|
|
842
826
|
"""
|
|
843
827
|
Publish module documentation to keep track of changes and detect breaking changes. Useful for CI
|
|
844
828
|
"""
|
|
845
829
|
d = Docs()
|
|
846
830
|
try:
|
|
847
|
-
d.publish_module_docs(module, version, ghtoken, ghowner)
|
|
831
|
+
d.publish_module_docs(module, version, ghtoken, ghowner, docfile)
|
|
848
832
|
except Exception as e:
|
|
849
833
|
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
|
|
850
834
|
logging.exception('Module doc publication failed:')
|
|
@@ -139,7 +139,7 @@ class Ci():
|
|
|
139
139
|
time.sleep(15)
|
|
140
140
|
|
|
141
141
|
# make sure to have latest modules.json version
|
|
142
|
-
self.logger.info('
|
|
142
|
+
self.logger.info(' Refreshing markets...')
|
|
143
143
|
resp = requests.post(self.CLEEP_COMMAND_URL, json={
|
|
144
144
|
'command': 'check_modules_updates',
|
|
145
145
|
'to': 'update',
|
|
@@ -190,6 +190,9 @@ if [ $? -ne 0 ]; then echo "Error occured"; exit 1; fi
|
|
|
190
190
|
|
|
191
191
|
Args:
|
|
192
192
|
module_name (string): module name
|
|
193
|
+
|
|
194
|
+
Returns:
|
|
195
|
+
object: documentation (json)
|
|
193
196
|
"""
|
|
194
197
|
if is_cleep_running():
|
|
195
198
|
return self.__generate_module_docs_by_api_call(module_name)
|
|
@@ -215,7 +218,7 @@ if [ $? -ne 0 ]; then echo "Error occured"; exit 1; fi
|
|
|
215
218
|
self.logger.debug("Resp: %s", resp)
|
|
216
219
|
|
|
217
220
|
if resp["returncode"] != 0:
|
|
218
|
-
self.logger.error("Unable to generate %s doc", module_name)
|
|
221
|
+
self.logger.error("Unable to generate %s doc: %s", module_name, resp)
|
|
219
222
|
raise Exception(f"Error occured generating {module_name} documentation")
|
|
220
223
|
|
|
221
224
|
return json.loads(''.join(resp["stdout"]))
|
|
@@ -341,7 +344,7 @@ if [ $? -ne 0 ]; then echo "Error occured"; exit 1; fi
|
|
|
341
344
|
|
|
342
345
|
return True
|
|
343
346
|
|
|
344
|
-
def publish_module_docs(self, module_name, module_version, github_token=None, github_owner=None):
|
|
347
|
+
def publish_module_docs(self, module_name, module_version, github_token=None, github_owner=None, doc_file=None):
|
|
345
348
|
"""
|
|
346
349
|
Publish application documentation on specified repo.
|
|
347
350
|
It publish both a tagged version and a latest version
|
|
@@ -351,6 +354,7 @@ if [ $? -ne 0 ]; then echo "Error occured"; exit 1; fi
|
|
|
351
354
|
module_version (str): module version (semver)
|
|
352
355
|
github_token (str): github access token (default None)
|
|
353
356
|
github_owner (str): github repo owner (default None)
|
|
357
|
+
doc_file (str): doc file path containing existing app documentation
|
|
354
358
|
|
|
355
359
|
Returns:
|
|
356
360
|
bool: True if publication succeed, False otherwise
|
|
@@ -364,7 +368,11 @@ if [ $? -ne 0 ]; then echo "Error occured"; exit 1; fi
|
|
|
364
368
|
if repo is None:
|
|
365
369
|
raise Exception("Unable to connect to app doc repository")
|
|
366
370
|
|
|
367
|
-
|
|
371
|
+
if doc_file:
|
|
372
|
+
with open(doc_file, "r") as doc:
|
|
373
|
+
documentation = json.load(doc)
|
|
374
|
+
else:
|
|
375
|
+
documentation = self.generate_module_docs(module_name)
|
|
368
376
|
|
|
369
377
|
try:
|
|
370
378
|
# latest doc file
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|