-
Notifications
You must be signed in to change notification settings - Fork 85
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
Handle historical Qiskit versions with GitHub source links #647
Conversation
|
||
let slug: string; | ||
let version: string; | ||
if ( |
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.
Matt T reviewed the if
statements to make sure this covers all the import paths.
} | ||
} | ||
|
||
const QISKIT_METAPACKAGE_TO_TERRA = new Map([ |
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.
These versions come from https://docs.quantum.ibm.com/api/qiskit/release-notes/0.44. I double checked them and tried to be careful - I don't think you need to spend the time rechecking.
return (fileName) => | ||
determineHistoricalQiskitGithubUrl( | ||
this.versionWithoutPatch, | ||
normalizeFile(fileName), | ||
); |
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 pattern is really neat. We're using partial application. We want to return a function (string) => string
, but we need to pass in the extra argument metapackageVersion
for it to work.
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 use of the partial application! This will unblock the regeneration of the historical versions, and later the ibm.com redirects. I tested it locally and triple-checked the versions in the package map, and all looks good to me.
Part of Qiskit#454. Historical versions of Qiskit docs are tricky because of qiskit-metapackage referring to multiple distinct GitHub repositories.
Part of #454. Historical versions of Qiskit docs are tricky because of qiskit-metapackage referring to multiple distinct GitHub repositories.