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

Added a helper function for bc related warp functions #98

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hsalehipour
Copy link
Collaborator

@hsalehipour hsalehipour commented Dec 19, 2024

Added a helper function for BCs to avoid repeated definition of identical warp functions.

Contributing Guidelines

Description

We cannot inherit methods in Warp. As a workaround, rather than repeating snippets to represent identical Warp functionalities (which is what is done currently in the code), this PR creates a helper function that keeps those methods. These methods are imported as needed inside construct_warp.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • All pytest tests pass

Linting and Code Formatting

Make sure the code follows the project's linting and formatting standards. This project uses Ruff for linting.

To run Ruff, execute the following command from the root of the repository:

ruff check .
  • Ruff passes

@mehdiataei
Copy link
Contributor

Please add the helpers to the init and import them from xlb.helper similar to the other helper functions.

Copy link
Contributor

@mehdiataei mehdiataei left a comment

Choose a reason for hiding this comment

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

See my comment above

@hsalehipour
Copy link
Collaborator Author

Please add the helpers to the init and import them from xlb.helper similar to the other helper functions.

It is not possible because the DefaultConfig is not set before xlb.init is called!

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