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

issue #7395 Improvement of layout of model relations #7576

Merged
merged 13 commits into from
Sep 7, 2023

Conversation

albert-github
Copy link
Contributor

Consistent implementation for the AABB_tree in respect to Has Model and Is Model Of

Consistent implementation for the `AABB_tree` in respect to `Has Model` and `Is Model Of`
@sloriot
Copy link
Member

sloriot commented Jul 5, 2023

/build:v0

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/7576/v0/Manual/index.html

@sloriot
Copy link
Member

sloriot commented Jul 5, 2023

Screenshot from 2023-07-05 13-38-13
Looks good to me!

@sloriot
Copy link
Member

sloriot commented Jul 5, 2023

Maybe to be consistent with See also, it should be Has models since we cannot change See also.

@lrineau lrineau linked an issue Jul 5, 2023 that may be closed by this pull request
@albert-github
Copy link
Contributor Author

#7576 (comment)
I agree, but I just copied the term as it was, It also accounts for "Is Model Of" this probably should go the "Is model of"

There are probably a few, unrelated, others as well like:

  • Windows Demo
  • Common Demo
  • Optional Named Parameters
  • Classified Reference Pages

- Completed the cgalHasModel part
- corrected spelling of `Has Model` and `Is Model Of` to `Has model` and `Is model of`
albert-github added a commit to albert-github/cgal that referenced this pull request Jul 9, 2023
Based on a remark in CGAL#7576 (comment) aslo changed here some names for consistency
# Conflicts:
#	Polyhedron/doc/Polyhedron/Concepts/PolyhedronItems_3.h
@albert-github
Copy link
Contributor Author

@sloriot @lrineau

Due to the new pull requests that were integrated into master this PR had a small problem building the documentation as it had merge conflicts (see https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/ and in particular https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/CGAL-6.0-Ic-22/logs1/Polyhedron.log).
This is not problem, though this merge conflict is not always noted, directly, by the author of the PR.

In the build sequence I see there is a "CMake Test Merge Branch / build (pull_request)" and I think during the overnight documentation build this is also run. When there is a merge conflict would it be possible to place a new comment with the PR as the submitter of the PR is normally notified of new comments and can take actions.

\cgalHasModel `CGAL::Polyhedron_items_3`
\cgalHasModel `CGAL::Polyhedron_min_items_3`
\cgalHasModel `CGAL::Polyhedron_items_with_id_3`
\cgalHasModelsBegin CGAL::Polyhedron_items_3
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
\cgalHasModelsBegin CGAL::Polyhedron_items_3
\cgalHasModelsBegin
\cgalHasModels CGAL::Polyhedron_items_3

Copy link
Member

Choose a reason for hiding this comment

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

(note that there are many such occurrences.)

Copy link
Member

Choose a reason for hiding this comment

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

that's what I noticed but then I don't understand these warnings: https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/CGAL-6.0-Ic-22/logs1/Polyhedron.log

Copy link
Contributor Author

@albert-github albert-github Jul 13, 2023

Choose a reason for hiding this comment

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

The problem noted in the overnight build was due to the fact that there was a merge conflict.
(Note the difference cgalHasModel versus cgalHasModels (so with s).
I think the overnight build error should be gone due to the merge I did.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was my first idea as well, but I had problems here regarding an extra empty line in the output due to the fact that we get an extra field (and thus extra unwanted empty space):
image

Here you see my implementation and the suggested change.

With the knowledge I now have, I think it would be possible to define:

                         "cgalHasModelsBegin=<dl><dt>@cgalHasModelsHeader</dt><dd>" \
                         "cgalHasModels{1}=<dt></dt><dd>`\1`</dd>" \
                         "cgalHasModels{2}=<dt></dt><dd>`\1,\2`</dd>" \
                         "cgalHasModelsEnd=</dl>" \

in case of

CGAL::Surface_mesh_shortest_path_traits<K,P>

this would also give the good results.

There are also some long model names like:

CGAL::Nonnegative_linear_program_from_iterators<A_it, B_it, R_it, FL_it, L_it, FU_it, U_it, D_it, C_it>

but this would use the cgalHasModels{1} as fallback.
Actually I'm not a fan of this fallback as it makes things less clear.

The initial idea I had was that the cgalHasModels would contain all the models for the list (like with cgalModels) and than the fallback would not work anymore.

In the mean time I also created a proposed pull request in doxygen (doxygen/doxygen#10179) that makes it possible to define a separator, so at that moment the fallback would not even be necessary anymore when we use as separator e.g. ;.

Conclusion I should probably rework the cgalHasModels part, using the {1} construct and the "fallback".
(I, probably, will have a look at it during the weekend).

@albert-github albert-github marked this pull request as draft July 18, 2023 09:51
Corrected `cgalModels` to `cgalHasModes` inside `cgalHasNodelsBegin` / `cgalHasModelsEnd`
@albert-github albert-github marked this pull request as ready for review July 18, 2023 11:32
@sloriot
Copy link
Member

sloriot commented Jul 19, 2023

@albert-github
Copy link
Contributor Author

albert-github commented Jul 19, 2023

@sloriot that was indeed an unintended change but has been corrected yesterday as can be seen in https://cgal.geometryfactory.com/CGAL/Manual_doxygen_test/CGAL-6.0-Ic-25/output2/AABB_tree/classAABBPrimitive.html

image

@albert-github
Copy link
Contributor Author

@sloriot as the item is still marked with "CI checks failed" and this was, as far as I know, based on CGAL-6.0-Ic-24 but this was already corrected for CGAL-6.0-Ic-25 (see also my comment #7576 (comment)) are there any other issues found so far?

Copy link
Member

@sloriot sloriot left a comment

Choose a reason for hiding this comment

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

I wonder if for non-obvious construction we should not rely on the html code directly rather than tricking the macro.

Generalized_map/doc/Generalized_map/CGAL/Generalized_map.h Outdated Show resolved Hide resolved
Generator/doc/Generator/CGAL/point_generators_2.h Outdated Show resolved Hide resolved
@@ -21,18 +21,12 @@ constructions or if `K` is a `CGAL::Filtered_kernel` (such as for
`CGAL::Exact_predicates_inexact_constructions_kernel`), this class automatically
provides exact predicates.

\cgalModels The class is a model of several 2D triangulation traits class concepts,
\cgalModelsBare{The class is a model of several 2D triangulation traits class concepts\,
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason why you choose different solutions for Models and HasModels?

Copy link
Member

@sloriot sloriot Jul 21, 2023

Choose a reason for hiding this comment

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

I understand that you usually model only one concept but that a concept have several models.

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 situation wit the cgalModels is that here the models don't have template like constrict when referring to it , whilst cgalHasModels does have it. For this with cgalHasModels the choice has been made to use a begin / end construct and with cgalModels a construct with the multi arguments was made. A few cases there were some "bare" constructs that needed some tricks, sometimes there was a , in the field and this could be prevented by means of the \, construct on other places multiple lines were necessary, hence the \n. This all could be overcome when the ALIASES had had the possibility to specify a separator, for this I did recently create the proposed pull request doxygen/doxygen#10179
Maybe we normally should use the cgalModels construct but in the case off cgalModelsBare use a begin / end construct as well to make it all more transparent.

\cgalModels `ImplicitInteroperable` with `NT`
\cgalModels `Fraction` if NT is a `Fraction`
\cgalModels `RootOf_2`
\cgalModelsBare{`Assignable`\n
Copy link
Member

Choose a reason for hiding this comment

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

This is strange construction IMO

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See comment #7576 (comment)

Number_types/doc/Number_types/CGAL/long_long.h Outdated Show resolved Hide resolved
They can be disables by defining the macro `CGAL_DISABLE_HASH_OPENMESH`.
\cgalHasModelsBegin
\cgalHasModelsBare{All handles and indices of \cgal data structures}
\cgalHasModelsBare{All handles of OpenMesh\, by including the specializations of the `graph_traits` header files provided by \cgal. They can be disables by defining the macro `CGAL_DISABLE_HASH_OPENMESH`.}
Copy link
Member

Choose a reason for hiding this comment

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

another construction not obvious for the dev (meaning we should add it to the dev doc at least)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See comment #7576 (comment)

@@ -7,7 +7,9 @@

\cgalRefines{DefaultConstructible,PolygonTraits_2}

\cgalHasModel Any CGAL kernel, e.g., CGAL::Exact_predicates_exact_constructions_kernel.
\cgalHasModelsBegin
\cgalHasModelsBare{Any CGAL kernel, e.g., CGAL::Exact_predicates_exact_constructions_kernel.}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
\cgalHasModelsBare{Any CGAL kernel, e.g., CGAL::Exact_predicates_exact_constructions_kernel.}
\cgalHasModelsBare{Any \cgal kernel, e.g., CGAL::Exact_predicates_exact_constructions_kernel.}

Copy link
Contributor Author

@albert-github albert-github Jul 21, 2023

Choose a reason for hiding this comment

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

I'll correct this on.

I did a quick and dirty grep for CGAL in combination with cgal and got:

BGL/doc/BGL/PackageDescription.txt:584:\cgalPkgDescriptionBegin{CGAL and the Boost Graph Library,PkgBGL}
CGAL_ipelets/doc/CGAL_ipelets/PackageDescription.txt:4:\cgalPkgDescriptionBegin{CGAL Ipelets,PkgCGALIpelets}
GraphicsView/doc/GraphicsView/PackageDescription.txt:12:\cgalPkgDescriptionBegin{CGAL and the Qt Graphics View Framework,PkgGraphicsView}
Point_set_processing_3/include/CGAL/pointmatcher/compute_registration_transformation.h:507:       \cgalParamExtra{The logs generated by CGAL library does not get effected by this configuration.}
STL_Extension/doc/STL_Extension/PackageDescription.txt:15:\cgalPkgDescriptionBegin{STL Extensions for CGAL,PkgSTLExtension}
Shape_regularization/include/CGAL/Shape_regularization/regularize_contours.h:104:        \cgalParamDefault{a CGAL `Kernel` deduced from the point type,
Shape_regularization/include/CGAL/Shape_regularization/regularize_contours.h:227:        \cgalParamDefault{a CGAL `Kernel` deduced from the point type,
Shape_regularization/include/CGAL/Shape_regularization/regularize_segments.h:117:        \cgalParamDefault{a CGAL `Kernel` deduced from the point type,
Shape_regularization/include/CGAL/Shape_regularization/regularize_segments.h:355:        \cgalParamDefault{a CGAL `Kernel` deduced from the point type,
Shape_regularization/include/CGAL/Shape_regularization/regularize_segments.h:448:        \cgalParamDefault{a CGAL `Kernel` deduced from the point type,
Shape_regularization/include/CGAL/Shape_regularization/regularize_segments.h:541:        \cgalParamDefault{a CGAL `Kernel` deduced from the point type,
Shape_regularization/include/CGAL/Shape_regularization/regularize_segments.h:633:        \cgalParamDefault{a CGAL `Kernel` deduced from the point type,
Solver_interface/doc/Solver_interface/PackageDescription.txt:25:\cgalPkgDescriptionBegin{CGAL and Solvers, PkgSolverInterface}

maybe these should be looked at as well.

\cgalModels Because `Triangulation_face_base_with_info_2` derives from the class instantiating its third
parameter, it will be a model of the same face base concept as its parameter:
`TriangulationFaceBase_2`, `ConstrainedTriangulationFaceBase_2`, or `RegularTriangulationFaceBase_2`
\cgalModelsBare{Because `Triangulation_face_base_with_info_2` derives from the class instantiating its third
Copy link
Member

Choose a reason for hiding this comment

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

another non obvious

@@ -22,10 +22,10 @@ the triangulation.
this parameter is instantiated by
`Triangulation_vertex_base_2<Traits>`.

\cgalModels `TriangulationVertexBaseWithInfo_2`
\cgalModels The parameter `Vb` is a model of some vertex base concept.
\cgalModelsBare{`TriangulationVertexBaseWithInfo_2`,
Copy link
Member

Choose a reason for hiding this comment

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

another non obvious

@albert-github
Copy link
Contributor Author

albert-github commented Jul 21, 2023

I corrected the obvious problems.

I didn't yet correct / update the cgalModelsBare problems as I'd like to see what the reaction is of the proposal in #7576 (comment) (i.e. begin / end construct).

I don't think that we should use "I wonder if for non-obvious construction we should not rely on the html code directly rather than tricking the macro." ( as suggested in #7576 (review)) as this might lead to code that is more difficult to understand, is more error prone and might lead to inconsistencies.

@albert-github

This comment was marked as outdated.

Replacing the `cgalModelsBare` construct with a `begin` / `end` construct so no less understandable constructs with `\,` and `\n` are necessary.
@albert-github
Copy link
Contributor Author

Implemented also the begin / end for cgalModelsBare

@lrineau
Copy link
Member

lrineau commented Jul 24, 2023

/build:v1

@github-actions
Copy link

The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/7576/v1/Manual/index.html

sloriot and others added 2 commits August 15, 2023 07:16
# Conflicts:
#	Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementPointLocation_2.h
#	Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Concepts/ArrangementVerticalRayShoot_2.h
@sloriot
Copy link
Member

sloriot commented Sep 6, 2023

Successfully tested in CGAL-6.0-Ic-56

@sloriot
Copy link
Member

sloriot commented Sep 6, 2023

Output looks good.
now:
Screenshot from 2023-09-06 11-45-16
before:
Screenshot from 2023-09-06 11-45-28

@sloriot
Copy link
Member

sloriot commented Sep 6, 2023

Thanks @albert-github for the huge work!

@lrineau lrineau added this to the 6.0-beta milestone Sep 6, 2023
@lrineau lrineau self-assigned this Sep 6, 2023
@lrineau lrineau added the rm only: ready for master For the release team only: that indicates that a PR is about to be merged in 'master' label Sep 6, 2023
@lrineau lrineau merged commit 4692334 into CGAL:master Sep 7, 2023
9 checks passed
@lrineau lrineau removed the rm only: ready for master For the release team only: that indicates that a PR is about to be merged in 'master' label Sep 7, 2023
@lrineau lrineau deleted the feature/issue_7395 branch September 7, 2023 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improvement of layout of model relations.
4 participants