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

_dynamic_info_firecrest_version updated with new development #60

Merged
merged 7 commits into from
Sep 13, 2024

Conversation

khsrali
Copy link
Contributor

@khsrali khsrali commented Aug 20, 2024

/status/parameters endpoint of firecrest api is now updated with version value.
We fetch this way and drop the previous work around that was implemented.
Fixes:
#43

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.43%. Comparing base (133490a) to head (f848fdb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
aiida_firecrest/transport.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #60      +/-   ##
==========================================
+ Coverage   79.43%   82.43%   +2.99%     
==========================================
  Files           4        4              
  Lines         671      683      +12     
==========================================
+ Hits          533      563      +30     
+ Misses        138      120      -18     
Flag Coverage Δ
pytests 82.43% <94.11%> (+2.99%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@agoscinski agoscinski left a comment

Choose a reason for hiding this comment

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

Are these comments still up do date with this PR?

I am a bit confused how the function _dynamic_info_firecrest_version works. You specify a version by the value, but if it is 0 then it tries to to retrieve the version dynamically. I guess that it is 0 and not None confuses me, but fine. Maybe can you add a bit doc to it because value is not such a meaningful name?

Why is the echo only done in case it is dynamically retrieved? Maybe you can add a comment there.

tests/test_computer.py Show resolved Hide resolved
tests/test_computer.py Outdated Show resolved Hide resolved
@khsrali
Copy link
Contributor Author

khsrali commented Sep 12, 2024

Thanks a lot, @agoscinski for the review!

Are these comments still up do date with this PR?

yes, they are from the past, removed.

I am a bit confused how the function _dynamic_info_firecrest_version works. You specify a version by the value, but if it is 0 then it tries to to retrieve the version dynamically. I guess that it is 0 and not None confuses me, but fine. Maybe can you add a bit doc to it because value is not such a meaningful name?

Changed to None, doc added. Please check if it's clear. It's basically a click callback function.

Why is the echo only done in case it is dynamically retrieved? Maybe you can add a comment there.

Just to prevent verbosity. Usually when inputs are valid during setting up/configuring a computer in aiida, it remains quite.
I added echo for cases that it has to check something from the server. As a confirmation.

tests/test_computer.py Outdated Show resolved Hide resolved
tests/test_computer.py Outdated Show resolved Hide resolved
@agoscinski
Copy link
Contributor

Looks clear to me, I just simplified the pytest a little bit, check out my commit

tests/test_computer.py Outdated Show resolved Hide resolved
@khsrali
Copy link
Contributor Author

khsrali commented Sep 13, 2024

Looks clear to me, I just simplified the pytest a little bit, check out my commit

Very good @agoscinski, thanks a lot!

@khsrali khsrali merged commit 0c81663 into aiidateam:main Sep 13, 2024
7 checks passed
@khsrali khsrali deleted the dynamic_info_version branch September 13, 2024 09:46
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.

2 participants