Windows + Data directory.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Windows + Data directory.

mwojcikowski
Hello all,

I moved this issue out of "Conda windows" to keep the discussion clean.

BABEL_DATADIR is absent on windows and data files are placed in "bin/data" path. A commit some time ago (https://github.com/openbabel/openbabel/commit/a45a046ff283f79e0f6423408578792e16c80727) has a regression where "_subdir" param is not even checked which eventually broke the support of the "bin/data" lookup. Where should I put them? I've tried few directories which are obvious choices but with no luck:
  • bin/data
  • Library/bin/data
  • share/openbabel
  • share/openbabel/2.3.90

Noel, do you have errors like those bellow in your windows build?

==============================
*** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
  Cannot open element.txt defaulting to compiled data.
==============================
*** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
  Cannot open types.txt defaulting to compiled data.
==============================
*** Open Babel Warning  in OpenBabel::OBGlobalDataBase::Init
  Cannot open phmodel.txt defaulting to compiled data.
 
----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
[hidden email]

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows + Data directory.

Geoff Hutchison
It's easy to fix the _subdir bug. The key question is how we can add testing (e.g., with AppVeyor) to make sure this doesn't regress again.

Should we have some sort of test for, e.g., accessing element.txt and returning FAIL if it defaults to compiled data?

Thanks,
-Geoff

BABEL_DATADIR is absent on windows and data files are placed in "bin/data" path. A commit some time ago (https://github.com/openbabel/openbabel/commit/a45a046ff283f79e0f6423408578792e16c80727) has a regression where "_subdir" param is not even checked which eventually broke the support of the "bin/data" lookup. Where should I put them? I've tried few directories which are obvious choices but with no luck:




------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows + Data directory.

mwojcikowski
I've already tried that (https://github.com/mwojcikowski/openbabel/commit/704250e925d765387257d5ee790d24f53803b7c2) although it didn't help :( If you have better solution that would be awesome, since I've ran out of options...

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
[hidden email]

2016-07-05 21:10 GMT+02:00 Geoffrey Hutchison <[hidden email]>:
It's easy to fix the _subdir bug. The key question is how we can add testing (e.g., with AppVeyor) to make sure this doesn't regress again.

Should we have some sort of test for, e.g., accessing element.txt and returning FAIL if it defaults to compiled data?

Thanks,
-Geoff

BABEL_DATADIR is absent on windows and data files are placed in "bin/data" path. A commit some time ago (https://github.com/openbabel/openbabel/commit/a45a046ff283f79e0f6423408578792e16c80727) has a regression where "_subdir" param is not even checked which eventually broke the support of the "bin/data" lookup. Where should I put them? I've tried few directories which are obvious choices but with no luck:





------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows + Data directory.

Kirill Okhotnikov
In reply to this post by mwojcikowski
Dear Developers,

I also had a problem with Data on linux, when I want to compile openbabel library statically. Don't you think, that it will be a good idea to link the library with up-to-date files like elements.txt isotopes.txt etc and use this like a default solution. What is the strong reason to have it as separate file, but not inside the library?

Best regards,
Kirill Okhotnikov.

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows + Data directory.

mwojcikowski
In reply to this post by Geoff Hutchison
Hi Geoff,

We can check "obabel -:c1ccccc1 -omol2 >/dev/null" == "1 molecule converted", or to be more specific the following should be empty:
obabel -:c1ccccc1 -omol2 2>&1 >/dev/null | grep "Cannot open *.txt defaulting to compiled data."

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
[hidden email]

2016-07-05 21:10 GMT+02:00 Geoffrey Hutchison <[hidden email]>:
It's easy to fix the _subdir bug. The key question is how we can add testing (e.g., with AppVeyor) to make sure this doesn't regress again.

Should we have some sort of test for, e.g., accessing element.txt and returning FAIL if it defaults to compiled data?

Thanks,
-Geoff

BABEL_DATADIR is absent on windows and data files are placed in "bin/data" path. A commit some time ago (https://github.com/openbabel/openbabel/commit/a45a046ff283f79e0f6423408578792e16c80727) has a regression where "_subdir" param is not even checked which eventually broke the support of the "bin/data" lookup. Where should I put them? I've tried few directories which are obvious choices but with no luck:





------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows + Data directory.

Geoff Hutchison
In reply to this post by Kirill Okhotnikov
> I also had a problem with Data on linux, when I want to compile openbabel library statically. Don't you think, that it will be a good idea to link the library

By default, the library compiles versions of the data statically. These can be found in data/*.h and used if no data files are found.

> with up-to-date files like elements.txt isotopes.txt etc and use this like a default solution. What is the strong reason to have it as separate file, but not inside the library?

If there are updates to the data files, they can be easily edited - even by an end-user. But hard-coded into the library data requires re-compiling and re-installation.

For most users, the data files are very useful.

-Geoff
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows + Data directory.

Geoff Hutchison
In reply to this post by mwojcikowski
> We can check "obabel -:c1ccccc1 -omol2 >/dev/null" == "1 molecule converted", or to be more specific the following should be empty:
> obabel -:c1ccccc1 -omol2 2>&1 >/dev/null | grep "Cannot open *.txt defaulting to compiled data."


This test seems like it would only work on Linux/UNIX systems, but not Windows. Considering your problem is with Windows, I'd like to see a different option..

-Geoff
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows + Data directory.

Kirill Okhotnikov
In reply to this post by Geoff Hutchison
> By default, the library compiles versions of the data statically. These can be found in data/*.h and used if no data files are found.
The files data/*.h is not up-to-date now. Almost all of them. It will be good to synchronize them automatically.

> If there are updates to the data files, they can be easily edited - even by an end-user. But hard-coded into the library data requires re-compiling and re-installation.
If end-user, who used openbabel from repositories (deb, rpm) change the files, his changes will be overwriting by next update of openbabel. So, it is better to put changes to a separate folder. Why not to make the default data, which is compiled to OpenBabel.

From my side, I can make a build step with automatic convert of resources (*txt files) to c++ files. Are you interested in it.


2016-07-07 17:06 GMT+03:00 Geoffrey Hutchison <[hidden email]>:
> I also had a problem with Data on linux, when I want to compile openbabel library statically. Don't you think, that it will be a good idea to link the library

By default, the library compiles versions of the data statically. These can be found in data/*.h and used if no data files are found.

> with up-to-date files like elements.txt isotopes.txt etc and use this like a default solution. What is the strong reason to have it as separate file, but not inside the library?

If there are updates to the data files, they can be easily edited - even by an end-user. But hard-coded into the library data requires re-compiling and re-installation.

For most users, the data files are very useful.

-Geoff


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Windows + Data directory.

mwojcikowski
In reply to this post by Geoff Hutchison
Yes, I forgot the windows part... Then the derivative would be to regex in python the output of "subprocess.check_output(['obabel', '-:c1ccccc1', '-onul'], stderr=subprocess.STDOUT)". This should work cross platform.

----
Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
[hidden email]

2016-07-07 16:07 GMT+02:00 Geoffrey Hutchison <[hidden email]>:
> We can check "obabel -:c1ccccc1 -omol2 >/dev/null" == "1 molecule converted", or to be more specific the following should be empty:
> obabel -:c1ccccc1 -omol2 2>&1 >/dev/null | grep "Cannot open *.txt defaulting to compiled data."


This test seems like it would only work on Linux/UNIX systems, but not Windows. Considering your problem is with Windows, I'd like to see a different option..

-Geoff


------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
OpenBabel-Devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel
Loading...