Improve make and reformat files#356
Merged
20001LastOrder merged 8 commits intoAggregate-Intellect:mainfrom May 6, 2024
Merged
Conversation
Run `poetry self update && poetry install` after picking up this commit. Changes: - Change all make steps to depend on poetry being installed - Add mypy for static type checking, but leave disabled for now - Use more sophisticated lint options - Include Slack app in `make test` - Include Slack tests in `make lint` - Fail tests if coverage drops below 75% mypy gives us static type checking. It triggers many warnings, so I am disabling mypy for now and will create an issue to resolve mypy warnings.
Change code to resolve these lint warnings: - F821: Undefined names - F841: Local variable name is assigned to but never used - F811: Redefinition of unused name from line name
Change code to resolve these warnings: - F811: Redefinition of unused name from line name - W291: Trailing whitespace `make lint` will now warn and fail if files contain trailing whitespace.
flake8 is currently configured to ignore these errors: W503: Line break occurred before a binary operator E501: Line too long (82 > 79 characters) E402: Module level import not at top of file This change makes the behavior consistent for both `make lint` and `poetry run flake8`. Also removing E402 as that warning was already resolved.
Create a Makefile just for Slackapp so we can run `make test` within /sherpa/src/apps/slackapp using Slackapp's own Poetry environment. Remove knowledge of Slackapp from Sherpa's makefile. Change make to install Spacy model dependency.
This was referenced May 2, 2024
Closed
Closed
Seti17
pushed a commit
to Seti17/sherpa
that referenced
this pull request
Apr 9, 2025
…nd-format Improve make and reformat files
This file contains hidden or 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
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.
Description
Improve the Makefile by adding capabilities to
lint,formatandtest.We get a more robust set of
makecommands, including:make lintmake testmake testfails if coverage drops below 75%This PR creates a separate makefile for the Slackapp. When we run
makecommands insrc/sherpawe are just touching the sherpa_ai package, and when we runmakecommands insrc/apps/slackappwe are just touching the Slackapp package.The changes to files other than the makefile are all cosmetic, including removing
superfluous whitespace and adding lint directives. There are no logic changes.
Most of the changes are just reformatting from running
make formatin ff3848e. It is easiest to review that single commit on its own, then review the remaining changes.This is another step towards CI/CD. Once we are confident this is working nicely we can change
our github workflow to use
make testand possiblymake lint.Run
poetry self update && poetry installto pick up these changes.Type of change
Related issues
Closes #343. (this PR replaces it.)
Tracked in SHR-45.
Checklists
To speed up the review process, please follow these checklists:
Development
make format && make lint)make test)See the testing guidelines for help on tests, especially those involving web services.
Code review
💔 Thank you for submitting a pull request!