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

DOCS-3430: Add viam machines part cp command #3905

Merged
merged 7 commits into from
Jan 24, 2025

Conversation

npentrel
Copy link
Collaborator

No description provided.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label Jan 23, 2025
Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit 9bb8c57
🔍 Latest deploy log https://app.netlify.com/sites/viam-docs/deploys/6793e56213193f00089a7833
😎 Deploy Preview https://deploy-preview-3905--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 28 (🟢 up 4 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 92 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

docs/dev/tools/cli.md Outdated Show resolved Hide resolved
docs/dev/tools/cli.md Outdated Show resolved Hide resolved
@@ -1190,6 +1191,24 @@ viam.service.vision.v1.VisionService.GetClassificationsFromCamera

# restart a part of a specified machine
viam machines part restart --machine=123 --part=456

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason these examples use a space and not an = like the other examples in this code block? Seems they should be consistent with above as well as with the template where you have =<> if both work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed

@@ -1201,7 +1220,7 @@ viam machines part restart --machine=123 --part=456
| `api-key` | Work with an api-key for your machine | `create` (see [positional arguments: api-key](#positional-arguments-api-key)) |
| `status` | Retrieve machine status for a specified machine | - |
| `logs` | Retrieve logs for a specified machine | - |
| `part` | Manage a specified machine part | `status`, `run`, `logs`, `shell`, `restart` (see [positional arguments: part](#positional-arguments-part)) |
| `part` | Manage a specified machine part | `status`, `run`, `logs`, `shell`, `restart` (see [positional arguments: part](#positional-arguments-part)), `cp` |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
| `part` | Manage a specified machine part | `status`, `run`, `logs`, `shell`, `restart` (see [positional arguments: part](#positional-arguments-part)), `cp` |
| `part` | Manage a specified machine part | `status`, `run`, `logs`, `shell`, `restart`, `cp` (see [positional arguments: part](#positional-arguments-part)) |

I think? And cp should be added to positional args: part?

@@ -1190,6 +1191,24 @@ viam.service.vision.v1.VisionService.GetClassificationsFromCamera

# restart a part of a specified machine
viam machines part restart --machine=123 --part=456

# Copy a single file to the machine with a new name:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds ambiguous as to whether it's the same machine name or file name or directory name. Same comment on the two below.

viam machine part cp --organization "org" --location "location" --machine "m1" --part "m1-main" my_file machine:/home/user/

# Recursively copy a directory to the machine with the same name:
viam machine part cp --part "m1-main" -r my_dir machine:/home/user/
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you're using a part name instead of a part ID, per the Slack thread don't you need to pass organization and location? Maybe just make all of these IDs instead of names?

docs/dev/tools/cli.md Outdated Show resolved Hide resolved
@viambot
Copy link
Member

viambot commented Jan 23, 2025

You can view a rendered version of the docs from this PR at https://docs-test.viam.dev/3905

Copy link
Collaborator

@JessamyT JessamyT left a comment

Choose a reason for hiding this comment

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

LGTM % 2 little fixes

docs/dev/tools/cli.md Outdated Show resolved Hide resolved
@@ -1247,6 +1267,8 @@ viam machines part restart --machine=123 --part=456
| `--machine-id` | The machine to create an API key for | `api-key` | **Required** |
| `--name` | The optional name of the API key | `api-key` | Optional |
| `--org-id` | The optional organization ID to attach the key to | `api-key` | Optional |
| `--recursive`, `-r` | Preserve modification times and file mode bits from the source files. Default: `false`. | `part cp` | Optional |
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like these two descriptions are swapped

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good spot

docs/dev/tools/cli.md Outdated Show resolved Hide resolved
@npentrel npentrel merged commit 3eb31c8 into viamrobotics:main Jan 24, 2025
12 checks passed
@npentrel npentrel deleted the DOCS-3430 branch January 24, 2025 19:24
Copy link

🔎💬 Inkeep AI search and chat service is syncing content for source 'Viam Docs (https://docs.viam.com)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to build This pull request is marked safe to build from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants