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

Make c/c++ interface private #954

Open
sondreso opened this issue Feb 16, 2024 · 2 comments
Open

Make c/c++ interface private #954

sondreso opened this issue Feb 16, 2024 · 2 comments

Comments

@sondreso
Copy link
Contributor

sondreso commented Feb 16, 2024

We will make the c/c++ interface of resdata (formerly known as ecl/libecl) private.

The rationale is that there are a lot of functionality that is only exposed in c/c++ which is in little use, and we would like to clean this up in order to have a library that is easier to maintain. ert used to be a big consumer of this interface, but this is not the case anymore.

The next step is ta create a new major version bump of Resdata with the c/c++ interface as private. This means all comments in README and documentation about the c/c++ interface will disappear. Also the following lines will be removed:

return ctypes.CDLL(path, ctypes.RTLD_GLOBAL)

"-DCMAKE_INSTALL_INCLUDEDIR=python/resdata/.include",

Note: The binaries exposed by resdata is still considered public:

resdata/setup.py

Lines 37 to 53 in c62737a

"CF_dump",
"convert.x",
"rd_pack.x",
"rd_unpack.x",
"grdecl_grid",
"grdecl_test.x",
"grid_dump.x",
"grid_dump_ascii.x",
"grid_info.x",
"kw_extract",
"kw_list.x",
"load_test.x",
"make_grid",
"ri_well_test",
"segment_info",
"select_test.x",
"summary.x",

@magnesj
Copy link
Contributor

magnesj commented Nov 17, 2024

Hi, due to historical reasons, we have a copy of the resdata repository in ResInsight using the C++ interface only, not the Python interface. We are asked to evaluate using the official resdata repository instead of a local copy. For ResInsight it is required to be able to access and use the C++ code in resdata using CMake. Please make sure that using C++ still will be possible.

Here is our copy (4-5 years since last sync with the public repository)
https://github.com/OPM/ResInsight/tree/dev/ThirdParty/Ert

@eivindjahren eivindjahren added the christmas-review Issues and PRs for Christmas review label Dec 13, 2024
@sondreso sondreso removed the christmas-review Issues and PRs for Christmas review label Dec 19, 2024
@sondreso sondreso moved this from In Progress to Todo in SCOUT Dec 19, 2024
@eivindjahren
Copy link
Collaborator

Here is our copy (4-5 years since last sync with the public repository)
https://github.com/OPM/ResInsight/tree/dev/ThirdParty/Ert

@magnesj seeing as your copy and resdata has diverged quite a bit, would it not be simpler to keep these projects separate? You can still apply patches from resdata without using the cmake file, but given how much divergence there is, that might very rarely be possible.

Also, the goal of resdata is to maintain the backwards compatability of the python interface, where historical artifacts like util_abort become difficult to deal with. Freed from the need to maintain the python interface, resinsight could deal with that in a standard c++ way: smart pointers, RAII, and exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

4 participants