Coldfront update 1.1.8#48
Open
matthew-kusz wants to merge 320 commits into
Open
Conversation
Signed-off-by: Cecilia Lau <cecilialau6776@gmail.com>
Signed-off-by: Cecilia Lau <cecilialau6776@gmail.com>
…ugfix Center Summary bugfix
In preparation for upgrading to Django5, this commit cleans up the
following minor warnings/errors found by running:
```
PYTHONWARNINGS=always uv run coldfront test
```
- ResourceWarning: unclosed file <_io.TextIOWrapper name='.env' mode='r' encoding='UTF-8'>
- RemovedInDjango50Warning: The USE_L10N setting is deprecated. (always
enabled by default now)
- RemovedInDjango50Warning: The django.utils.timezone.utc alias is deprecated.
- DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
We also adjust this test case which will error out in Django5:
ERROR: test_project_attribute_create_post_required_values
ProjectAttributeCreate correctly flags missing project or value
----------------------------------------------------------------------
Traceback (most recent call last):
File "coldfront/core/project/tests/test_views.py", line 174, in test_project_attribute_create_post_required_values
self.assertFormError(response, "form", "project", "This field is required.")
File ".venv/lib/python3.12/site-packages/django/test/testcases.py", line 708, in assertFormError
self._assert_form_error(form, field, errors, msg_prefix, f"form {form!r}")
File ".venv/lib/python3.12/site-packages/django/test/testcases.py", line 674, in _assert_form_error
if not form.is_bound:
^^^^^^^^^^^^^
AttributeError: 'TemplateResponse' object has no attribute 'is_bound'
The `assertFormError` in SimpleTestCase requires a bound form instance not a
template response. Instead we check the response content to ensure we're still
on the project attribute create page.
Signed-off-by: Andrew E. Bruno <aebruno2@buffalo.edu>
Fix deprecation warnings for Django5.
Signed-off-by: Simon Leary <simon.leary42@proton.me>
document undocumented settings, document settings vs. environment variables
When syncing unix groups with FreeIPA, the group_remove_member and group_add_member commands are submitted to the IPA server separately per user. This patch modifies the FreeIPA sync command to leverage the batch command from the IPA API which can be used to send commands in the same API request. Currently the batch size is hard coded to 100 which should be sufficent. In the future consider making this a CLI arg. See here: https://freeipa.readthedocs.io/en/latest/api/basic_usage.html#batch-operations We have also been experiencing random failures on IPA API calls, for example: ``` ipa: ERROR: connect to 'https://ipa-server/ipa/json': EOF occurred in violation of protocol (_ssl.c:2427) ``` It appears this may be caused by running the IPA API bootstrapping when utils.py was imported instead of right before making an API call. This patch adds a helper function for more control over when to bootstrap the IPA API. Signed-off-by: Andrew E. Bruno <aebruno2@buffalo.edu>
Signed-off-by: Chris Diaz <24395592+chrisdaaz@users.noreply.github.com>
PR coldfront#902 did not work with postgres. This commit fixes that. Signed-off-by: Andrew E. Bruno <aebruno2@buffalo.edu>
Fix aggregation to be compatible with postgres.
- Remove default_app_config (has been deprecated since 3.2) - Fix admin.action descriptions Signed-off-by: Andrew E. Bruno <aebruno2@buffalo.edu>
Upgrade to Django 5.2
Batch commands when syncing FreeIPA.
This allows for center directors to configure which Project fields project managers are able to edit. Signed-off-by: Cecilia Lau <cecilialau6776@gmail.com>
…ds_setting add coldfront core setting for PROJECT_UPDATE_FIELDS
Squashed commits: - fix project notifs - fix allocation change detail page button spacing - fix allocation change request edit button visibility - add request change button to allocation change requests section - formatting - make test pass - Add title for grant/research output pagees - Add "Creating/updating grant/research output for project: <project>" to the appropriate pages. - Update button icons - Add space between folder icon and project title on home page - Fix select all for add user to project - Merge branch 'main' into ui_fixes - fix allocation change detail button margins Signed-off-by: Cecilia Lau <cecilialau6776@gmail.com>
Squashed commits: - add emails for user added to a project/allocation - set default sender for emails to EMAIL_SENDER - remove redundant EMAIL_ENABLED checks, set default email sender to EMAIL_SENDER - add project archived email - add get_user_emails method for Project and Allocation - fix missing redirect, remove redundant CENTER_NAME from ctx Signed-off-by: Cecilia Lau <cecilialau6776@gmail.com>
…roject-access-tests Add additional access checks for existing project tests and fix comments
…lp-text Add slurm help text on the home page and allocation page
Signed-off-by: Simon Leary <simon.leary42@proton.me>
fix HTML linter errors
Signed-off-by: Matthew Kusz <kuszm646@gmail.com>
make use of f-strings
…lurm-doc Add new Slurm config options to documentation
…cations Add more email notifs + cleanup email code
…odelform Update AllocationCreateView
…r-boilerplate remove attribute validation boilerplate, add tests, improve tests
optimize user counts
remove the implementation in UserTable
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.
No description provided.