-
-
Notifications
You must be signed in to change notification settings - Fork 323
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
grass.jupyter: Add docstrings, f-strings, fix var names, imports #2200
Merged
wenzeslaus
merged 1 commit into
OSGeo:main
from
wenzeslaus:simple-pylint-fixes-for-jupyter
Feb 13, 2022
Merged
grass.jupyter: Add docstrings, f-strings, fix var names, imports #2200
wenzeslaus
merged 1 commit into
OSGeo:main
from
wenzeslaus:simple-pylint-fixes-for-jupyter
Feb 13, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
wenzeslaus
commented
Feb 13, 2022
- Add missing docstrings.
- Reorder imports (with both pylint and isort).
- Use full-word variable names.
- Use f-strings if possible. Here it replaces smart, but hard to decode, dictionary usage in format, by simple, although longer, direct use of the dictionary.
* Add missing docstrings. * Reorder imports (with both pylint and isort). * Use full-word variable names. * Use f-strings if possible. Here it replaces smart, but hard to decode, dictionary usage in format, by simple, although longer, direct use of the dictionary.
wenzeslaus
added a commit
that referenced
this pull request
Feb 15, 2022
This adds Pylint check job in a new workflow. It uses the current latest Pylint and latest Python. It uses Pylint to check for minimal supported Python version. The check runs for the grass package (python/grass) and for wxGUI (gui/wxpython). However, most of the files are ignored. Each of the directories has its own .pylintrc file. Pylint runs for grass.jupyter and grass.benchmark with only slightly modified configuration after fixes in targeted files (#2199, #2200, #2201, #2206). The approach for future compliance is that the other sub-packages should also eventually comply with default or almost default configuration. For wxGUI, many Pylint messages are disabled and numbers driving coding standard limits, such as max number of local variables, are greatly loosened. Many of the disabled messages show real errors, but ignoring these for now allowed for enabling the check right away at least for the least problematic directories. The approach for future compliance is that new directories can be added (removed from ignore paths) and new issues can be checked (removed from disable) when fixed. This compiles the code. Just testing Python functions from the grass package in the python directory does not require compiled code and package on path when started from the python directory, but checking other files requires packages on path. The config file is in the python directory because that's the focus of this PR. (In the future, GUI may have a different config file, e.g., due to different naming conventions. On the other hand, in an ideal case, the whole source code will use this file or even a more strict version of this file in the future.) Pylint should produce warning for disabled warnings which are not generated, although that seems to not be the case right now (useless-suppression). The only code change here is that Pylint disable comment needs to be on the same line or inside (). It needs to install also all optional Python dependencies because Pylint checks (can check unless disabled) all imports. This change is applied also to pytest workflow. Using workflow on settings to run on push only to main and release branches and semver tags. It uses strategy.matrix.include to get job-level config variables without using environmental variables.
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Oct 26, 2022
…eo#2200) * Add missing docstrings. * Reorder imports (with both pylint and isort). * Use full-word variable names. * Use f-strings if possible. Here it replaces smart, but hard to decode, dictionary usage in format, by simple, although longer, direct use of the dictionary.
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Oct 26, 2022
This adds Pylint check job in a new workflow. It uses the current latest Pylint and latest Python. It uses Pylint to check for minimal supported Python version. The check runs for the grass package (python/grass) and for wxGUI (gui/wxpython). However, most of the files are ignored. Each of the directories has its own .pylintrc file. Pylint runs for grass.jupyter and grass.benchmark with only slightly modified configuration after fixes in targeted files (OSGeo#2199, OSGeo#2200, OSGeo#2201, OSGeo#2206). The approach for future compliance is that the other sub-packages should also eventually comply with default or almost default configuration. For wxGUI, many Pylint messages are disabled and numbers driving coding standard limits, such as max number of local variables, are greatly loosened. Many of the disabled messages show real errors, but ignoring these for now allowed for enabling the check right away at least for the least problematic directories. The approach for future compliance is that new directories can be added (removed from ignore paths) and new issues can be checked (removed from disable) when fixed. This compiles the code. Just testing Python functions from the grass package in the python directory does not require compiled code and package on path when started from the python directory, but checking other files requires packages on path. The config file is in the python directory because that's the focus of this PR. (In the future, GUI may have a different config file, e.g., due to different naming conventions. On the other hand, in an ideal case, the whole source code will use this file or even a more strict version of this file in the future.) Pylint should produce warning for disabled warnings which are not generated, although that seems to not be the case right now (useless-suppression). The only code change here is that Pylint disable comment needs to be on the same line or inside (). It needs to install also all optional Python dependencies because Pylint checks (can check unless disabled) all imports. This change is applied also to pytest workflow. Using workflow on settings to run on push only to main and release branches and semver tags. It uses strategy.matrix.include to get job-level config variables without using environmental variables.
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Feb 17, 2023
…eo#2200) * Add missing docstrings. * Reorder imports (with both pylint and isort). * Use full-word variable names. * Use f-strings if possible. Here it replaces smart, but hard to decode, dictionary usage in format, by simple, although longer, direct use of the dictionary.
ninsbl
pushed a commit
to ninsbl/grass
that referenced
this pull request
Feb 17, 2023
This adds Pylint check job in a new workflow. It uses the current latest Pylint and latest Python. It uses Pylint to check for minimal supported Python version. The check runs for the grass package (python/grass) and for wxGUI (gui/wxpython). However, most of the files are ignored. Each of the directories has its own .pylintrc file. Pylint runs for grass.jupyter and grass.benchmark with only slightly modified configuration after fixes in targeted files (OSGeo#2199, OSGeo#2200, OSGeo#2201, OSGeo#2206). The approach for future compliance is that the other sub-packages should also eventually comply with default or almost default configuration. For wxGUI, many Pylint messages are disabled and numbers driving coding standard limits, such as max number of local variables, are greatly loosened. Many of the disabled messages show real errors, but ignoring these for now allowed for enabling the check right away at least for the least problematic directories. The approach for future compliance is that new directories can be added (removed from ignore paths) and new issues can be checked (removed from disable) when fixed. This compiles the code. Just testing Python functions from the grass package in the python directory does not require compiled code and package on path when started from the python directory, but checking other files requires packages on path. The config file is in the python directory because that's the focus of this PR. (In the future, GUI may have a different config file, e.g., due to different naming conventions. On the other hand, in an ideal case, the whole source code will use this file or even a more strict version of this file in the future.) Pylint should produce warning for disabled warnings which are not generated, although that seems to not be the case right now (useless-suppression). The only code change here is that Pylint disable comment needs to be on the same line or inside (). It needs to install also all optional Python dependencies because Pylint checks (can check unless disabled) all imports. This change is applied also to pytest workflow. Using workflow on settings to run on push only to main and release branches and semver tags. It uses strategy.matrix.include to get job-level config variables without using environmental variables.
neteler
pushed a commit
to nilason/grass
that referenced
this pull request
Nov 7, 2023
…eo#2200) * Add missing docstrings. * Reorder imports (with both pylint and isort). * Use full-word variable names. * Use f-strings if possible. Here it replaces smart, but hard to decode, dictionary usage in format, by simple, although longer, direct use of the dictionary.
neteler
pushed a commit
to nilason/grass
that referenced
this pull request
Nov 7, 2023
This adds Pylint check job in a new workflow. It uses the current latest Pylint and latest Python. It uses Pylint to check for minimal supported Python version. The check runs for the grass package (python/grass) and for wxGUI (gui/wxpython). However, most of the files are ignored. Each of the directories has its own .pylintrc file. Pylint runs for grass.jupyter and grass.benchmark with only slightly modified configuration after fixes in targeted files (OSGeo#2199, OSGeo#2200, OSGeo#2201, OSGeo#2206). The approach for future compliance is that the other sub-packages should also eventually comply with default or almost default configuration. For wxGUI, many Pylint messages are disabled and numbers driving coding standard limits, such as max number of local variables, are greatly loosened. Many of the disabled messages show real errors, but ignoring these for now allowed for enabling the check right away at least for the least problematic directories. The approach for future compliance is that new directories can be added (removed from ignore paths) and new issues can be checked (removed from disable) when fixed. This compiles the code. Just testing Python functions from the grass package in the python directory does not require compiled code and package on path when started from the python directory, but checking other files requires packages on path. The config file is in the python directory because that's the focus of this PR. (In the future, GUI may have a different config file, e.g., due to different naming conventions. On the other hand, in an ideal case, the whole source code will use this file or even a more strict version of this file in the future.) Pylint should produce warning for disabled warnings which are not generated, although that seems to not be the case right now (useless-suppression). The only code change here is that Pylint disable comment needs to be on the same line or inside (). It needs to install also all optional Python dependencies because Pylint checks (can check unless disabled) all imports. This change is applied also to pytest workflow. Using workflow on settings to run on push only to main and release branches and semver tags. It uses strategy.matrix.include to get job-level config variables without using environmental variables.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.