Commit Graph

79 Commits

Author SHA1 Message Date
Joakim Hove
d66852d8de Rewrite EclFile wrapping
- Include the eclipse_io.cpp file in existing extension library - do not create
   a new library.

 - Remove Python class EclFile - just expose the C++ through Pybind1, include
   some monkey-patching of the class to ensure proper Python strings for CHAR
   keywords.

 - Remove string based keyword lookup.

 - Use standard Python methods __len__, __getitem__ and __contains__; get() is
   an equivalent alternative to __getitem__().

 - Add property arrays in addition to getListOfArrays()
2019-11-06 09:59:07 +01:00
Torbjørn Skille
7cacc734e8 python binding for EclFile 2019-11-06 09:59:07 +01:00
Joakim Hove
0b8a42fd1f Fix cmake find pythonlibs 2019-11-06 09:59:07 +01:00
Joakim Hove
0d2f57354a
Merge pull request #1184 from joakim-hove/python-dep
Add Python library to opm-common_LIBRARIES cmake variable
2019-11-04 13:16:32 +01:00
Joakim Hove
a7187abc17 Initial implementation of 3D properties 2019-10-31 11:18:55 +01:00
Joakim Hove
176e7f75ed Add Python library to opm-common_LIBRARIES cmake variable 2019-10-31 07:07:07 +01:00
Arne Morten Kvarving
95a129cbed fixed: let's not copy the files twice 2019-10-29 14:59:08 +01:00
Joakim Hove
9d1b7a83d9 Changes in Python build:
- Use python/install.py to copy from source tree to build tree
- List Cxx source files in CMakeLists_files.cmake
2019-10-28 21:42:57 +01:00
Joakim Hove
d382c57145 Add small python script to determine extension suffix 2019-10-28 20:30:39 +01:00
Joakim Hove
162d0e0902 Minor change to python enable script 2019-10-25 08:54:40 +02:00
Arne Morten Kvarving
93ac533373 changed: put the generated ParserKeywords.cpp first in list
this improves build throughput on jenkins since building this
large file will overlap more with other build tasks.
2019-10-17 11:40:48 +02:00
Joakim Hove
e815194e21
Merge pull request #1112 from stefoss23/remove_common_state
Remove common state
2019-10-17 06:58:25 +02:00
Arne Morten Kvarving
247b5685cc remove libecl from buildsystem, jenkins and packaging 2019-10-16 20:03:08 -05:00
Steinar Foss
0e5c14568e removed common_state. 2019-10-16 13:59:00 +02:00
Joakim Hove
5269f52291
Merge pull request #1075 from joakim-hove/python-install
Add Python copy/install hack
2019-10-14 18:46:48 +02:00
Joakim Hove
7dc77d1ca3 Install PYTHON Modules when running jenkins 2019-10-14 15:53:31 +02:00
Joakim Hove
59b73a0667 Change the python installation code
- Main cmake based python installation is based on small script install.py and
  not setup.py
- Python installation is guarded by cmake switch OPM_INSTALL_PYTHON
- Configure convenience shell script setup-install.sh for setup.py based
  installation.
- Remove PYTHONPATH hacks from setup.py
2019-10-14 13:13:09 +02:00
Steinar Foss
c0bd19c59e python: added class UnitSystem. 2019-10-11 22:02:54 +02:00
Joakim Hove
204ea1a1a2 Use ${PYTHON_EXECUTABLE} instead of 'python' in CMakeLists.txt 2019-10-04 20:14:27 +02:00
Joakim Hove
69ddffc966 Expose C++ objects to Python runtime 2019-09-23 21:31:45 +02:00
Joakim Hove
230c4494ed Add Python wrapping for OpmLog 2019-09-23 14:35:25 +02:00
Steinar Foss
dd4cce4e9a python: removed group_tree. 2019-09-21 11:52:44 +02:00
Joakim Hove
d2ff536cf3 Renamed python/cxx/common -> python/cxx/export 2019-09-13 09:40:13 +02:00
Arne Morten Kvarving
16d38c3245 fix python link for dependents 2019-09-09 11:16:58 +02:00
Arne Morten Kvarving
97ad4baa99 quell warnings 2019-09-09 11:16:58 +02:00
Joakim Hove
ab2ea1acf3 Add basic manager class fro Python interpreter 2019-09-09 10:58:26 +02:00
Joakim Hove
7984d2a0f4 Expose the Parser class properly to Python 2019-09-05 08:44:47 +02:00
Joakim Hove
723113b3b9 Add small shell script templates to simplify Python development 2019-09-05 08:44:47 +02:00
Steinar Foss
554ceb87dd setup.py will install python packages.
setup.py install to CMAKE_INSTALL_PREFIX.

cmake will create python install dir.
2019-08-15 17:00:43 +02:00
Steinar Foss
c94ed2f643 renaming python/cxx/sunbeam*.* -> common *.* 2019-08-15 11:19:18 +02:00
Steinar Foss
e25416c236 renamed python pkg sunbeam -> opm.
setup.py: test_suite -> tests_suite .

libsunbeam -> libopmcommon_python.

sunbeam -> opm: test_connection ok.

test_deck ok.

test_group_tree ok.

test_grupnet ok.

test_parse_deck.py ok.

test_parse.py ok.

python all tests ok.
2019-08-15 11:02:09 +02:00
Arne Morten Kvarving
ca42ca5968 changed: use a custom output to avoid rebuilds
currently, the python bindings are built on every make invocation,
including the 'make install' command.

this improves on this situation by tracking whether or not the target
needs to be rebuilt through a custom output and dependencies.

the list of dependencies is not very pretty, but necessary when
linking two build systems like this.
2019-08-13 15:56:45 +02:00
Arne Morten Kvarving
86b1a93b0e fixed: clean python bindings with 'make clean' 2019-08-13 15:56:45 +02:00
Steinar Foss
c208a59597 Sunbeam will be compiled with setuptools.
setup.py moved to python/python.

moved python tests to python/python.

added __init__.py under python/tests.

added 'test_' before all python test names.

test_ prefix added to tests.

setup.py and python tests moved back to python base.

setuptools executes from root python.

python: tests run from root python w/ setup.py.

python tests: temp reduced to test_deck only.

python setup.py: manually linked opmcommon.

setup.py: linked ecl.

setup.py linked boost_filesystem.

setup.py: linked boost_regex.

python all tests run.

removec usr/local from setup.py ext_module.

cmake make copies entire python dir to build.

setup.py can execute from build.

setup.py executes from build/python.

python tests run under setup.py.

setup.py library_dirs and include-dirs set by cmake command.

removed cmake files from sunbeam.

sunbeam: added code for install.

setup.py: removed 'import ecl'.

python/src -> python->src_sunbeam.

setup.py: discontinued use of glob, all files listed instead.

build-opm_module.sh: added prefix_path to opm.

build-opm-module.sh: changed spell error for EXTRA_MODULE_FLAGS[opm-common].

setup.py: infer include directories from cmake target

CMakeLists.txt: under python: align install statement.

CMakeLists build python: removed find_package.

src_sunbeam -> cxx.

setup.py: test_suite as string.

setup.py: tests_suite -> test_suite.

setup.py: added exception if 'build_ext' not used.

temporarily moved files to python/sunbeam.
2019-08-09 10:40:33 +02:00
Joakim Hove
7c856f681d Use new classes Group2 and GTNode 2019-08-06 22:59:16 +02:00
Joakim Hove
dc4aa882be Integration testing of Group2 in Schedule constructor 2019-07-30 09:36:57 +02:00
Arne Morten Kvarving
6a7191c376 fixed: sources should include the extension 2019-07-10 09:03:36 +02:00
Joakim Hove
dba43a4a5e Rename cmake symbol ENABLE_PYTHON -> OPM_ENABLE_PYTHON 2019-06-27 15:19:03 +02:00
Steinar Foss
143c73cdd0 ENABLE_PYTHON OFF. 2019-06-27 12:31:38 +02:00
Steinar Foss
ef936afeaa opm set to PIC with PYTHON ON. 2019-06-27 12:10:02 +02:00
Steinar Foss
da1fb0b744 python compiles directly. 2019-06-20 10:05:53 +02:00
Steinar Foss
d45731a205 added option ENABLE_PYTHON. 2019-06-14 13:20:51 +02:00
Joakim Hove
2682eef9b3
Merge pull request #788 from joakim-hove/remove-welltest
Removed well testing from Schedule constructor
2019-05-27 20:13:45 +02:00
Joakim Hove
35a70310c6 Removed well testing from Schedule constructor 2019-05-27 17:47:55 +02:00
Bård Skaflestad
e654915069 Move ECLIPSE I/O Into Main OPM Common Library
This makes the facility usable for the restart read/write code.

Specifically, import the I/O classes into namespace Opm::ecl, and
place the files in physical location opm/io/eclipse, and move the
test utilities to new top-level directory 'test_util/'.  While here,
discontinue the 'testutil' static library since most of its features
are now available in the main 'opmcommon' library.  This does entail
compiling a few of the test_util/ CPP files multiple times, and
adding the objects to each executable independently.
2019-05-23 10:23:01 +02:00
Torbjørn Skille
135f2d491a remove unused summary comparison classes 2019-04-08 11:38:34 +02:00
Torbjørn Skille
fbfac1f797 update compareECL to use new ECL I/O classes 2019-04-08 11:38:34 +02:00
Torbjørn Skille
4768f72400 added: new utility convertECL
for converting between formatted and binary ecl files
2019-04-08 11:36:20 +02:00
Torbjørn Skille
db142f698b added: ESmry class for reading summary data from ECL files 2019-04-08 11:36:20 +02:00
Torbjørn Skille
c54cb2195b added: ERst class for reading restart simulation data from ECL files 2019-04-08 11:36:20 +02:00