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

Improvements to demo_helmholtz.py and demo_scattering_boundary_conditions.py #2992

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

RequieMa
Copy link
Contributor

Delete an unused variable in demo_helmholtz.py
Add a description for clarity in demo_scattering_boundary_conditions.py

@francesco-ballarin
Copy link
Member

@BillMaZengou please have a look at GitHub actions status that you see below your message, for instance https://github.com/FEniCS/dolfinx/actions/runs/7551811797/job/20559652794?pr=2992.

You'll find that they are failing because of a flake8 check: try to fix the whitespace issue and add a new commit with your change.

@RequieMa
Copy link
Contributor Author

Yes. Sorry for that. The white space was not clear in my IDE.
I found a way to delete it. However, I am not sure how to push the change again in this PR...

@RequieMa
Copy link
Contributor Author

@BillMaZengou please have a look at GitHub actions status that you see below your message, for instance https://github.com/FEniCS/dolfinx/actions/runs/7551811797/job/20559652794?pr=2992.

You'll find that they are failing because of a flake8 check: try to fix the whitespace issue and add a new commit with your change.

It seems that it is automatically updated.

Briefly document my steps for future reference (as it is quite difficult to notice whitespace in some IDEs, e.g. Jupyter):

  • pip install pylint or pip install flake8 to install
  • pylint <file> or flask8 <file> for checking the format issue
  • add nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR> in ~/.vimrc
  • open file with vim and solve the whitespace issue by simply pressing F5 key

https://vi.stackexchange.com/questions/454/whats-the-simplest-way-to-strip-trailing-whitespace-from-all-lines-in-a-file

@jorgensd jorgensd self-requested a review January 17, 2024 09:05
@jorgensd jorgensd changed the title Demo fix for clarity Improvements to demo_helmholtz.py and demo_scattering_boundary_conditions.py Jan 17, 2024
@jorgensd jorgensd added this pull request to the merge queue Jan 17, 2024
@francesco-ballarin
Copy link
Member

Thanks @BillMaZengou, this has now been queued for merge by @jorgensd . We may be switching soon to ruff for formatting (instead of flake8), so you may have to slightly change the steps in the first two bullets at some point in the future.

@jorgensd jorgensd added the documentation Documentation improvements or fixes label Jan 17, 2024
Merged via the queue into FEniCS:main with commit 70ae092 Jan 17, 2024
12 checks passed
@RequieMa
Copy link
Contributor Author

Thanks @BillMaZengou, this has now been queued for merge by @jorgensd . We may be switching soon to ruff for formatting (instead of flake8), so you may have to slightly change the steps in the first two bullets at some point in the future.

Thanks! I will research the format. I did not pay attention to those format before. It has been a good practice for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation improvements or fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants