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

improve meep code quality #2163

Open
3 of 10 tasks
joamatab opened this issue Jul 29, 2022 · 3 comments
Open
3 of 10 tasks

improve meep code quality #2163

joamatab opened this issue Jul 29, 2022 · 3 comments

Comments

@joamatab
Copy link
Contributor

joamatab commented Jul 29, 2022

Improve quality code:

  • add pre-commit hooks for keeping the quality up and apply black format (clean code #2164)
  • add type annotations
  • fix mypy issues
  • fix flake8 for syntax errors flake8 python --count gives 1193 errors
  • simplify code (clean code #2164)
  • Replace if statement with if expression (assign-if-exp)
  • Convert for loop into list comprehension (list-comprehension)
  • use fstrings

Keep up quality code

@joamatab joamatab mentioned this issue Jul 29, 2022
@joamatab
Copy link
Contributor Author

may require rebasing existing PRs

#662

@ianwilliamson
Copy link
Contributor

meep.adjoint.* had the yapf formatter applied to it, but I am not sure if subsequent PRs kept this up. See #1590 (comment)

@joamatab
Copy link
Contributor Author

joamatab commented Aug 1, 2022

We applied black to python code and clang to the c++

Now it runs with pre-commit hook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants