Skip to content

CGAL Data: doc + more data moves#6034

Merged
lrineau merged 3 commits intoCGAL:masterfrom
sloriot:CGAL_data-moving_files
Oct 29, 2021
Merged

CGAL Data: doc + more data moves#6034
lrineau merged 3 commits intoCGAL:masterfrom
sloriot:CGAL_data-moving_files

Conversation

@sloriot
Copy link
Member

@sloriot sloriot commented Oct 7, 2021

Follow up of #4229 and #5427

TODO:

  • doc cmake target CGAL::Data that is automatically added in the macro create_single_source_cgal_program()
  • update user manual

/// pointing to the data directory of the \cgal version used.
/// The function will make an attempt to open the file at the location returned
/// and will print an error message on `std::cerr` if the file could not be opened.
std::string data_file_path(const std::string& filename);
Copy link
Member Author

Choose a reason for hiding this comment

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

@lrineau @gdamiand @MaelRL @afabri I'd appreciate a review of this paragraph

Copy link
Member

Choose a reason for hiding this comment

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

I would that to be tested, in various configurations. In particular, I wonder what happens if CGAL is installed. Are data installed as well, and where?

Copy link
Member

Choose a reason for hiding this comment

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

I would that to be tested, in various configurations. In particular, I wonder what happens if CGAL is installed. Are data installed as well, and where?

It can be tested in Installation/test/Installation/test_configuration.cpp: that file is compiled and run in a lot of various configuration/installation of CGAL, both in the CI (for the Git layout), and in the testsuite (for releases layout).

Copy link
Member Author

@sloriot sloriot Oct 8, 2021

Choose a reason for hiding this comment

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

Simply add a thumb up if you don't have any comment so that we know that it has been reviewed.

See also the text added in the developer wiki:
https://github.com/CGAL/cgal/wiki/Directory-Structure-for-Packages#shared-data-directory

Copy link
Member

Choose a reason for hiding this comment

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

Simply add a thumb up if you don't have any comment so that we know that it has been reviewed.

See also the text added in the developer wiki: CGAL/cgal/wiki/Directory-Structure-for-Packages#shared-data-directory

My review of the wiki section led to the fix of a typo: https://github.com/CGAL/cgal/wiki/Directory-Structure-for-Packages/_compare/4545a717e0e2802299b894ec3a6c9b96adf0ace3...8fb212d5989c65b1274386f1096232cda485323e

Copy link
Member Author

@sloriot sloriot Oct 8, 2021

Choose a reason for hiding this comment

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

@lrineau I agree but it does not have anything to do with the review of the doc (or maybe you want to know what I meant by standard). Examples are not installed so neither will data be. About the -example packages of linux distributions, I haven't done anything but with your feedback and @joachim-reichel 's I can update scripts accordingly.

Copy link
Member

Choose a reason for hiding this comment

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

Let me sketch my idea for .deb packaging: Since data files are only used by demos/examples (tests are not included in the tarball), I would probably not ship them with the library/header packages, but in the -example package (actually libcgal-demo). This package contains two tarballs for the demos/examples, and I would probably add another one for the data files. The user can extract them anywhere on the system (probably in the home directory). Will the data directory be automatically found, if "data" is e.g. next to "examples" (as in a tarball layout)? (There will be only the "examples"/"demo" and "data" directory trees, everything else is either installed or not present at all.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now, the cases of automatic detection of data dir are only done with reference to the CGAL_DIR (be it a branch checkout or a regular release). I guess we can probably add another fallback rule based on CMAKE_SOURCE_DIR. Thinking about it, I'm in favor of adding another rule only if the data dir is in the same archive as the examples so that the layout is somehow imposed. What do you think?

Copy link
Member Author

@sloriot sloriot Oct 26, 2021

Choose a reason for hiding this comment

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

@joachim-reichel @lrineau what should we do?

Copy link
Member

Choose a reason for hiding this comment

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

I think the data files should be in the same tarball as the examples, and in the same component of the CMake installation rules.

And the automatic detection should work:

  • when CGAL is installed, with or without examples,
  • or when a user decompress the examples tarball in the home directory.

Co-authored-by: Mael <mael.rouxel.labbe@geometryfactory.com>
@sloriot
Copy link
Member Author

sloriot commented Oct 28, 2021

Successfully tested in CGAL-5.4-Ic-82 (extra step can be done in another PR to avoid issue with branches using images)

@lrineau lrineau self-assigned this Oct 29, 2021
@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 Oct 29, 2021
@lrineau lrineau merged commit 7b9113a into CGAL:master Oct 29, 2021
@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 Nov 2, 2021
@lrineau lrineau deleted the CGAL_data-moving_files branch November 2, 2021 10:04
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.

4 participants