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 version handling #1205

Merged
merged 6 commits into from
Oct 13, 2023
Merged

Refactor version handling #1205

merged 6 commits into from
Oct 13, 2023

Conversation

PProfizi
Copy link
Contributor

@PProfizi PProfizi commented Oct 12, 2023

This PR proposes a refactor of ansys.dpf.core._version.py's server_to_ansys_version to enable handling XXXX.Y.Z DPF versioning while retaining retro-compatibility.
It also removes server_to_ansys_grpc_dpf_version as ansys.grpc.dpf is now shipped within ansys-dpf-core.
Instead, what is checked when connecting to a server via gRPC is whether the DPF server we try to connect to has a version at least equal to the min_server_version variable, which is the minimal DPF version supported by the current ansys-dpf-core package.

@PProfizi PProfizi added enhancement New feature or request CI/CD Related to CI/CD labels Oct 12, 2023
@PProfizi PProfizi self-assigned this Oct 12, 2023
@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Merging #1205 (6c89e86) into master (8605173) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1205      +/-   ##
==========================================
- Coverage   87.25%   87.24%   -0.01%     
==========================================
  Files          81       81              
  Lines        9224     9223       -1     
==========================================
- Hits         8048     8047       -1     
  Misses       1176     1176              

}

class ServerToAnsysVersion:
legacy_version_map = {
Copy link
Contributor

Choose a reason for hiding this comment

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

why is that called legacy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cbellot000 the legacy versioning logic, vs the new one following the Ansys product versioning, but I can change the name, no problem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think calling it legacy makes it clear it should not be changed.

@PProfizi PProfizi merged commit 2ed94b1 into master Oct 13, 2023
32 checks passed
@PProfizi PProfizi deleted the maint/refactor_server_to_grpc branch October 13, 2023 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Related to CI/CD enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants