-
Notifications
You must be signed in to change notification settings - Fork 87
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
Don't delete API docs for class aliases #815
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated output looks good!
I have a couple of non-blocking questions.
const unsortedMembers = resultsWithName.filter( | ||
(result) => | ||
includes(["method", "property", "attribute"], result.meta.apiType) && | ||
result.meta.apiName?.startsWith(`${clazz.meta.apiName}.`), | ||
); | ||
unsortedMembers.forEach((result) => mergedMemberUrls.add(result.url)); | ||
const members = orderBy(unsortedMembers, (result) => result.meta.apiName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice code, I find this new form a lot easier to read.
To check I understand: The logic change is we're no longer adding function
API types to members
, and we're keeping track of which members have been merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. I don't know why we were looking for functions
before - they never are members of a class. In practice, it made no difference if we included them or not.
// remove merged results | ||
const finalResults = reject(results, (result) => | ||
includes(["method", "attribute", "property"], result.meta.apiType), | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where the pages were being deleted because we were assuming certain apiType
s were merged. Now we just check if they're in mergedMemberUrls
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly.
Part of Qiskit#814. We shouldn't be deleting attribute pages if they don't correspond to an owning class. This PR also runs `npm run regen-apis`; as shown, this PR's logic change only impacts Qiskit v1 docs.
Part of #814. We shouldn't be deleting attribute pages if they don't correspond to an owning class.
This PR also runs
npm run regen-apis
; as shown, this PR's logic change only impacts Qiskit v1 docs.