forked from lucyparsons/OpenOversight
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Upstream batch 5 #408
Merged
Merged
Upstream batch 5 #408
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
sea-kelp
force-pushed
the
upstream-batch-5
branch
from
February 4, 2024 11:17
bc06bfd
to
068a057
Compare
AetherUnbound
approved these changes
Feb 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Some of the `ModelView` based endpoints were missing a distinct name that could be used for `url_for`, and instead string concatenation was used (mostly in templates). I also moved some logic out of templates (e.g. calculation of total pay), added helper methods and made some other changed to reduce the code needed in the templates and improve readability a little bit. I also added an anonymous user class that is useful to call things like `.is_admin_or_coordinator(department)` on any `current_user` object, without first making sure the user is not anonymous. - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment.
<!-- New Contributor? Welcome! We recommend you check your privacy settings, so the name and email associated with the commits are what you want them to be. See the contribution guide at https://github.com/lucyparsons/OpenOversight/blob/develop/CONTRIB.md#recommended-privacy-settings for more infos. Also make sure you have read and abide by the code of conduct: https://github.com/lucyparsons/OpenOversight/blob/develop/CODE_OF_CONDUCT.md If this pull request is not ready for review yet, please submit it as a draft. --> lucyparsons#969 Removes the H021 tag and does the relevant clean-up. In this case, inline styles are refactored into external CSS via pre-existing stylesheets. Unsure of the CSS class names, very open to changes. One in particular I really disliked, but left a note-to-self. Historically more of a back-end dev, so apologies if I missed something obvious with these changes! - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment. (`pre-commit` technically fails on some .py files and migrations, but none of the new changes it seems)
## Fixes issue lucyparsons#970 ## Description of Changes Removes H013 from pre-commit ignore list and adds alt tag + text to <img>s where needed. Adds some tips and resources in the CONTRIB.md for folks who encounter this in the future. ## Tests and linting - [x] This branch is up-to-date with the `develop` branch. - [ ] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment.
…s#1078) ## Fixes issue Fixes lucyparsons#1077 ## Description of Changes Changes check if there are "filters" being applied to the list given in the `departments` view. If there are no filters applied then we generate a "next" link that does not automatically apply filters. ## Tests and linting - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment. --------- Co-authored-by: sea-kelp <66500457+sea-kelp@users.noreply.github.com>
## Fixes issue lucyparsons#856 ## Description of Changes Adds default of $0 in officer "Overtime Pay" field. Users don't have to fill this in if they don't have any overtime pay information and use the form faster! ## Testing and Linting - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment.
AetherUnbound
force-pushed
the
upstream-batch-5
branch
from
February 6, 2024 00:07
068a057
to
6cc6fb1
Compare
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 of Changes
Merge commits from upstream
Notes for Deployment
None!
Screenshots (if appropriate)
N/A
Tests and linting
I have rebased my changes on
main
just lint
passesjust test
passes