-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Adds a file to hold a map from class/method to headerfile #58054
Conversation
Pretty cool! 🤩 |
Woo, many thanks! Is it possible to also have a link to the C++ API page? |
Not sure, I used an extension to show the link and it supports only one link. |
unrelated test failure |
I like the proposal. One thing that bother me is that the class map YAML files would be modified every time someone modifies the API. We have already the Qt5 and 6 sip files and all these generated files are not helping review. Could we just generate those files when needed ? meaning when documentation is generated? |
@troopa81 indeed it might be a bit too much traffic. Just thinking that since we have the headers installed this would be possible. I will give it a try. Or you rewrite sipify with clang-parser to we have this at build step only? 😁 |
This is not that trivial in the end
Possible solutions:
I'm not super happy with both approaches. One thing is that we could easily drop the Qt6 map file, that would lower the noise by 2. Would this be acceptable (done in the following commit)? |
@3nids Not sure to understand how exactly the process of building the documentation work but could we not generate the yaml files when we build the python binding instead of just installing them ? |
So calling sipify_all from cmake? I'm trying to avoid extra complexity in the building process of the Python docs (I would like to avoid maintaining a new workflow to actually compile QGIS to build the API docs). When you add a method to a header, then you get the same number of modified lines in the map file than the number of following non-private methods in the header (due to the modification of line number for the methods). Let's say we talk about ~5-10 lines changes. |
Another approach would be to run this on master branch only and automatically so we don't get any noise in the PRs. This would auto-commit on master and release branches. Basically the same workflow than the one I just merged here |
This reverts commit 972f483.
Is it that slow if we run sipify_all.sh to generate only those map files ? maybe only when installing ?
I would have prefer not to have another set of generated files in git but it might be a good middle ground regarding our actual doc workflow. Could it be done just after merge without mentioning anything in the PR? |
Yes it would be done in the branches only, so no traffic/noise in PRs. |
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.
Sounds good to me!
@troopa81 thanks. Let's go like this and we can still revisit the approach if we're not happy. |
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_34 release-3_34
# Navigate to the new working tree
cd .worktrees/backport-release-3_34
# Create a new branch
git switch --create backport-58054-to-release-3_34
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 02a6e27847d5628ab59a34da9b87d176ed02734d,9df54cca22b443af3e4dfe0248c82808768792b8,4f51d2e1f40eaa926130eed86cb8b4f6d5703ac2,7d2b4bb74e04f86904660f88ff0c4d9f25a3170d,dce64ab8601a4b4690be63005e78c08b513f3bfd,9f4b910d2e3b0226a16db0df4612d7c2f8cb2d3c,7b92924954236cb8555ebca9ee615cb7cc4a1e0a,751745ecada8b6d0230903290b3a1c9b0c8b5a44,46a18c1389319cd30ea8151779ed236b2f81849e,f1dd3eb8e6c78326967248438e42404045ecf623,78658fa9c10853dc6dcb9167cb0d0a6d1a29606d,f1c09ad3593b75be114b4bb4f6a4d66d3d0ed5ce,3767c9961523777b53ddf40bebbc5d2ee1ff9b1d,4bf2e17f3ff5b5b31f026bd0ae13b913832769b0
# Push it to GitHub
git push --set-upstream origin backport-58054-to-release-3_34
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_34 Then, create a pull request where the |
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-3_38 release-3_38
# Navigate to the new working tree
cd .worktrees/backport-release-3_38
# Create a new branch
git switch --create backport-58054-to-release-3_38
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 02a6e27847d5628ab59a34da9b87d176ed02734d,9df54cca22b443af3e4dfe0248c82808768792b8,4f51d2e1f40eaa926130eed86cb8b4f6d5703ac2,7d2b4bb74e04f86904660f88ff0c4d9f25a3170d,dce64ab8601a4b4690be63005e78c08b513f3bfd,9f4b910d2e3b0226a16db0df4612d7c2f8cb2d3c,7b92924954236cb8555ebca9ee615cb7cc4a1e0a,751745ecada8b6d0230903290b3a1c9b0c8b5a44,46a18c1389319cd30ea8151779ed236b2f81849e,f1dd3eb8e6c78326967248438e42404045ecf623,78658fa9c10853dc6dcb9167cb0d0a6d1a29606d,f1c09ad3593b75be114b4bb4f6a4d66d3d0ed5ce,3767c9961523777b53ddf40bebbc5d2ee1ff9b1d,4bf2e17f3ff5b5b31f026bd0ae13b913832769b0
# Push it to GitHub
git push --set-upstream origin backport-58054-to-release-3_38
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_38 Then, create a pull request where the |
* create map file for class / header files for PyQGIS API docs * create map files * install file * add line numbers * also add methods * wait to sort * more methods * fix CMakeLists install * fix sorting * fix spell check * remove map files for Qt6 * Revert "remove map files for Qt6" This reverts commit 972f483. * do not test class_map files + auto sipify_all on branches * fix warning
* create map file for class / header files for PyQGIS API docs * create map files * install file * add line numbers * also add methods * wait to sort * more methods * fix CMakeLists install * fix sorting * fix spell check * remove map files for Qt6 * Revert "remove map files for Qt6" This reverts commit 972f483. * do not test class_map files + auto sipify_all on branches * fix warning
* Adds a file to hold a map from class/method to headerfile (#58054) * create map file for class / header files for PyQGIS API docs * create map files * install file * add line numbers * also add methods * wait to sort * more methods * fix CMakeLists install * fix sorting * fix spell check * remove map files for Qt6 * Revert "remove map files for Qt6" This reverts commit 972f483. * do not test class_map files + auto sipify_all on branches * fix warning * fix sipify bot * fix warning * no error if nothing to commit
* Adds a file to hold a map from class/method to headerfile (#58054) * create map file for class / header files for PyQGIS API docs * create map files * install file * add line numbers * also add methods * wait to sort * more methods * fix CMakeLists install * fix sorting * fix spell check * remove map files for Qt6 * Revert "remove map files for Qt6" This reverts commit 972f483. * do not test class_map files + auto sipify_all on branches * fix warning * fix sipify bot * no error if nothing to commit
This is really useful, thank you! |
This file will allow us to have direct links from PyQGIS API docs to cpp header to allow direct editing.
This partially tackles qgis/pyqgis-api-docs-builder#37
Screen.Recording.2024-07-10.at.12.08.02.mov