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

Remove restraints CLIs #959

Open
rvhonorato opened this issue Aug 1, 2024 · 8 comments
Open

Remove restraints CLIs #959

rvhonorato opened this issue Aug 1, 2024 · 8 comments
Assignees
Labels
enhancement Enhancing an existing feature of adding a new one

Comments

@rvhonorato
Copy link
Member

rvhonorato commented Aug 1, 2024

Desired feature/enhancement

Remove all the restraints-related CLIs from the codebase

Motivation

The current implementations of restraint generation routines are a port of an old and limited routines extracted from the web interface -> web/app/haddock24/PDBHandler.

Whilist functional, they contribute to the dependencies (freesasa and biopython) and have a limited set of features and are of course subject to code smell and python deprecation.

All functionalities included here and more, have been implemented elsewehere -> https://github.com/haddocking/haddock-restraints. This other implementation can be served as a binary, to multiple architechtures, not requiring any setup. It also has a user-friendly documentation https://bonvinlab.org/haddock-restraints.

Description

Remove all restraint-related CLI interfaces in haddock3 to remove code duplication and mulitple endpoints for the same functionality. For convenience the binary could be shipped here in src/bin/restraints

Additional context

Despite being a beta version, there are already several tutorials for haddock3 that use this command line, they need to also be updated:

This will also impact src/haddock/clis/restraints/webservice.py

@rvhonorato rvhonorato added the enhancement Enhancing an existing feature of adding a new one label Aug 1, 2024
@rvhonorato rvhonorato self-assigned this Aug 1, 2024
@VGPReys
Copy link
Contributor

VGPReys commented Sep 10, 2024

I am not sure of that one.
I think we could keep it.
We could:

  • keep the CLI
  • create bindings to haddock-restraints
  • remove the functions ( in src/haddock/clis/restraints)

What do you think about this solution ?

@amjjbonvin
Copy link
Member

amjjbonvin commented Sep 10, 2024 via email

@rvhonorato
Copy link
Member Author

rvhonorato commented Sep 10, 2024

  • keep the CLI

"keeping the CLI" means keeping the API - the way people interact with the code, meaning there will need to be an adapter between the two applications. A lot of extra work for little benefit I think

  • create bindings to haddock-restraints

Not sure if that's what you mean, but it would be possible to expose the haddock-restraints api directly via pyo3 - but that's also quite some work

  • remove the functions ( in src/haddock/clis/restraints)

yes, remove and/or move the relevant ones (that are refered in other parts of the code) to some lib

What do you think about this solution ?

haddock is quickly becoming a software suite rather than a simple collection of scripts, changes like these are bound to happen at some point. It's best if we tackle these "big changes" soon rather than later. haddock3 is still beta/experimental and not released, so this is the best time to make changes 🤓 this here is the same case as the haddock-runner - #960

The only real things that need to change are our tutorials.

Not realy, simply make it clear in the tutorials that users need to have the beta5 version of haddock3 to run it, and add instruction on how to get this version. I don't see a reson to make it backwards compatible. But sure, if you want the tutorials to match the release version, then indeed they need to be updated (also for other reasons).

@VGPReys
Copy link
Contributor

VGPReys commented Sep 10, 2024

  • create bindings to haddock-restraints

Not sure if that's what you mean

The idea was that the haddock3-restraints is simply pointing haddock-restraints, that comes with the haddock3 installation.
So, as you said before, just create an small adapter (what I was calling bindings) between the two applications.

@sverhoeven
Copy link
Contributor

The haddock3-webapp uses haddock.clis.restraints.webservice module as a webservice to perform restraints calculations and preprocess pdb files using pdbtools package.

If the haddock.clis.restraints is removed then the haddock3 webapp would need a similar webservice preferable with an openapi specification.

@rvhonorato
Copy link
Member Author

rvhonorato commented Sep 10, 2024

The haddock3-webapp uses haddock.clis.restraints.webservice module as a webservice to perform restraints calculations and preprocess pdb files using pdbtools package.

If the haddock.clis.restraints is removed then the haddock3 webapp would need a similar webservice preferable with an openapi specification.

Good point @sverhoeven - my plan is to use haddock-restraints as WA, same as it will be in the GenTBL service. Need to coordinate this removal together with this addition. We will figure out which goes first, but i'll keep this in mind.

Then we can also remove src/haddock/clis/restraints/webservice.py

Not sure if that's what you mean

The idea was that the haddock3-restraints is simply pointing haddock-restraints, that comes with the haddock3 installation. So, as you said before, just create an small adapter (what I was calling bindings) between the two applications.

alias haddock3-restraints="haddock-restraints"

?

@amjjbonvin
Copy link
Member

amjjbonvin commented Sep 10, 2024 via email

@sverhoeven
Copy link
Contributor

The haddock3-webapp uses haddock.clis.restraints.webservice module as a webservice to perform restraints calculations and preprocess pdb files using pdbtools package.
If the haddock.clis.restraints is removed then the haddock3 webapp would need a similar webservice preferable with an openapi specification.

Good point @sverhoeven - my plan is to use haddock-restraints as WA, same as it will be in the GenTBL service. Need to coordinate this removal together with this addition. We will figure out which goes first, but i'll keep this in mind.

Then we can also remove src/haddock/clis/restraints/webservice.py

Not sure if that's what you mean

The idea was that the haddock3-restraints is simply pointing haddock-restraints, that comes with the haddock3 installation. So, as you said before, just create an small adapter (what I was calling bindings) between the two applications.

alias haddock3-restraints="haddock-restraints"

?

WebAssembly instead of webservice would also work. Would need a nice js wrapper for the WebAssembly though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancing an existing feature of adding a new one
Projects
None yet
Development

No branches or pull requests

4 participants