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

correct mappings #7

Merged
merged 12 commits into from
Aug 30, 2023
Merged

correct mappings #7

merged 12 commits into from
Aug 30, 2023

Conversation

lucacarniato
Copy link
Contributor

No description provided.

from_meshkernel_mesh2d_to_ugrid_mesh2d now also includes face_edges and edge_faces
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

ugrid/ugrid.py Outdated
elif system == "Darwin":
lib_path = Path(__file__).parent / "UGridApi.dylib"
lib_path = os.path.join(lib_path, "UGridApi.dylib")

Choose a reason for hiding this comment

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

Where is the macOS build config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

now only windows is supported

ugrid/ugrid.py Outdated
elif system == "Linux":
lib_path = Path(__file__).parent / "UGridApi.so"
lib_path = os.path.join(lib_path, "UGridApi.so")

Choose a reason for hiding this comment

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

TC job can be made a bit nicer with subprojects.

ugrid/ugrid.py Outdated
Comment on lines 48 to 59
system = platform.system()
lib_path = Path(__file__).parent
if system == "Windows":
lib_path = Path(__file__).parent / "UGridApi.dll"
lib_path = os.path.join(lib_path, "UGridApi.dll")
elif system == "Linux":
lib_path = Path(__file__).parent / "UGridApi.so"
lib_path = os.path.join(lib_path, "UGridApi.so")
elif system == "Darwin":
lib_path = Path(__file__).parent / "UGridApi.dylib"
lib_path = os.path.join(lib_path, "UGridApi.dylib")
else:
if not system:
system = "Unknown OS"
raise OSError(f"Unsupported operating system: {system}")

Choose a reason for hiding this comment

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

Can be moved to a free function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to a private function

Choose a reason for hiding this comment

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

Shall we add a formatting action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

if len(arr) == 0:
return None
return as_ctypes(arr)
if arr is not None and len(arr) > 0:
Copy link

@ahmad-el-sayed ahmad-el-sayed Aug 24, 2023

Choose a reason for hiding this comment

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

Can simply use if arr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, you get an error

@lucacarniato lucacarniato marked this pull request as ready for review August 24, 2023 10:20
@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@lucacarniato lucacarniato merged commit c2847aa into main Aug 30, 2023
@lucacarniato lucacarniato deleted the feature/correct_mappings branch August 30, 2023 15:04
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