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

Move get_machine_name to public API #7965

Merged
merged 1 commit into from
May 27, 2024

Conversation

berland
Copy link
Contributor

@berland berland commented May 24, 2024

As this function is used outside of ert, it should not be hidden below ensemble_evalutor.config.

port_handler.py serves as a placeholder for the code, but the function but exposed and should be used as ert.shared.get_machine.name()

Issue
Resolves #7888

Approach
🚚

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure tests pass locally (after every commit!)

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

As this function is used outside of ert, it should not be hidden below
ensemble_evalutor.config.

port_handler.py serves as a placeholder for the code, but the function
but exposed and should be used as ert.shared.get_machine.name()
@berland berland self-assigned this May 24, 2024
@berland berland added the release-notes:maintenance Automatically categorise as maintenance change in release notes label May 24, 2024
@berland berland changed the title Move get_machine_name to a more public place Move get_machine_name to public API May 24, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 70.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 85.80%. Comparing base (bf6d58c) to head (7c2beec).

Files Patch % Lines
src/ert/shared/port_handler.py 69.23% 4 Missing ⚠️
src/ert/ensemble_evaluator/config.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7965      +/-   ##
==========================================
- Coverage   85.81%   85.80%   -0.02%     
==========================================
  Files         378      378              
  Lines       23073    23079       +6     
  Branches      629      618      -11     
==========================================
+ Hits        19801    19803       +2     
+ Misses       3199     3195       -4     
- Partials       73       81       +8     

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


from ert.shared import get_machine_name as ert_shared_get_machine_name
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be only from ert.shared import get_machine_name as _get_machine_name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I think i prefer the explicitness of the long name. Nonetheless, we will change this again in short time when we remove the deprecated (private) API.

Copy link
Contributor

@xjules xjules left a comment

Choose a reason for hiding this comment

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

Looks good! Just had a small comment about the name

@berland berland merged commit 53503e1 into equinor:main May 27, 2024
38 checks passed
@berland berland deleted the move_get_machine_name branch June 6, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:maintenance Automatically categorise as maintenance change in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move get_machine_name to a more public looking place
3 participants