-
Notifications
You must be signed in to change notification settings - Fork 19
✨ Introduce needs-config-writer #283
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
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run //src:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
https://needs-config-writer.useblocks.com This greatly helps with distributed configs. Also dynamic and static configuration can be merged. And user of docs will get a ubproject.toml generated into their confdir. This is a declarative duplicate of all the dynamically generated Sphinx-Needs configuration. It makes it possible to use tools such as ubCode or ubc without any further setup.
51d2f07 to
66718df
Compare
|
We don't have a proper solution for storing such config files, so while I don't like it, it would be consistent to just write that file into each repository for now. But there is a scenario I really don't like here:
How about adding |

📌 Description
Introduction of
https://needs-config-writer.useblocks.com
This greatly helps with distributed configs for Sphinx-Needs and ubCode / ubc.
Also dynamic and static configuration can be merged.
Any user of the
docs()function will get a complete ubproject.toml generated into their confdir.This is a declarative duplicate of all the dynamically generated Sphinx-Needs configuration.
It makes it possible to use tools such as ubCode or ubc without any further setup.
Adding static shared configuration is also possible, see
shared.toml.This is also a nice mechanism to transpile the metadata.yaml to the Sphinx-Needs 6 schema validation.
Absolute bazel cache paths for needs.json or the path to the shared plantuml file are turned into relative paths that resolve once the documentation was built once.
Tested this manually for this repo (see ubproject.toml) and https://github.com/eclipse-score/score.
ubCode works code out-of-the box, even when needs.json dependencies are not there.
The generated files can be committed to git and maintained on every docs-as-code update that comes with config changes. This is the recommended way, as it enables users to use ubCode / ubc without ever running Bazel. It also works when switching between branches. The other option is to gitignore the file and generate it on the first run of
bazel run //:docs(or one of the otherbazel rundocs build commands).Screenshot of ubCode for the score docs with the declarative configuration:

🚨 Impact Analysis
✅ Checklist
The existing tests use the new extension and cover it.
I have seen the CI failing during development due to this, and fixed all issues.