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

♻️ Refactor need data post-processing #1018

Closed
wants to merge 3 commits into from

Conversation

chrisjsewell
Copy link
Member

@chrisjsewell chrisjsewell commented Sep 11, 2023

This PR moves the post-processing of needs data into a single event, which takes place before the write phase of Sphinx

In principle, this means that needs builders can bypass the entire write phase of the sphinx build.

However, there are currently two issues:

  1. If export_id is set on a directive, this requires filter data to also be output in the needs.json data, and this is only computed in the write stage
  2. contraints are currently not processed for "newly created" needs data (just tracking down where this happens, I guess for needextract)
  3. For needsuml builder, the data is only added in process_needuml

chrisjsewell added a commit that referenced this pull request Sep 11, 2023
Previously, the validity of needs data was tested by asserting for only specific keys and values.
This PR adds snapshot testing, with https://github.com/tophat/syrupy, to more fully capture the generated data.
This should help to better identify any regressions caused by future changes (such as #1018).
@danwos danwos mentioned this pull request Sep 21, 2023
2 tasks
@chrisjsewell
Copy link
Member Author

Closing as superceded by #1054

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.

1 participant