Repository: iterative/cml (JavaScript)

Issue:
Hide `cml comment <verb> --rm-watermark` option
As per https://github.com/iterative/cml/pull/1073#discussion_r960716284, the `--rm-watermark` option should be removed, or at least, hidden. Watermarks (#1076) are crucial for the proper operation of `cml comment update` and an option to disable them has no(little) practical use case.


Discussion:
@0x2b3bfa0 Should `--rm-watermark` be hidden on other commands, too (i.e. `tensorboard connect`, `asset publish`)?
On all the commands it appears, preferably
> On all the commands it appears, preferably

Was waiting for the CI to run so I could fix the formatting, but I think it should be good now!



Patch:
diff --git a/bin/cml/asset/publish.js b/bin/cml/asset/publish.js
index 1d09e12b8..fa07e165d 100644
--- a/bin/cml/asset/publish.js
+++ b/bin/cml/asset/publish.js
@@ -59,6 +59,7 @@ exports.options = kebabcaseKeys({
   rmWatermark: {
     type: 'boolean',
     description: 'Avoid CML watermark.',
+    hidden: true,
     telemetryData: 'name'
   },
   mimeType: {
diff --git a/bin/cml/comment/create.js b/bin/cml/comment/create.js
index 1c3d110f0..409b9df9c 100644
--- a/bin/cml/comment/create.js
+++ b/bin/cml/comment/create.js
@@ -66,6 +66,7 @@ exports.options = kebabcaseKeys({
     type: 'boolean',
     description:
       'Avoid watermark; CML needs a watermark to be able to distinguish CML comments from others',
+    hidden: true,
     telemetryData: 'name'
   }
 });
diff --git a/bin/cml/tensorboard/connect.js b/bin/cml/tensorboard/connect.js
index b0fac3c67..5f61f5469 100644
--- a/bin/cml/tensorboard/connect.js
+++ b/bin/cml/tensorboard/connect.js
@@ -145,6 +145,7 @@ exports.options = kebabcaseKeys({
   rmWatermark: {
     type: 'boolean',
     description: 'Avoid CML watermark',
+    hidden: true,
     telemetryData: 'name'
   }
 });


Test patch:
diff --git a/bin/cml/asset/publish.test.js b/bin/cml/asset/publish.test.js
index 0d130912d..f210666bf 100644
--- a/bin/cml/asset/publish.test.js
+++ b/bin/cml/asset/publish.test.js
@@ -20,12 +20,11 @@ describe('CML cli test', () => {
             --help    Show help                                              [boolean]
 
       Options:
-            --md            Output in markdown format [title || name](url)   [boolean]
-        -t, --title         Markdown title [title](url) or ![](url title)     [string]
-            --native        Uses driver's native capabilities to upload assets instead
-                            of CML's storage; not available on GitHub        [boolean]
-            --rm-watermark  Avoid CML watermark.                             [boolean]
-            --mime-type     MIME type [string] [default: infer from the file contents]"
+            --md         Output in markdown format [title || name](url)      [boolean]
+        -t, --title      Markdown title [title](url) or ![](url title)        [string]
+            --native     Uses driver's native capabilities to upload assets instead of
+                         CML's storage; not available on GitHub              [boolean]
+            --mime-type  MIME type    [string] [default: infer from the file contents]"
     `);
   });
 });
diff --git a/bin/cml/comment/create.test.js b/bin/cml/comment/create.test.js
index 681ae8b05..4e36101e2 100644
--- a/bin/cml/comment/create.test.js
+++ b/bin/cml/comment/create.test.js
@@ -30,9 +30,7 @@ describe('Comment integration tests', () => {
                                            [string] [default: \\"https://asset.cml.dev\\"]
         --publish-native, --native  Uses driver's native capabilities to upload assets
                                     instead of CML's storage; not available on GitHub
-                                                                             [boolean]
-        --rm-watermark              Avoid watermark; CML needs a watermark to be able
-                                    to distinguish CML comments from others  [boolean]"
+                                                                             [boolean]"
     `);
   });
 });
diff --git a/bin/cml/tensorboard/connect.test.js b/bin/cml/tensorboard/connect.test.js
index b6d23f9d1..66c332805 100644
--- a/bin/cml/tensorboard/connect.test.js
+++ b/bin/cml/tensorboard/connect.test.js
@@ -20,17 +20,16 @@ describe('CML e2e', () => {
             --help    Show help                                              [boolean]
 
       Options:
-        -c, --credentials   TensorBoard credentials as JSON, usually found at
-                            ~/.config/tensorboard/credentials/uploader-creds.json
+        -c, --credentials  TensorBoard credentials as JSON, usually found at
+                           ~/.config/tensorboard/credentials/uploader-creds.json
                                                                    [string] [required]
-            --logdir        Directory containing the logs to process          [string]
-            --name          Tensorboard experiment title; max 100 characters  [string]
-            --description   Tensorboard experiment description in Markdown format; max
-                            600 characters                                    [string]
-            --md            Output as markdown [title || name](url)          [boolean]
-        -t, --title         Markdown title, if not specified, param name will be used
-                                                                              [string]
-            --rm-watermark  Avoid CML watermark                              [boolean]"
+            --logdir       Directory containing the logs to process           [string]
+            --name         Tensorboard experiment title; max 100 characters   [string]
+            --description  Tensorboard experiment description in Markdown format; max
+                           600 characters                                     [string]
+            --md           Output as markdown [title || name](url)           [boolean]
+        -t, --title        Markdown title, if not specified, param name will be used
+                                                                              [string]"
     `);
   });
 });