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

Spread tests for tutorial #39

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

javierdelapuente
Copy link
Collaborator

@javierdelapuente javierdelapuente commented Nov 25, 2024

Overview

This PR creates a testable tutorial, in a similar fashion as it is done in rockcraft and charmcraft, using spread and sphinx. For that, it uses two plugins in sphinx, one to parse Markdown and one to build into Markdown, so it should work with discourse.

The tutorial had to be adapted to use env variables instead of just place holders. The scripts used were copied from the project charmcraft.

As src-docs is not used in NetBox (as the code is really in paas-charm), the src-docs directory was reused for it.

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

license-eye has checked 1710 files.

Valid Invalid Ignored Fixed
12 7 1691 0
Click to see the invalid file list
  • charm/src-docs/Makefile
  • charm/src-docs/conf.py
  • charm/src-docs/make.bat
  • charm/src-docs/tutorial/code/getting-started/task.yaml
  • charm/tests/spread/lib/cloud-config.yaml
  • charm/tests/spread/lib/test-helpers.sh
  • charm/tests/spread/lib/tools/retry
Use this command to fix any missing license headers
```bash

docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix

</details>

charm/src-docs/Makefile Show resolved Hide resolved
charm/src-docs/conf.py Show resolved Hide resolved
charm/src-docs/make.bat Show resolved Hide resolved
charm/tests/spread/lib/cloud-config.yaml Show resolved Hide resolved
charm/tests/spread/lib/test-helpers.sh Show resolved Hide resolved
javierdelapuente and others added 8 commits November 25, 2024 08:49
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@javierdelapuente javierdelapuente added documentation Improvements or additions to documentation senior-review-required labels Nov 27, 2024
Copy link

@jdkandersson jdkandersson left a comment

Choose a reason for hiding this comment

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

I like the use of markdown instead of rst and it seems that we can include the code anyway so perhaps we use markdown at least in our docs?

@javierdelapuente
Copy link
Collaborator Author

I like the use of markdown instead of rst and it seems that we can include the code anyway so perhaps we use markdown at least in our docs?

I think if everything is displayed correctly in discourse (pending to see), we can use this for all our charms.

@javierdelapuente javierdelapuente marked this pull request as ready for review November 28, 2024 09:11
@javierdelapuente javierdelapuente requested a review from a team as a code owner November 28, 2024 09:11
Copy link
Contributor

Test coverage for 9deb09f

Name           Stmts   Miss Branch BrPart  Cover   Missing
----------------------------------------------------------
src/charm.py       7      1      2      1    78%   20
----------------------------------------------------------
TOTAL              7      1      2      1    78%

Static code analysis report

Run started:2024-11-29 16:01:42.344688

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 660
  Total lines skipped (#nosec): 1
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Copy link

@erinecon erinecon left a comment

Choose a reason for hiding this comment

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

Thanks for updating the tutorial and adding a spread test! The documentation changes look good to me 👍
(Not giving an official approval since code was also changed in this PR.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants