Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tool commands #117

Merged
merged 3 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/gatsby-theme-iterative/config/prismjs/cml-commands.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = [
'ci',
'pr',
'publish',
'runner',
'send-comment',
'send-github-check',
'tensorboard-dev'
'pr',
'comment',
'check',
'workflow',
'tensorboard'
Comment on lines +4 to +8
Copy link
Contributor

@casperdcl casperdcl Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are subcommands meant to be included? If so...

Suggested change
'pr',
'comment',
'check',
'workflow',
'tensorboard'
'runner launch',
'pr',
'pr create',
'comment',
'comment create',
'comment update',
'check',
'check create',
'workflow',
'workflow rerun',
'tensorboard'
'tensorboard connect'

Also not sure if order is important, i.e.:

Suggested change
'pr',
'comment',
'check',
'workflow',
'tensorboard'
'runner launch',
'runner',
'pr create',
'pr',
'comment create',
'comment update',
'comment',
'check create',
'check',
'workflow rerun',
'workflow',
'tensorboard connect'
'tensorboard'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we would want subcommands as well to highlight them properly.
Can we do it organize the subcommands similarly to dvc.org (eg: dvc data status ) to ensure consistency and also it will provide better navigation on the sidebar?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike DVC, atm it doesn't make sense for CML subcommands to have separate pages.

i.e. https://dvc.org/doc/command-reference/exp/init and https://dvc.org/doc/command-reference/exp/run are big enough to be on separate pages, but https://cml.dev/doc/ref/comment#create and https://cml.dev/doc/ref/comment#update should be on the same page - trying to separate them would harm reader experience.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we ensure consistency, it will be picked up by the GHA automation.

create and update should be on the same page - trying to separate them would harm reader experience.

This seems to be a compromise we can work on(linking each other with a little more description) if we want to use the automation to generate the commands list upon addition.

In a long run, we want to have these commands listed on the consumer project themself instead of on the theme project (#134).

Copy link
Contributor

@casperdcl casperdcl Nov 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean by "the GHA automation" - can you provide a link to some code/logic?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR was generated by https://github.com/iterative/gatsby-theme-iterative/blob/main/.github/workflows/update-commands.yml.
The script basically gets all the commands from the sidebar.json from the respective tool's repository and updates the command list.

]
146 changes: 72 additions & 74 deletions packages/gatsby-theme-iterative/config/prismjs/dvc-commands.js
Original file line number Diff line number Diff line change
@@ -1,82 +1,80 @@
/* eslint-env node */

module.exports = [
'version',
'update',
'unprotect',
'unfreeze',
'tag',
'status',
'stage list',
'stage add',
'stage',
'run',
'root',
'repro',
'remove',
'remote rename',
'remote remove',
'remote modify',
'remote list',
'remote default',
'remote add',
'remote',
'queue stop',
'queue start',
'queue remove',
'queue logs',
'queue kill',
'queue',
'push',
'pull',
'pkg',
'plots show',
'plots modify',
'plots diff',
'plots',
'move',
'metrics show',
'metrics diff',
'metrics',
'params diff',
'params',
'list-url',
'ls-url',
'list',
'ls',
'install',
'init',
'import-url',
'import',
'help',
'get-url',
'get',
'gc',
'freeze',
'fetch',
'exp show',
'add',
'cache dir',
'cache',
'check-ignore',
'checkout',
'commit',
'config',
'dag',
'data status',
'data',
'destroy',
'diff',
'doctor',
'exp init',
'exp run',
'exp show',
'exp diff',
'exp list',
'exp apply',
'exp branch',
'exp remove',
'exp gc',
'exp push',
'exp pull',
'exp gc',
'exp diff',
'exp branch',
'exp apply',
'exp init',
'exp',
'fetch',
'freeze',
'gc',
'get-url',
'get',
'import-url',
'import',
'init',
'install',
'list-url',
'list',
'metrics show',
'metrics diff',
'metrics',
'move',
'params diff',
'params',
'plots show',
'plots diff',
'plots modify',
'plots templates',
'plots',
'pull',
'push',
'queue start',
'queue stop',
'queue status',
'queue logs',
'queue remove',
'queue kill',
'queue',
'remote add',
'remote modify',
'remote default',
'remote list',
'remote remove',
'remote rename',
'remote',
'remove',
'repro',
'root',
'run',
'stage add',
'stage list',
'stage',
'status',
'unfreeze',
'unprotect',
'update',
'version',
'experiments',
'doctor',
'diff',
'destroy',
'data status',
'data',
'dag',
'config',
'commit',
'checkout',
'check-ignore',
'cache dir',
'cache',
'add'
'ls-url',
'ls'
]
22 changes: 12 additions & 10 deletions packages/gatsby-theme-iterative/config/prismjs/mlem-commands.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
module.exports = [
'init',
'list',
'pprint',
'apply-remote',
'apply',
'build',
'checkenv',
'clone',
'declare',
'serve',
'deployment apply',
'deployment run',
'deployment status',
'deployment remove',
'deployment wait',
'deployment',
'types',
'link',
'clone',
'import',
'build',
'apply-remote',
'apply'
'init',
'link',
'pprint',
'serve',
'types',
'ls'
]