Skip to content

Conversation

@mgiulini
Copy link
Contributor

@mgiulini mgiulini commented Sep 25, 2023

You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines and that you comply with the following criteria:

  • You have sticked to Python. Please talk to us before adding other programming languages to HADDOCK3
  • Your PR is about CNS
  • Your code is well documented: proper docstrings and explanatory comments for those tricky parts
  • You structured the code into small functions as much as possible. You can use classes if there is a (state) purpose
  • Your code follows our coding style
  • You wrote tests for the new code
  • tox tests pass. Run tox command inside the repository folder
  • -test.cfg examples execute without errors. Inside examples/ run python run_tests.py -b
  • PR does not add any dependencies, unless permission granted by the HADDOCK team
  • PR does not break licensing
  • Your PR is about writing documentation for already existing code 🔥
  • Your PR is about writing tests for already existing code :godmode:

Closes #704 by adding information about input models in the io.json file of each module. This makes each module self-describing, i.e., all the I/O information is present in the module directory, thus facilitating the information retrieval.

An example application of this will be provided in the implementation of interactive commands (#686) that have to deal with small pieces of a HADDOCK3 run (modules) without having access to the whole run folder.

@mgiulini mgiulini self-assigned this Sep 25, 2023
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (b93fbe9) 74.92% compared to head (70967e8) 74.97%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #705      +/-   ##
==========================================
+ Coverage   74.92%   74.97%   +0.05%     
==========================================
  Files         113      113              
  Lines        8035     8048      +13     
==========================================
+ Hits         6020     6034      +14     
+ Misses       2015     2014       -1     
Files Coverage Δ
src/haddock/modules/__init__.py 73.88% <100.00%> (+0.16%) ⬆️
src/haddock/modules/analysis/clustfcc/__init__.py 88.02% <100.00%> (ø)
src/haddock/modules/analysis/clustrmsd/__init__.py 90.99% <100.00%> (ø)
...rc/haddock/modules/analysis/rmsdmatrix/__init__.py 89.33% <100.00%> (ø)
tests/test_module_clustfcc.py 100.00% <100.00%> (ø)
src/haddock/modules/analysis/caprieval/__init__.py 34.28% <0.00%> (ø)
src/haddock/modules/analysis/seletop/__init__.py 52.38% <0.00%> (ø)
...haddock/modules/analysis/seletopclusts/__init__.py 22.22% <0.00%> (ø)
src/haddock/modules/refinement/emref/__init__.py 18.91% <0.00%> (ø)
src/haddock/modules/refinement/flexref/__init__.py 21.33% <0.00%> (ø)
... and 7 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mgiulini mgiulini marked this pull request as ready for review September 26, 2023 07:57
VGPReys
VGPReys previously approved these changes Sep 26, 2023
Copy link
Contributor

@VGPReys VGPReys left a comment

Choose a reason for hiding this comment

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

Quite dangerous to modify a function name that is used all around the software !
I have double checked that all files containing this functions were modified, and it should run smoothly.

! Just that people may have to modify this function call in unmerged branches too !

Do we want a to temporarly add a deprection warning and a function wrapper ?

def export_output_models(self, *args, **kwargs):
    self.export_io_models(*args, **kwargs)
    print('WARNING: function export_output_models is depecated, use export_io_models instead')

?

@mgiulini
Copy link
Contributor Author

Quite dangerous to modify a function name that is used all around the software ! I have double checked that all files containing this functions were modified, and it should run smoothly.

! Just that people may have to modify this function call in unmerged branches too !

Do we want a to temporarly add a deprection warning and a function wrapper ?

def export_output_models(self, *args, **kwargs):
    self.export_io_models(*args, **kwargs)
    print('WARNING: function export_output_models is depecated, use export_io_models instead')

?

no need for that: as soon as this PR is accepted and merged into the main branch, any further modification will have to merge the main into itself, possibly highlighting a conflict.

I am adding a test to this function though, to make it pass the patch coverage test.

@mgiulini
Copy link
Contributor Author

added a new test, but it's not enough for the patch coverage to pass..It does not make sense to create 12 new tests, so I would skip it and merge this as is.

@mgiulini mgiulini requested a review from VGPReys September 26, 2023 13:21
@mgiulini mgiulini merged commit 73d3e8d into main Sep 26, 2023
@mgiulini mgiulini deleted the input_to_json branch September 26, 2023 14:14
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 input information to IO json files

3 participants