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

ccp4io/ccp4io_adaptbx present but not configured #11

Open
Anthchirp opened this issue Nov 16, 2020 · 4 comments
Open

ccp4io/ccp4io_adaptbx present but not configured #11

Anthchirp opened this issue Nov 16, 2020 · 4 comments

Comments

@Anthchirp
Copy link
Member

>>> import libtbx.load_env
>>> libtbx.env.has_module("ccp4io")
False
>>> libtbx.env.has_module("ccp4io_adaptbx")
False
>>> import ccp4io_adaptbx
>>> ccp4io_adaptbx       
<module 'ccp4io_adaptbx' from '(PREFIX)/lib/python3.8/site-packages/ccp4io_adaptbx/__init__.py'>

however

$ ls -d (PREFIX)/lib/python3.8/site-packages/ccp4io*
lib/python3.8/site-packages/ccp4io  lib/python3.8/site-packages/ccp4io_adaptbx

Does it make sense for the packages to be both present and not configured?


Environment (conda list):
$ conda list
...
cctbx-base                2020.10          py38hc79ae55_0    conda-forge
...
@bkpoon
Copy link
Member

bkpoon commented Nov 16, 2020

So, that part of has not been fully fleshed out. I can add extra logic for the has_module function to return True for installed modules. You can check the dist_path function for now.

import libtbx.load_env

e = libtbx.env

e.dist_path('ccp4io')

The idea will be that software that uses cctbx-base will not need to modify the environment object at all. As long as the modules are installed in the correct place, the environment object will think it is configured.

@Anthchirp
Copy link
Member Author

I noticed this because of a failing test, but the relevant line is in iotbx:
https://github.com/cctbx/cctbx_project/blob/master/iotbx/mtz/extract_from_symmetry_lib.py#L7

@bkpoon
Copy link
Member

bkpoon commented Nov 18, 2020

I'll add the extra logic for completeness to the 2020.11 release which should be starting soon.

@Anthchirp
Copy link
Member Author

Thank you. There is no rush on this

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

No branches or pull requests

2 participants