Closed liam-o-marsh closed 2 weeks ago
is there a way to auto sync requirements.txt
, environment.yml
, and pyproject.toml
?
not to my knowledge? environment.yml and requirements.txt should be somewhat feasible because the idea is fundamentally the same, but syncing this with pyproject.toml sounds more difficult. At the very least, there should be a way to check that the package list is the same across all three, and that the bounds of the dependencies listed in pyproject.toml are compatible with the rest.
is it possible to import qstack_qml
in the main __init__.py
to use it as qstack.qml
if it's installed?
I also can't use qstack_qml if it isn't installed but is just in the path (which is probably how one should not use it but...)
yeah I can fix both of those
Thanks!
I'm probably dumb but can't make it work (I can import qstack.qml
but nothing further)
I admittedly didn't test it.
I can't even import qstack.qml
, only from qstack import qml
or import qstack; print(qstack.qml)
(fixing this on my side for now)
I have no idea how to use b2r2 (read: I didn't want to spend the time learning how to make ase.rxn objects quite yet), but I managed to run qstack.qml.slatm.get_slatm_for_dataset()
thanks a lot! one still can't do from qstack_qml.slatm import get_slatm_rxn
etc but I guess it's fine
yeah, for this you need to have pip actually install qstack_qml (as one of qstack[all]'s dependencies) the reason why qstack.qml works even when you didn't is because qstack/qml.py has a trick to modify PYTHONPATH, import, restore PYTHONPATH.
oh sorry I can't spell. what I meant is this:
>>> import qstack
>>> qstack.__path__
['/home/xe/SOFT/miniconda3/envs/qstack-yuri/lib/python3.10/site-packages/qstack']
>>> from qstack_qml.slatm import get_slatm_rxn
>>> from qstack.qml.slatm import get_slatm_rxn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'qstack.qml.slatm'; 'qstack.qml' is not a package
>>>
While the following works and is pretty convenient so all good
>>> from qstack.qml import slatm
>>> slatm.get_slatm_rxn
<function get_slatm_rxn at 0x7f2fefd591b0>
>>>
(also unrelated but I finished the local kernel wrapper thing. Do you want me to put it on another branch?)
Do you want me to put it on another branch?
Thanks! yes please
Do you think we can merge (squash and merge?) this one?
Yes, I think so. (unless you absolutely want some sort of mechanism to ensure some coherence between environment.yml, requirements.txt and pyproject.toml, but I would have to find or implement this first)
It's fine! It's not something that changes every day and we can do it manually
Do we need to look at/enable these alerts? https://github.com/lcmd-epfl/Q-stack/network/dependencies
don't think so, unless there's like a security issue somehow