cortexapps-cli 0.21.0__tar.gz → 0.23.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.
- {cortexapps_cli-0.21.0 → cortexapps_cli-0.23.0}/PKG-INFO +79 -27
- {cortexapps_cli-0.21.0 → cortexapps_cli-0.23.0}/README.rst +78 -26
- {cortexapps_cli-0.21.0 → cortexapps_cli-0.23.0}/pyproject.toml +1 -1
- {cortexapps_cli-0.21.0 → cortexapps_cli-0.23.0}/LICENSE +0 -0
- {cortexapps_cli-0.21.0 → cortexapps_cli-0.23.0}/cortexapps_cli/__init__.py +0 -0
- {cortexapps_cli-0.21.0 → cortexapps_cli-0.23.0}/cortexapps_cli/cortex.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cortexapps-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.0
|
|
4
4
|
Summary: Command Line Interface for cortexapps
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Cortex Apps
|
|
@@ -57,34 +57,10 @@ Using a python virtual environment:
|
|
|
57
57
|
homebrew
|
|
58
58
|
----------------------
|
|
59
59
|
|
|
60
|
-
The package will be published to homebrew in the future, but we need your help!
|
|
61
|
-
|
|
62
|
-
In order to be accepted to `homebrew-core <https://github.com/Homebrew/homebrew-core>`_, a repository has to be 'notable'. This
|
|
63
|
-
is determined by running an `audit <https://docs.brew.sh/Adding-Software-to-Homebrew#testing-and-auditing-the-formula>`_
|
|
64
|
-
of the homebrew formula. Currently, this results in the following:
|
|
65
|
-
|
|
66
|
-
.. code-block::
|
|
67
|
-
|
|
68
|
-
brew audit --strict --new-formula --online cortexapps-cli
|
|
69
|
-
cortexapps-cli
|
|
70
|
-
* GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)
|
|
71
|
-
Error: 1 problem in 1 formula detected.
|
|
72
|
-
|
|
73
|
-
Please help us by watching and starring https://github.com/cortexapps/cli. Once we're 'notable', we'll
|
|
74
|
-
throw a small party for ourselves and then submit a PR to homebrew-core.
|
|
75
|
-
|
|
76
|
-
Workaround for homebrew installation
|
|
77
|
-
------------------------------------
|
|
78
|
-
|
|
79
|
-
This is a temporary solution until we reach 'notable' status and get the formula added to `homebrew-core <https://github.com/Homebrew/homebrew-core>`_.
|
|
80
|
-
|
|
81
|
-
Run the following commands to download the homebrew formula from this repo into your local homebrew tap:
|
|
82
|
-
|
|
83
60
|
.. code:: bash
|
|
84
|
-
|
|
85
|
-
curl -L -H "Accept: application/vnd.github.VERSION.raw" -o $(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/c/cortexapps-cli.rb https://api.github.com/repos/cortexapps/cli/contents/homebrew/cortexapps-cli.rb
|
|
86
|
-
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source cortexapps-cli
|
|
87
61
|
|
|
62
|
+
brew tap cortexapps/tap
|
|
63
|
+
brew install cortexapps-cli
|
|
88
64
|
|
|
89
65
|
===================
|
|
90
66
|
Usage
|
|
@@ -400,6 +376,82 @@ assigns the environment attribute to the correct value and invokes the CLI with
|
|
|
400
376
|
cat /tmp/deploys.json | jq ".deployments[] | select (.uuid==\"${uuid}\") | del(.uuid) | .environment = \"PyPI.org\"" | cortex deploys update-by-uuid -t cli -u ${uuid} -f-
|
|
401
377
|
done
|
|
402
378
|
|
|
379
|
+
-----------------------------------------------------------------------------
|
|
380
|
+
Create a backup of all scorecards
|
|
381
|
+
-----------------------------------------------------------------------------
|
|
382
|
+
|
|
383
|
+
.. code:: bash
|
|
384
|
+
|
|
385
|
+
for tag in `cortex scorecards list | jq -r ".scorecards[].tag"`
|
|
386
|
+
do
|
|
387
|
+
echo "backing up: ${tag}"
|
|
388
|
+
cortex scorecards descriptor -t ${tag} > ${tag}.yaml
|
|
389
|
+
done
|
|
390
|
+
|
|
391
|
+
-----------------------------------------------------------------------------
|
|
392
|
+
Create a copy of all scorecards in draft mode
|
|
393
|
+
-----------------------------------------------------------------------------
|
|
394
|
+
|
|
395
|
+
This recipe creates a draft scorecard for all existing scorecards. It creates each scorecard with a suffix for the scorecard tag of "-draft"
|
|
396
|
+
and it appends " Draft" to the end of the existing title.
|
|
397
|
+
|
|
398
|
+
.. code:: bash
|
|
399
|
+
|
|
400
|
+
for tag in `cortex scorecards list | jq -r ".scorecards[].tag"`
|
|
401
|
+
do
|
|
402
|
+
cortex scorecards descriptor -t ${tag} | yq '.draft = true | .tag += "-draft" | .name += " Draft"' | cortex scorecards create -f-
|
|
403
|
+
done
|
|
404
|
+
|
|
405
|
+
-----------------------------------------------------------------------------
|
|
406
|
+
Replace scorecards with draft versions and delete the draft versions
|
|
407
|
+
-----------------------------------------------------------------------------
|
|
408
|
+
|
|
409
|
+
This recipe is a companion to the above recipe. This recipe will replace the versions from
|
|
410
|
+
which the drafts were created and delete the drafts.
|
|
411
|
+
|
|
412
|
+
.. code:: bash
|
|
413
|
+
|
|
414
|
+
for tag in `cortex scorecards list -s | jq -r ".scorecards[].tag" | grep "\-draft$"`
|
|
415
|
+
do
|
|
416
|
+
cortex scorecards descriptor -t ${tag} | yq '.draft = false | .tag |= sub("-draft","") | .name |= sub(" Draft", "")' | cortex scorecards create -f- && cortex scorecards delete -t ${tag}
|
|
417
|
+
done
|
|
418
|
+
|
|
419
|
+
-----------------------------------------------------------------------------
|
|
420
|
+
Get draft scorecards, change draft to false and save on disk
|
|
421
|
+
-----------------------------------------------------------------------------
|
|
422
|
+
|
|
423
|
+
This recipe is similar to the one above, but it does not create a new scorecard in Cortex. Rather, it makes the changes and saves to a file.
|
|
424
|
+
|
|
425
|
+
.. code:: bash
|
|
426
|
+
|
|
427
|
+
for tag in `cortex scorecards list -s | jq -r ".scorecards[].tag" | grep "\-draft$"`
|
|
428
|
+
do
|
|
429
|
+
cortex scorecards descriptor -t ${tag} | yq '.draft = false | .tag |= sub("-draft","") | .name |= sub(" Draft", "")' > ${tag}.yaml
|
|
430
|
+
done
|
|
431
|
+
|
|
432
|
+
-----------------------------------------------------------------------------
|
|
433
|
+
Delete all draft scorecards
|
|
434
|
+
-----------------------------------------------------------------------------
|
|
435
|
+
|
|
436
|
+
WARNING: This recipe will delete all draft scorecards.
|
|
437
|
+
|
|
438
|
+
.. code:: bash
|
|
439
|
+
|
|
440
|
+
for tag in `cortex scorecards list -s | jq -r ".scorecards[].tag"`
|
|
441
|
+
do
|
|
442
|
+
cortex scorecards delete -t ${tag}
|
|
443
|
+
done
|
|
444
|
+
|
|
445
|
+
If you only want to delete some drafts, for example if you followed a recipe that creates draft versions of all existing scorecards, you
|
|
446
|
+
will likely want to run this instead:
|
|
447
|
+
|
|
448
|
+
.. code:: bash
|
|
449
|
+
|
|
450
|
+
for tag in `cortex scorecards list -s | jq -r ".scorecards[].tag" | grep "\-draft$"`
|
|
451
|
+
do
|
|
452
|
+
cortex scorecards delete -t ${tag}
|
|
453
|
+
done
|
|
454
|
+
|
|
403
455
|
-----------------------------------------------------------------------------
|
|
404
456
|
Compare scorecard scores and levels for two scorecards
|
|
405
457
|
-----------------------------------------------------------------------------
|
|
@@ -36,34 +36,10 @@ Using a python virtual environment:
|
|
|
36
36
|
homebrew
|
|
37
37
|
----------------------
|
|
38
38
|
|
|
39
|
-
The package will be published to homebrew in the future, but we need your help!
|
|
40
|
-
|
|
41
|
-
In order to be accepted to `homebrew-core <https://github.com/Homebrew/homebrew-core>`_, a repository has to be 'notable'. This
|
|
42
|
-
is determined by running an `audit <https://docs.brew.sh/Adding-Software-to-Homebrew#testing-and-auditing-the-formula>`_
|
|
43
|
-
of the homebrew formula. Currently, this results in the following:
|
|
44
|
-
|
|
45
|
-
.. code-block::
|
|
46
|
-
|
|
47
|
-
brew audit --strict --new-formula --online cortexapps-cli
|
|
48
|
-
cortexapps-cli
|
|
49
|
-
* GitHub repository not notable enough (<30 forks, <30 watchers and <75 stars)
|
|
50
|
-
Error: 1 problem in 1 formula detected.
|
|
51
|
-
|
|
52
|
-
Please help us by watching and starring https://github.com/cortexapps/cli. Once we're 'notable', we'll
|
|
53
|
-
throw a small party for ourselves and then submit a PR to homebrew-core.
|
|
54
|
-
|
|
55
|
-
Workaround for homebrew installation
|
|
56
|
-
------------------------------------
|
|
57
|
-
|
|
58
|
-
This is a temporary solution until we reach 'notable' status and get the formula added to `homebrew-core <https://github.com/Homebrew/homebrew-core>`_.
|
|
59
|
-
|
|
60
|
-
Run the following commands to download the homebrew formula from this repo into your local homebrew tap:
|
|
61
|
-
|
|
62
39
|
.. code:: bash
|
|
63
|
-
|
|
64
|
-
curl -L -H "Accept: application/vnd.github.VERSION.raw" -o $(brew --repository)/Library/Taps/homebrew/homebrew-core/Formula/c/cortexapps-cli.rb https://api.github.com/repos/cortexapps/cli/contents/homebrew/cortexapps-cli.rb
|
|
65
|
-
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source cortexapps-cli
|
|
66
40
|
|
|
41
|
+
brew tap cortexapps/tap
|
|
42
|
+
brew install cortexapps-cli
|
|
67
43
|
|
|
68
44
|
===================
|
|
69
45
|
Usage
|
|
@@ -379,6 +355,82 @@ assigns the environment attribute to the correct value and invokes the CLI with
|
|
|
379
355
|
cat /tmp/deploys.json | jq ".deployments[] | select (.uuid==\"${uuid}\") | del(.uuid) | .environment = \"PyPI.org\"" | cortex deploys update-by-uuid -t cli -u ${uuid} -f-
|
|
380
356
|
done
|
|
381
357
|
|
|
358
|
+
-----------------------------------------------------------------------------
|
|
359
|
+
Create a backup of all scorecards
|
|
360
|
+
-----------------------------------------------------------------------------
|
|
361
|
+
|
|
362
|
+
.. code:: bash
|
|
363
|
+
|
|
364
|
+
for tag in `cortex scorecards list | jq -r ".scorecards[].tag"`
|
|
365
|
+
do
|
|
366
|
+
echo "backing up: ${tag}"
|
|
367
|
+
cortex scorecards descriptor -t ${tag} > ${tag}.yaml
|
|
368
|
+
done
|
|
369
|
+
|
|
370
|
+
-----------------------------------------------------------------------------
|
|
371
|
+
Create a copy of all scorecards in draft mode
|
|
372
|
+
-----------------------------------------------------------------------------
|
|
373
|
+
|
|
374
|
+
This recipe creates a draft scorecard for all existing scorecards. It creates each scorecard with a suffix for the scorecard tag of "-draft"
|
|
375
|
+
and it appends " Draft" to the end of the existing title.
|
|
376
|
+
|
|
377
|
+
.. code:: bash
|
|
378
|
+
|
|
379
|
+
for tag in `cortex scorecards list | jq -r ".scorecards[].tag"`
|
|
380
|
+
do
|
|
381
|
+
cortex scorecards descriptor -t ${tag} | yq '.draft = true | .tag += "-draft" | .name += " Draft"' | cortex scorecards create -f-
|
|
382
|
+
done
|
|
383
|
+
|
|
384
|
+
-----------------------------------------------------------------------------
|
|
385
|
+
Replace scorecards with draft versions and delete the draft versions
|
|
386
|
+
-----------------------------------------------------------------------------
|
|
387
|
+
|
|
388
|
+
This recipe is a companion to the above recipe. This recipe will replace the versions from
|
|
389
|
+
which the drafts were created and delete the drafts.
|
|
390
|
+
|
|
391
|
+
.. code:: bash
|
|
392
|
+
|
|
393
|
+
for tag in `cortex scorecards list -s | jq -r ".scorecards[].tag" | grep "\-draft$"`
|
|
394
|
+
do
|
|
395
|
+
cortex scorecards descriptor -t ${tag} | yq '.draft = false | .tag |= sub("-draft","") | .name |= sub(" Draft", "")' | cortex scorecards create -f- && cortex scorecards delete -t ${tag}
|
|
396
|
+
done
|
|
397
|
+
|
|
398
|
+
-----------------------------------------------------------------------------
|
|
399
|
+
Get draft scorecards, change draft to false and save on disk
|
|
400
|
+
-----------------------------------------------------------------------------
|
|
401
|
+
|
|
402
|
+
This recipe is similar to the one above, but it does not create a new scorecard in Cortex. Rather, it makes the changes and saves to a file.
|
|
403
|
+
|
|
404
|
+
.. code:: bash
|
|
405
|
+
|
|
406
|
+
for tag in `cortex scorecards list -s | jq -r ".scorecards[].tag" | grep "\-draft$"`
|
|
407
|
+
do
|
|
408
|
+
cortex scorecards descriptor -t ${tag} | yq '.draft = false | .tag |= sub("-draft","") | .name |= sub(" Draft", "")' > ${tag}.yaml
|
|
409
|
+
done
|
|
410
|
+
|
|
411
|
+
-----------------------------------------------------------------------------
|
|
412
|
+
Delete all draft scorecards
|
|
413
|
+
-----------------------------------------------------------------------------
|
|
414
|
+
|
|
415
|
+
WARNING: This recipe will delete all draft scorecards.
|
|
416
|
+
|
|
417
|
+
.. code:: bash
|
|
418
|
+
|
|
419
|
+
for tag in `cortex scorecards list -s | jq -r ".scorecards[].tag"`
|
|
420
|
+
do
|
|
421
|
+
cortex scorecards delete -t ${tag}
|
|
422
|
+
done
|
|
423
|
+
|
|
424
|
+
If you only want to delete some drafts, for example if you followed a recipe that creates draft versions of all existing scorecards, you
|
|
425
|
+
will likely want to run this instead:
|
|
426
|
+
|
|
427
|
+
.. code:: bash
|
|
428
|
+
|
|
429
|
+
for tag in `cortex scorecards list -s | jq -r ".scorecards[].tag" | grep "\-draft$"`
|
|
430
|
+
do
|
|
431
|
+
cortex scorecards delete -t ${tag}
|
|
432
|
+
done
|
|
433
|
+
|
|
382
434
|
-----------------------------------------------------------------------------
|
|
383
435
|
Compare scorecard scores and levels for two scorecards
|
|
384
436
|
-----------------------------------------------------------------------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|