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

Refactor scoring pipeline #38

Merged
merged 14 commits into from
Jul 26, 2021
Merged

Refactor scoring pipeline #38

merged 14 commits into from
Jul 26, 2021

Conversation

rvhonorato
Copy link
Member

@rvhonorato rvhonorato commented Jul 23, 2021

This PR is a small refactoring to the scoring pipeline that implements #37 and adds a Setup python module, in which we should centralize the validations related to the .toml file.

I also re-introduced the haddock-style begin/ and data/ directories.

@rvhonorato rvhonorato self-assigned this Jul 23, 2021
begin_mol = (begin_dir / f'{mol_identifier}.pdb').absolute()
shutil.copy(input_mol, begin_mol)

input_params['molecules'][mol_identifier] = begin_mol
Copy link
Member

Choose a reason for hiding this comment

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

How do you keep the link between the new begin_mol and the original mol_identifier path that is now in data_dir?

Copy link
Member Author

Choose a reason for hiding this comment

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

You don't, the data is there just for safekeeping the pre-processed inputs, it's how its done in production (2.4)

@joaomcteixeira
Copy link
Member

Adding my suggestions at: https://github.com/rvhonorato/haddock3/pull/1

@joaomcteixeira joaomcteixeira added the enhancement Enhancing an existing feature of adding a new one label Jul 24, 2021
Following: #39
I added a simplified scoring toml so that the run executes.
Avoids having lots of files under the main `haddock` source folder.
@joaomcteixeira
Copy link
Member

Okay. I think I finished reviewing your PR; my reviews and suggestions at: https://github.com/rvhonorato/haddock3/pull/1, if you accept them they will become part of this PR automatically.

It is a great idea @rvhonorato to firstly check the configuration file and prepare the files and folders for run. I like that idea. My suggestions in your branch are basically pythonic and architecture refactoring. I dislike the OOP-everywhere paradigm. It might be worthwhile in other languages but in python not really. It is useful where it is useful, but creates a lot of headaches otherwise. I haven't implemented any tests, but you'll see tests are easy to write with the changes I propose.

You'll notice the new folder gear/. We can call it differently if you wish. But to my experience, I am organizing my code in three main folders: clis/, libs/ and gear/. libs have all the general and abstract implementations, those that can serve anywhere in the project. While gear/ is dedicated to specific logic to serve specific implementations. To my experience, this gives very nice results. I rename haddock.setup.py because setup.py has a very specific meaning in the python world, and it may confuse other developers or us in the future.

Let me know,
cheers!

@rvhonorato
Copy link
Member Author

Thanks for the review and the edits @joaomcteixeira !

@rvhonorato rvhonorato merged commit 4e903b2 into haddocking:main Jul 26, 2021
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

Successfully merging this pull request may close these issues.

2 participants