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

Convert flamel to a simple CLI #10

Merged
merged 27 commits into from
Nov 6, 2022
Merged

Conversation

xiki-tempula
Copy link
Contributor

@xiki-tempula xiki-tempula commented Nov 6, 2022

Given that alchemlyb has reached 1.0. I have also formated the flamel to be a simple CLI interface.
This PR allows flamel to use the alchemlyb.workflow.ABFE as backend and allow this kind of usage.
flamel -a GROMACS -d {in_path} -f 10 -g -i 50 -j result.csv -m TI,BAR,MBAR -n dE -o {out} -p dhdl -q xvg.bz2 -r 3 -s 50 -t 298 -v -w

I have refactored the project to make it adopt the molssi cookie-cutter format. I have also added the tests.

@xiki-tempula xiki-tempula requested a review from orbeckst November 6, 2022 16:54
@orbeckst
Copy link
Member

orbeckst commented Nov 6, 2022

I am ok with your rewrite. But I will quickly make a historical 0.1.0 release with the original main branch, then merge PR #1 and make a historical 0.2.0, just so that the code remains in the history.

This was linked to issues Nov 6, 2022
This was linked to issues Nov 6, 2022
…to xiki-tempula-feat_ABFE

- update CHANGES
- update AUTHORS
Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rewrite is in line with discussion #12 .

I added CHANGES and AUTHORS and added it to the branch.

@orbeckst orbeckst merged commit fd80456 into alchemistry:master Nov 6, 2022
@xiki-tempula
Copy link
Contributor Author

@orbeckst Many thanks for merging this PR. I wonder what is https://github.com/alchemistry/flamel/blob/master/output/pickle.py? I think the file might be introduced by #1 and is no longer needed now.

@orbeckst
Copy link
Member

orbeckst commented Nov 6, 2022

oops... I overlooked it in the merge, I'll do a clean-up

@orbeckst
Copy link
Member

orbeckst commented Nov 6, 2022

While checking things: Did you use versioneer in the template? I don't see any versioneer files or how is versioning handled? For local test I get

(alchemlyb39) flamel oliver$ pytest
============================================================ test session starts ============================================================
platform darwin -- Python 3.9.13, pytest-7.2.0, pluggy-1.0.0
rootdir: ~/flamel
collected 0 items / 1 error

================================================================== ERRORS ===================================================================
_______________________________________________ ERROR collecting flamel/tests/test_flamel.py ________________________________________________
ImportError while importing test module '~/flamel/flamel/tests/test_flamel.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/oliver/anaconda3/envs/alchemlyb39/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
flamel/__init__.py:7: in <module>
    from ._version import __version__
E   ModuleNotFoundError: No module named 'flamel._version'
========================================================== short test summary info ==========================================================
ERROR flamel/tests/test_flamel.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================= 1 error in 22.17s =============================================================

@xiki-tempula
Copy link
Contributor Author

I expect the versioning to be handled by Versioningit but this does look weird.

@xiki-tempula
Copy link
Contributor Author

xiki-tempula commented Nov 7, 2022

Locally it works for me

In [1]: import flamel
In [2]: flamel.__version__
Out[2]: '1.0.0+65.gc0b748d'

Obviously, one has to create a tag release in order to change this version.

@xiki-tempula xiki-tempula deleted the feat_ABFE branch November 7, 2022 09:45
@orbeckst
Copy link
Member

orbeckst commented Nov 7, 2022 via email

@xiki-tempula
Copy link
Contributor Author

@orbeckst So I think you will need to do pip install -e . as the Versioningit is set in pyproject.toml, which is configured when installing the package.

@orbeckst
Copy link
Member

orbeckst commented Nov 7, 2022

Thanks, learning how to live without setup.py and other old-school tools ;-)

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

Successfully merging this pull request may close these issues.

add tests The future direction of the flamel Visualization/Plotting make flamel pip installable
4 participants