🐛 sphinx-needs: needs.json's schema block writes "default": [] for a link type with a literal default
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start in generate_needs_schema in needsfile.py, and read how #2205 writes the real default for derive_by_type link types so you can follow the same pattern for plain link types with a literal default. Find the tests that pin the needs.json schema output and add a case where a link type has default = ["REQ_1"]. Done when the schema block shows the literal default as sorted, deduplicated link strings, the changelog has a "(changed output)" line, and the ubCode twin matches.
Written by the indexing model from the issue text.
Description
What
generate_needs_schema (needsfile.py) writes "default": [] for every link type in the needs_schema block of needs.json, also for one declared with a literal default:
[needs.links.rel]
default = ["REQ_1"]
Each need that leaves rel unset holds ["REQ_1"], but the schema block says "default": [], so an importer reading the schema assumes the wrong value for an absent rel.
#2205 already writes the real default for a link type derived by type alone (derive_by_type without derive, where the default is the value of the need types without a rule), in the export's link order. Plain link types were left as they were to keep that PR's scope.
Proposal
Write a plain link type's literal default the same way (link strings, sorted and deduplicated as an exported link list), and pin it. This changes needs.json output for projects that give a link type a default, so it needs a changelog line marked "(changed output)", and the ubCode twin should match.
- Dominant language
- Python
- Stars
- 309
- Forks
- 103
- Avg merge
- 11h 26m
- Merged PRs (30d)
- 118
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from useblocks/sphinx-needs
-
documentation pkg: sphinx-needs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
useblocks/sphinx-needs#2255 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
useblocks/sphinx-needs#2253 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
useblocks/sphinx-needs#2251 ·
Maintainers usually reply within 1 day
-
bug pkg: sphinx-needs
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
useblocks/sphinx-needs#2249 ·
Maintainers usually reply within 1 day
-
documentation pkg: sphinx-test-reports
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
useblocks/sphinx-needs#2247 ·
Maintainers usually reply within 1 day
All issues in useblocks/sphinx-needs
Similar issues
-
Path subtraction removes repeated suffix characters instead of one suffixPossibly taken @Gwerdonatus claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
joke2k/django-environ#671 ·
-
good first issue help wanted windows
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
test_pgbouncer deploys the server under test from Charmhub instead of the local build (track/1.31)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
canonical/temporal-k8s-operator#195 · 1 comment ·
Maintainers usually reply within 4 days
-
`burr` fails to start when the Python path has a space in itPossibly taken @enekoreto claimed this today. Openstatus/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 5 days
-
device support request
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
zigpy/zha-device-handlers#5461 ·
Maintainers usually reply within 4 days