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

Automatic validation of shell commands in docs #2479

Closed
cptartur opened this issue Sep 17, 2024 · 0 comments · Fixed by #2660
Closed

Automatic validation of shell commands in docs #2479

cptartur opened this issue Sep 17, 2024 · 0 comments · Fixed by #2660
Assignees
Labels
design-doc documentation Improvements or additions to documentation

Comments

@cptartur
Copy link
Member

cptartur commented Sep 17, 2024

Which components does the task require to be changed? (think hard pls)

snforge, sncast

Description

Right now, we do not have any mechanism for validating if shell commands (e.g. calls to snforge test etc) in docs are up to date and correct. We should ensure that any command that user can copy from the documentation works and behaves as described.

We should introduce a mechanism to validate if outputs included in the documentation match these produced by the real program.

@cptartur cptartur added the documentation Improvements or additions to documentation label Sep 17, 2024
@github-actions github-actions bot added the new label Sep 17, 2024
@cptartur cptartur removed the new label Sep 17, 2024
@cptartur cptartur changed the title Ensure shell commands in docs are correct and outputs are valid Automatic validation of shell commands in docs Sep 23, 2024
@cptartur cptartur added feature New feature request/description design-doc and removed feature New feature request/description labels Sep 23, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 13, 2024
<!-- Reference any GitHub issues resolved by this PR -->

Relates #2479 

## Introduced changes

Update command snippets in docs:
- Added JS script which removes `$` from copied command snippet
- Split the way that output is an expandable block, by default it's
expanded

Before:
<img width="795" alt="image"
src="https://github.com/user-attachments/assets/1b04f488-e483-415f-a390-a1b76ee6e75e">

After:

![image](https://github.com/user-attachments/assets/452c8e0e-7739-415c-825e-545e7c002cbd)



## Checklist

<!-- Make sure all of these are complete -->

- [x] Linked relevant issue
- [x] Updated relevant documentation
- [x] Added relevant tests
- [x] Performed self-review of the code
- [x] Added changes to `CHANGELOG.md`
github-merge-queue bot pushed a commit that referenced this issue Nov 19, 2024
<!-- Reference any GitHub issues resolved by this PR -->

Closes #2479 

## Introduced changes

- Validate snforge and sncast shell snippets syntax in the docs
- Fix docs snippets which are invalid/outdated

## Checklist

<!-- Make sure all of these are complete -->

- [x] Linked relevant issue
- [x] Updated relevant documentation
- [x] Added relevant tests
- [x] Performed self-review of the code
- [x] Added changes to `CHANGELOG.md`
@github-project-automation github-project-automation bot moved this from In Progress to Done in Starknet foundry Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-doc documentation Improvements or additions to documentation
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants