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 wiki that lists packages by category #1320

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

sara-rn
Copy link
Contributor

@sara-rn sara-rn commented Feb 28, 2025

Update the script that generates the wiki with the list of packages by category. The new nuspec packages now contain the category even if it is not used to prevent packages from being uncategorized.

Resolves #1107

@sara-rn sara-rn self-assigned this Feb 28, 2025
@sara-rn
Copy link
Contributor Author

sara-rn commented Feb 28, 2025

There is a formatting issue due to the description of the metapackage vcbuildtools.vm addressed in #1319

@sara-rn sara-rn force-pushed the update-wiki-categories branch 2 times, most recently from 7f53e30 to 1d2e148 Compare February 28, 2025 16:33
@sara-rn sara-rn requested a review from Ana06 March 3, 2025 11:14
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

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

@sara-rn the current script contains code to handle non categorized packages and handle errors that can't happen now that we have moved the category to the nuspec. This should be removed to simplify the code making it easier to understand. @sara-rn note that @emtuls first version of the script was a proof of concept and there may be issues with it. Finishing this GH action is part of #1107

I recomend you rewrite the script to generate the wiki in Python as the rest of our scripts, allowing us to keep them consistent and to reuse code. The code would be IMO also simpler and easier to modify and review. See for example https://github.com/mandiant/VM-Packages/blob/main/scripts/utils/generate_daily_results.py for another script that creates the wiki page. The linter is a good example to parse nuspec files.

@sara-rn sara-rn force-pushed the update-wiki-categories branch 12 times, most recently from 59f4d26 to 1618379 Compare March 4, 2025 22:35
@sara-rn sara-rn requested a review from Ana06 March 4, 2025 22:37
@sara-rn
Copy link
Contributor Author

sara-rn commented Mar 4, 2025

added the python script in a separate commit just in case, I haven't deleted the Powershell script yet
example of the wiki: https://github.com/sara-rn/VM-Packages/wiki/Packages

Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

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

can you please run the following Python linters/formatters so that we do not have to discuss format/style in the PR review:

black --line-length=120
flake8 --max-line-length=150
isort --profile black --line-length=120

I plan to enable these linters in our CI as I have done in FLARE-VM: https://github.com/mandiant/flare-vm/blob/main/.github/workflows/linter.yml I was waiting for #1261, but we may want to enable it already if that PR gets long to complete.

You can remove the PS script, the Python script goes in the right direction.

@sara-rn sara-rn force-pushed the update-wiki-categories branch 2 times, most recently from 3e3e424 to c4d6693 Compare March 6, 2025 11:47
@sara-rn sara-rn requested a review from Ana06 March 6, 2025 13:59
@sara-rn
Copy link
Contributor Author

sara-rn commented Mar 6, 2025

@Ana06 wiki in my local repo https://github.com/sara-rn/VM-Packages/wiki/Packages

@sara-rn sara-rn force-pushed the update-wiki-categories branch from c4d6693 to 2280f31 Compare March 6, 2025 14:43
@sara-rn sara-rn force-pushed the update-wiki-categories branch 2 times, most recently from 5293ab9 to c410abb Compare March 7, 2025 16:59
@sara-rn sara-rn requested a review from Ana06 March 7, 2025 17:04
@sara-rn sara-rn force-pushed the update-wiki-categories branch from d32c6c7 to 62e0f8b Compare March 10, 2025 10:38
@sara-rn sara-rn requested a review from Ana06 March 10, 2025 11:05
@sara-rn sara-rn force-pushed the update-wiki-categories branch 2 times, most recently from 267677f to a884eb0 Compare March 10, 2025 11:23
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

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

This looks good @sara-rn, just some minor improvement suggestion 😉

@sara-rn sara-rn force-pushed the update-wiki-categories branch from d4966a6 to e219376 Compare March 12, 2025 09:04
@sara-rn sara-rn requested a review from Ana06 March 12, 2025 09:18
Adapt the github action to trigger the Python script
@sara-rn sara-rn force-pushed the update-wiki-categories branch from b68dd1f to 0869853 Compare March 12, 2025 11:49
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

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

Nice code @sara-rn, simple and well documented, easy to understand and maintain! 💐 Looking forward triggering the action! 🚀

@Ana06 Ana06 merged commit 32cacc3 into mandiant:main Mar 12, 2025
4 checks passed
@sara-rn sara-rn deleted the update-wiki-categories branch March 13, 2025 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move the categories to the nuspec & Add wiki page with tools by categories
2 participants