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

Converted examples to functional. Made compute_backend name consistent. #105

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

mehdiataei
Copy link
Contributor

@mehdiataei mehdiataei commented Jan 16, 2025

Contributing Guidelines

Description

  • Converted examples to functional (except lid-driven cavity, as it has a distributed version that inherits from it)
  • Made compute_backend name consistent

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

Copy link
Collaborator

@hsalehipour hsalehipour left a comment

Choose a reason for hiding this comment

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

Please move all function defintion in the examples to the top of the file. Then start all the scripts one after another. Right now, functions and scripts are mixed up together.

@mehdiataei
Copy link
Contributor Author

That is not always possible since we use those calls and values in the following functions. Because this is a script rather than reusable functions, it is completely acceptable to not pass those parameters and instead just use them inside the function.

@mehdiataei
Copy link
Contributor Author

It IS a bad practice (and a linting error) to assume those values will be available in "future" calls. Codes must be well defined if read from top.

@hsalehipour
Copy link
Collaborator

please run ruff format . before merge. Otherwise this PR looks good to me.

@hsalehipour
Copy link
Collaborator

This PR addressed issue #103

@mehdiataei
Copy link
Contributor Author

Pls finish this

@hsalehipour
Copy link
Collaborator

I like the latest changes. Can you please also run ruff format . There are several changes coming out as a result.

@mehdiataei
Copy link
Contributor Author

It does not. make sure to use the correct ruff config (the checks are also passed here, so there should't be an issue).

@mehdiataei
Copy link
Contributor Author

mehdiataei commented Feb 4, 2025

~/Repos/XLB/examples$ ruff check .
All checks passed!

~/Repos/XLB/examples$ ruff format .
6 files left unchanged

There was on extra space that I just pushed.

@hsalehipour
Copy link
Collaborator

please do ruff format . on all folder not just example.

@mehdiataei mehdiataei merged commit cfb4cfb into Autodesk:main Feb 4, 2025
10 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants