Skip to content

Disable auto updating of docs/doxygen/GeosxConfig.hpp #2602

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

Merged
merged 4 commits into from
Dec 9, 2023

Conversation

klevzoff
Copy link
Contributor

@klevzoff klevzoff commented Jul 26, 2023

This PR adds an explicit target for updating docs/doxygen/GeosxConfig.hpp, and disables auto updating. No more diffs on every system. The file will be updated manually once in a while.

Drive-by cleanup of some version-related stuff (mainly just to unify hypre version printout with the rest; also add petsc/trilinos versions).

Originally I was hoping to move TPL version macros from GeosxConfig.hpp to GeosxVersion.hpp, but that doesn't work since the latter is generated at build time, not cmake time, so all those CMake version variables are not available to it.

if("${header_file}" MATCHES "HYPRE_DEVELOP_BRANCH *\"([^\"]*)\"")
set(hypre_dev_branch "${CMAKE_MATCH_1}")
endif()
set(hypre_VERSION "${hypre_dev_string} (${hypre_dev_branch})" CACHE STRING "" FORCE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it useful to know the name of the branch associated with the commit hash. HYPRE_BRANCH_NAME provides that info. Should it be added here? PS: very nice organization work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@victorapm I think I just took the macros that we used to print out in HypreInterface::initialize() and moved them to CMake-time for consistency with other dependecies. HYPRE_DEVELOP_STRING and HYPRE_DEVELOP_BRANCH are the ones we used to print. Should I replace HYPRE_DEVELOP_BRANCH with HYPRE_BRANCH_NAME? What is the difference between the two?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good! HYPRE_BRANCH_NAME gives the name of the branch that a particular commit belongs to, HYPRE_DEVELOP_BRANCH gives the name of the main development branch in hypre (master). So the first is more general and should be the preferable choice.

Lastly, I think you are aware but just mentioning here: these macros are only defined when building hypre from directory that has been cloned from git, so they don't exist for hypre tarballs downloaded from git or releases

@klevzoff klevzoff force-pushed the cleanup/klevzoff/geos-config-for-doxygen branch 2 times, most recently from 7467a53 to 1e06d70 Compare July 27, 2023 07:55
@TotoGaz TotoGaz mentioned this pull request Aug 7, 2023
3 tasks
Comment on lines -81 to -83
configure_file( ${CMAKE_SOURCE_DIR}/coreComponents/common/GeosxConfig.hpp.in
${CMAKE_SOURCE_DIR}/docs/doxygen/GeosxConfig.hpp )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The status after this patch would be that we'll end up with the out of date information.
This may not be what we want either.

I wonder if the simplest answer to this hassle is to generate GeosxConfig.hpp from GeosxConfig.hpp.in (like we're doing), but in the generatedSrc and not in the sources (I think) folder.
So it's not committed but up-to-date for all the builds.

That looks to me like a sensible thing to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal of generating this file is for it to be accessible in readthedocs environment where doxygen docs are built and where we don't have a full-fledged build environment to run cmake in. It has to be committed to the repo, that's the whole point. Otherwise we are already generating one under build/include/common/GeosxConfig.hpp, it would do the job perfectly if only we could do it on readthedocs.

Yes, it will go out of date, but it only affects what the user sees when they browse doxygen online, it's not a big deal. Once in a while I will push an updated version, but even if I don't, not much harm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file could also be an artefact from the ci where the cmake environment is set. Either used by a documentation target either another pipeline. See draft idea #2603

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it will go out of date, but it only affects what the user sees when they browse doxygen online, it's not a big deal. Once in a while I will push an updated version, but even if I don't, not much harm.

If we need to commit/push once in a while, what's the benefit w.r.t. directly editing readthedocs (which can even be done in the web ui, no need to tweak anything in your own computer)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need to commit/push once in a while, what's the benefit w.r.t. directly editing readthedocs (which can even be done in the web ui, no need to tweak anything in your own computer)?

Would actually be nice if that page was built from the config file, but it's not (and it's severely out of date at this point 😆). GeosxConfig.hpp only shows up here, but its presence makes all #includes of it in the source clickable and lets users read the "documentation" of each macro. It's just a fairly small convenience.

@klevzoff klevzoff force-pushed the cleanup/klevzoff/geos-config-for-doxygen branch from 1e06d70 to eae5635 Compare October 8, 2023 01:49
@paveltomin
Copy link
Contributor

it this PR stuck or there is a chance to merge it?

@klevzoff
Copy link
Contributor Author

klevzoff commented Dec 1, 2023

it this PR stuck or there is a chance to merge it?

Just needs an approval from @rrsettgast

@@ -164,6 +155,15 @@
/// Version information for suitesparse
#cmakedefine suitesparse_VERSION @suitesparse_VERSION@

/// Version information for hypre
#cmakedefine hypre_VERSION @hypre_VERSION@
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this give equivalent information as was done by the removed code in HypreInterface.cpp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's taken from the same hypre macros, the only difference is it's now extracted at config-time rather than compile-time.

@klevzoff klevzoff added the ci: run CUDA builds Allows to triggers (costly) CUDA jobs label Dec 2, 2023
@klevzoff klevzoff added the flag: no rebaseline Does not require rebaseline label Dec 9, 2023
@TotoGaz TotoGaz merged commit f079bca into develop Dec 9, 2023
@TotoGaz TotoGaz deleted the cleanup/klevzoff/geos-config-for-doxygen branch December 9, 2023 03:51
ouassimkh pushed a commit that referenced this pull request Feb 16, 2024
… updating. Cleanup some version stuff. (#2602)

This PR adds an explicit target for updating docs/doxygen/GeosxConfig.hpp, and disables auto updating. No more diffs on every system. The file will be updated manually once in a while.

Drive-by cleanup of some version-related stuff (mainly just to unify hypre version printout with the rest; also add petsc/trilinos versions).

Originally I was hoping to move TPL version macros from GeosxConfig.hpp to GeosxVersion.hpp, but that doesn't work since the latter is generated at build time, not cmake time, so all those CMake version variables are not available to it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run CUDA builds Allows to triggers (costly) CUDA jobs flag: no rebaseline Does not require rebaseline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants