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

Fix bugs introduced during documentation #468

Closed
jesper-friis opened this issue Jan 10, 2023 · 1 comment · Fixed by #591 or #583
Closed

Fix bugs introduced during documentation #468

jesper-friis opened this issue Jan 10, 2023 · 1 comment · Fixed by #591 or #583
Labels
bug Something isn't working

Comments

@jesper-friis
Copy link
Collaborator

jesper-friis commented Jan 10, 2023

PR #415 introduced some bugs and issues that must be fixed.

globmatch was changed to regex in the query() method of some python storage plugins. This is a bug that must be fixed. We want a consistent behaviour between all storage plugins, regardless whether they are implemented in C or Python.

In many places was several statements combined into oneliners. First this makes the code less readable. Often this duplicate function calls which are inefficient and in the cases the function has side effects lead to hard to debug bugs.
This must be fixed. Unfortunately all the changes in the code makes it difficult to find these bugs.

Assert statements should not be removed. Used correctly, they are a good way to ensuring code consistency.

Single backticks around variable names in both python and swig interface files was changed to double backticks. That is not in line with google docstrings that dlite uses and makes the docstrings less readable. This should be reverted. If the documentation system for some reason require double backtics, the right solution is to make a copy of the source file using a regex to replace single backticks with double backtics.

Python docstrings should be easy to read with the builtin help function and should not be bloated with triple backticks around code examples. Instead, examples should instead use ">>> " to make them testable with doctest.

@jesper-friis jesper-friis added the bug Something isn't working label Jan 10, 2023
This was linked to pull requests Aug 13, 2023
@jesper-friis
Copy link
Collaborator Author

Closing this issue, since the bad code introduced in the PR finally starts to get cleaned up...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant