diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d87de0bc18..d354cb6064 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,7 @@ name: CI on: + workflow_dispatch: pull_request: branches: - main @@ -8,26 +9,60 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12", "3.13"] + node-version: ["24.x"] env: - PLUGIN_API: True + PLUGIN_API: true + DJANGO_VITE_DEV_MODE: true steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install uv and set the python version - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b + with: + python-version: ${{ matrix.python-version }} + + - name: Install Node.js + uses: actions/setup-node@v6 + with: + node-version: ${{ matrix.node-version }} - name: Install the project run: uv sync --locked --dev + - name: Install frontend packages + run: npm --prefix coldfront/static install + - name: Check for lint violations run: uv run ruff check - name: Check formatting run: uv run ruff format --check + - name: Check frontend with eslint and prettier + run: npm --prefix coldfront/static run check + + - name: Compile and bundle frontend static assets + run: npm --prefix coldfront/static run build + + - name: Check bundled frontend static assets have been commited + run: | + if [[ `git status --porcelain` ]]; then + echo "Error: pre-compiled bundled frontend static assets have not been committed" + git status + exit 1 + else + echo "Bundled frontend static assets check passed." + fi + - name: Check licence with reuse run: uv run reuse lint - name: Run tests run: uv run coldfront test + + - name: Check for migrations + run: uv run coldfront makemigrations --check diff --git a/.gitignore b/.gitignore index ee461c0dc0..da7cd1cd51 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ coldfront.egg-info dist build +.zed/ *._* *.DS_Store *.swp @@ -20,8 +21,6 @@ db.json .env .devcontainer/* .bin/* -cert.pem -kep.pem +node_modules coldfront.log -apa.txt pyrightconfig.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 134b754ed4..18ff210ba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,119 +1,147 @@ # ColdFront Changelog +## [1.1.8] - 2026-05-11 + +- Add podman support [#733](https://github.com/coldfront/coldfront/pull/733) +- Remediated mark_safe calls to prevent XSS attacks [#734](https://github.com/coldfront/coldfront/pull/734) +- Allow admins to edit Allocation Attributes [#672](https://github.com/coldfront/coldfront/issues/672) +- Fix center summary bug [#793](https://github.com/coldfront/coldfront/issues/793) +- Add more allocation info on the add project user page [#803](https://github.com/coldfront/coldfront/pull/803) +- Fix when the allocation activate user signal is sent [#837](https://github.com/coldfront/coldfront/pull/837) +- Fix error when editing a project attribute that is unique [#839](https://github.com/coldfront/coldfront/pull/839) +- project_openldap plugin updates [#827](https://github.com/coldfront/coldfront/issues/827) +- Show resource description in allocation creation form [#833](https://github.com/coldfront/coldfront/pull/833) +- Fix AttributeError bug [#791](https://github.com/coldfront/coldfront/issues/791) +- Add allocation attributes, allocation users, and project attributes to the REST API [#822](https://github.com/coldfront/coldfront/pull/822) +- Add more info to project review emails [#841](https://github.com/coldfront/coldfront/pull/841) +- Fix crash when approving an allocation change request with attribute changes [#847](https://github.com/coldfront/coldfront/pull/847) +- Cleanup pending migrations from django_history [#834](https://github.com/coldfront/coldfront/pull/834) +- Database Query Reductions [#875](https://github.com/coldfront/coldfront/pull/875) +- Upgrade to Django 5.2 [#903](https://github.com/coldfront/coldfront/pull/903) +- Batch commands in bulk when syncing FreeIPA [#907](https://github.com/coldfront/coldfront/pull/907) +- Add slurm help text on the home page and allocation page [#878](https://github.com/coldfront/coldfront/pull/878) +- Allow project managers to view allocations [#913](https://github.com/coldfront/coldfront/pull/913) +- Refactor frontend css/javascript assets to use vite [#911](https://github.com/coldfront/coldfront/pull/911) +- Switch center summary charts to use chart.js [#916](https://github.com/coldfront/coldfront/pull/916) +- Upgrade to Bootstrap 5 [#919](https://github.com/coldfront/coldfront/pull/919) +- Fix filter for allocations in ProjectDetailView [#923](https://github.com/coldfront/coldfront/pull/923) +- Add support for slurm parent accounts [#782](https://github.com/coldfront/coldfront/pull/782) +- Add support for serving ColdFront from a base path + ## [1.1.7] - 2025-07-22 -- Automatically change default Slurm account if removal causes conflicts [#597](https://github.com/ubccr/coldfront/pull/597) -- Fix allocation request list displays incorrect date for allocation renewals [#647](https://github.com/ubccr/coldfront/issues/647) -- Add allocation limits for a resource [#667](https://github.com/ubccr/coldfront/pull/667) -- Add REST API [#632](https://github.com/ubccr/coldfront/pull/632) -- Migrate to UV [#677](https://github.com/ubccr/coldfront/pull/677) -- Add EULA enforcement [#671](https://github.com/ubccr/coldfront/pull/671) -- Contiguous Internal Project ID [#646](https://github.com/ubccr/coldfront/pull/646) -- Add auto-compute allocation plugin [#698](https://github.com/ubccr/coldfront/pull/698) -- Add project openldap plugin [#696](https://github.com/ubccr/coldfront/pull/696) -- Add institution feature [#670](https://github.com/ubccr/coldfront/pull/670) -- Update Dockerfile [#715](https://github.com/ubccr/coldfront/pull/715) +- Automatically change default Slurm account if removal causes conflicts [#597](https://github.com/coldfront/coldfront/pull/597) +- Fix allocation request list displays incorrect date for allocation renewals [#647](https://github.com/coldfront/coldfront/issues/647) +- Add allocation limits for a resource [#667](https://github.com/coldfront/coldfront/pull/667) +- Add REST API [#632](https://github.com/coldfront/coldfront/pull/632) +- Migrate to UV [#677](https://github.com/coldfront/coldfront/pull/677) +- Add EULA enforcement [#671](https://github.com/coldfront/coldfront/pull/671) +- Contiguous Internal Project ID [#646](https://github.com/coldfront/coldfront/pull/646) +- Add auto-compute allocation plugin [#698](https://github.com/coldfront/coldfront/pull/698) +- Add project openldap plugin [#696](https://github.com/coldfront/coldfront/pull/696) +- Add institution feature [#670](https://github.com/coldfront/coldfront/pull/670) +- Update Dockerfile [#715](https://github.com/coldfront/coldfront/pull/715) ## [1.1.6] - 2024-03-27 -- Upgrade to Django 4.2 LTS [#601](https://github.com/ubccr/coldfront/pull/601) -- Update python version in Dockerfile to 3.8 [#578](https://github.com/ubccr/coldfront/pull/578) -- Add factoryboy Project and Allocation unit tests [#546](https://github.com/ubccr/coldfront/pull/546) -- Add docs for configuring LDAP auth against Active Directory [#556](https://github.com/ubccr/coldfront/pull/556) -- Fix grants formatting error [#442](https://github.com/ubccr/coldfront/issues/442) -- Add docs on creating a plugin [#472](https://github.com/ubccr/coldfront/issues/472) -- Add justification to allocation invoices [#305](https://github.com/ubccr/coldfront/issues/305) -- Add docs on configuring generic OIDC auth [#528](https://github.com/ubccr/coldfront/pull/528) -- Fix bug where notifications were auto-enabled user role changed [#457](https://github.com/ubccr/coldfront/issues/457) -- Add LDAP user search custom mapping and TLS support [#545](https://github.com/ubccr/coldfront/pull/545) -- Add docs on `collect static` for `SITE_STATIC` usage [#358](https://github.com/ubccr/coldfront/issues/358) -- Add signal for new allocation requests [#549](https://github.com/ubccr/coldfront/pull/549) +- Upgrade to Django 4.2 LTS [#601](https://github.com/coldfront/coldfront/pull/601) +- Update python version in Dockerfile to 3.8 [#578](https://github.com/coldfront/coldfront/pull/578) +- Add factoryboy Project and Allocation unit tests [#546](https://github.com/coldfront/coldfront/pull/546) +- Add docs for configuring LDAP auth against Active Directory [#556](https://github.com/coldfront/coldfront/pull/556) +- Fix grants formatting error [#442](https://github.com/coldfront/coldfront/issues/442) +- Add docs on creating a plugin [#472](https://github.com/coldfront/coldfront/issues/472) +- Add justification to allocation invoices [#305](https://github.com/coldfront/coldfront/issues/305) +- Add docs on configuring generic OIDC auth [#528](https://github.com/coldfront/coldfront/pull/528) +- Fix bug where notifications were auto-enabled user role changed [#457](https://github.com/coldfront/coldfront/issues/457) +- Add LDAP user search custom mapping and TLS support [#545](https://github.com/coldfront/coldfront/pull/545) +- Add docs on `collect static` for `SITE_STATIC` usage [#358](https://github.com/coldfront/coldfront/issues/358) +- Add signal for new allocation requests [#549](https://github.com/coldfront/coldfront/pull/549) ## [1.1.5] - 2023-07-12 -- SECURITY BUG FIX: Unprotected eval when adding publication. [#551](https://github.com/ubccr/coldfront/pull/551) +- SECURITY BUG FIX: Unprotected eval when adding publication. [#551](https://github.com/coldfront/coldfront/pull/551) - Documentation improvements ## [1.1.4] - 2023-02-11 -- Datepicker changed to flatpickr. Remove jquery-ui [#438](https://github.com/ubccr/coldfront/issues/438) -- Combined email expiry notifications [#413](https://github.com/ubccr/coldfront/pull/413) -- Remove obsolete arguments in signal defs [#422](https://github.com/ubccr/coldfront/pull/422) -- Allow sorting of users on detail page [#408](https://github.com/ubccr/coldfront/issues/408) -- Fix approve button deleting description text [#433](https://github.com/ubccr/coldfront/issues/433) -- Add Project Attributes [#466](https://github.com/ubccr/coldfront/pull/466) -- Slurm plugin: fix allocations in pending renewal status [#176](https://github.com/ubccr/coldfront/issues/176) -- Update list displayes to sort case insensitive throughout front end [#393](https://github.com/ubccr/coldfront/issues/393) -- Fix FreeIPA plugin not recognizing usernames greater than 11 characters [#416](https://github.com/ubccr/coldfront/issues/416) -- Send signal if allocation status is revoked [#474](https://github.com/ubccr/coldfront/issues/474) +- Datepicker changed to flatpickr. Remove jquery-ui [#438](https://github.com/coldfront/coldfront/issues/438) +- Combined email expiry notifications [#413](https://github.com/coldfront/coldfront/pull/413) +- Remove obsolete arguments in signal defs [#422](https://github.com/coldfront/coldfront/pull/422) +- Allow sorting of users on detail page [#408](https://github.com/coldfront/coldfront/issues/408) +- Fix approve button deleting description text [#433](https://github.com/coldfront/coldfront/issues/433) +- Add Project Attributes [#466](https://github.com/coldfront/coldfront/pull/466) +- Slurm plugin: fix allocations in pending renewal status [#176](https://github.com/coldfront/coldfront/issues/176) +- Update list displayes to sort case insensitive throughout front end [#393](https://github.com/coldfront/coldfront/issues/393) +- Fix FreeIPA plugin not recognizing usernames greater than 11 characters [#416](https://github.com/coldfront/coldfront/issues/416) +- Send signal if allocation status is revoked [#474](https://github.com/coldfront/coldfront/issues/474) - Upgrade to Django 3.2.17 -- Allow configuration of session timeout [#452](https://github.com/ubccr/coldfront/issues/452) -- Increase max length for user first_name [#490](https://github.com/ubccr/coldfront/pull/490) +- Allow configuration of session timeout [#452](https://github.com/coldfront/coldfront/issues/452) +- Increase max length for user first_name [#490](https://github.com/coldfront/coldfront/pull/490) ## [1.1.3] - 2022-07-07 -- Fix erronous allocation change request error message [#428](https://github.com/ubccr/coldfront/issues/428) -- Upgrade bootstrap and move to static assets [#405](https://github.com/ubccr/coldfront/issues/405) +- Fix erronous allocation change request error message [#428](https://github.com/coldfront/coldfront/issues/428) +- Upgrade bootstrap and move to static assets [#405](https://github.com/coldfront/coldfront/issues/405) - Allow changes on allocations in the test dataset -- Add new ColdFront logos and branding [#431](https://github.com/ubccr/coldfront/pull/431) +- Add new ColdFront logos and branding [#431](https://github.com/coldfront/coldfront/pull/431) ## [1.1.2] - 2022-07-06 -- Fix "Select all" toggle for allocations [#396](https://github.com/ubccr/coldfront/issues/396) -- Fixed allocation expiration task bug [#401](https://github.com/ubccr/coldfront/pull/401) -- Fix new user sorting [#395](https://github.com/ubccr/coldfront/issues/395) -- Fix allocation approved status [#379](https://github.com/ubccr/coldfront/issues/379) -- Add notes on project detail page [#194](https://github.com/ubccr/coldfront/issues/194) -- Add partial match for attribute search [#421](https://github.com/ubccr/coldfront/pull/421) -- Fix miscellaneous config issues [#414](https://github.com/ubccr/coldfront/issues/414) +- Fix "Select all" toggle for allocations [#396](https://github.com/coldfront/coldfront/issues/396) +- Fixed allocation expiration task bug [#401](https://github.com/coldfront/coldfront/pull/401) +- Fix new user sorting [#395](https://github.com/coldfront/coldfront/issues/395) +- Fix allocation approved status [#379](https://github.com/coldfront/coldfront/issues/379) +- Add notes on project detail page [#194](https://github.com/coldfront/coldfront/issues/194) +- Add partial match for attribute search [#421](https://github.com/coldfront/coldfront/pull/421) +- Fix miscellaneous config issues [#414](https://github.com/coldfront/coldfront/issues/414) - Upgrade to Django 3.2.14 ## [1.1.1] - 2022-04-26 -- Fix grant export to only download those found under search [#222](https://github.com/ubccr/coldfront/issues/222) -- Fix bug that allowed users to be added to inactive allocations [#386](https://github.com/ubccr/coldfront/issues/386) -- Fix allocation request approval redirect [#388](https://github.com/ubccr/coldfront/issues/388) +- Fix grant export to only download those found under search [#222](https://github.com/coldfront/coldfront/issues/222) +- Fix bug that allowed users to be added to inactive allocations [#386](https://github.com/coldfront/coldfront/issues/386) +- Fix allocation request approval redirect [#388](https://github.com/coldfront/coldfront/issues/388) - Upgrade to Django 3.2.13 -- Fix bug in slurm plugin where `SLURM_NOOP` was a str instead of a bool [#392](https://github.com/ubccr/coldfront/pull/392) +- Fix bug in slurm plugin where `SLURM_NOOP` was a str instead of a bool [#392](https://github.com/coldfront/coldfront/pull/392) ## [1.1.0] - 2022-03-09 -- Add a checkbox to 'select all' users on the project to enable/disable notifications [#291](https://github.com/ubccr/coldfront/issues/291) -- Archived grant not viewable by PI [#259](https://github.com/ubccr/coldfront/issues/259) -- Add more detail info when multiple allocations on a project for same resource [#193](https://github.com/ubccr/coldfront/issues/193) -- Admins can prevent the renewal of allocations [#203](https://github.com/ubccr/coldfront/issues/203) -- Allow logout redirect URL to be configured [#311](https://github.com/ubccr/coldfront/pull/311) -- Fix empty user search exception [#313](https://github.com/ubccr/coldfront/issues/313) -- Add allocation change requests [#294](https://github.com/ubccr/coldfront/issues/294) -- Added signal dispatch for resource allocations [#319](https://github.com/ubccr/coldfront/pull/319) -- mokey oidc plugin: Handle groups claim as list [#332](https://github.com/ubccr/coldfront/pull/332) -- Fix divide by zero error when attribute that has 0 usage [#336](https://github.com/ubccr/coldfront/issues/336) -- Allocation request flow updates [#341](https://github.com/ubccr/coldfront/issues/341) -- Add attribute expansion support [#324](https://github.com/ubccr/coldfront/pull/324) -- Fix adding not-selected publications [#343](https://github.com/ubccr/coldfront/pull/343) -- Add forward filter parameters between active-archived projects search pages [#347](https://github.com/ubccr/coldfront/pull/347) -- Fix sorting arrows for allocation search [#344](https://github.com/ubccr/coldfront/pull/344) -- SECURITY BUG FIX: Check permissions on notification updates [#348](https://github.com/ubccr/coldfront/pull/348) -- Allow site-level control of how resources ordered within an allocation [#334](https://github.com/ubccr/coldfront/issues/334) -- LDAP user search plugin: Add ldap connect timeout config option [#351](https://github.com/ubccr/coldfront/pull/351) -- Upgrade to Django v3.2 [#295](https://github.com/ubccr/coldfront/issues/295) -- Fix error on duplicate publication entry [#369](https://github.com/ubccr/coldfront/issues/369) -- Add resource list page [#323](https://github.com/ubccr/coldfront/issues/322) -- Add resource detail page [#320](https://github.com/ubccr/coldfront/issues/320) -- Fix adding publications with large number of authors [#283](https://github.com/ubccr/coldfront/issues/283) -- Allow allocation users to see allocations of all statuses [#292](https://github.com/ubccr/coldfront/issues/292) -- Show allocations for both Active and New projects [#365](https://github.com/ubccr/coldfront/pull/365) +- Add a checkbox to 'select all' users on the project to enable/disable notifications [#291](https://github.com/coldfront/coldfront/issues/291) +- Archived grant not viewable by PI [#259](https://github.com/coldfront/coldfront/issues/259) +- Add more detail info when multiple allocations on a project for same resource [#193](https://github.com/coldfront/coldfront/issues/193) +- Admins can prevent the renewal of allocations [#203](https://github.com/coldfront/coldfront/issues/203) +- Allow logout redirect URL to be configured [#311](https://github.com/coldfront/coldfront/pull/311) +- Fix empty user search exception [#313](https://github.com/coldfront/coldfront/issues/313) +- Add allocation change requests [#294](https://github.com/coldfront/coldfront/issues/294) +- Added signal dispatch for resource allocations [#319](https://github.com/coldfront/coldfront/pull/319) +- mokey oidc plugin: Handle groups claim as list [#332](https://github.com/coldfront/coldfront/pull/332) +- Fix divide by zero error when attribute that has 0 usage [#336](https://github.com/coldfront/coldfront/issues/336) +- Allocation request flow updates [#341](https://github.com/coldfront/coldfront/issues/341) +- Add attribute expansion support [#324](https://github.com/coldfront/coldfront/pull/324) +- Fix adding not-selected publications [#343](https://github.com/coldfront/coldfront/pull/343) +- Add forward filter parameters between active-archived projects search pages [#347](https://github.com/coldfront/coldfront/pull/347) +- Fix sorting arrows for allocation search [#344](https://github.com/coldfront/coldfront/pull/344) +- SECURITY BUG FIX: Check permissions on notification updates [#348](https://github.com/coldfront/coldfront/pull/348) +- Allow site-level control of how resources ordered within an allocation [#334](https://github.com/coldfront/coldfront/issues/334) +- LDAP user search plugin: Add ldap connect timeout config option [#351](https://github.com/coldfront/coldfront/pull/351) +- Upgrade to Django v3.2 [#295](https://github.com/coldfront/coldfront/issues/295) +- Fix error on duplicate publication entry [#369](https://github.com/coldfront/coldfront/issues/369) +- Add resource list page [#323](https://github.com/coldfront/coldfront/issues/322) +- Add resource detail page [#320](https://github.com/coldfront/coldfront/issues/320) +- Fix adding publications with large number of authors [#283](https://github.com/coldfront/coldfront/issues/283) +- Allow allocation users to see allocations of all statuses [#292](https://github.com/coldfront/coldfront/issues/292) +- Show allocations for both Active and New projects [#365](https://github.com/coldfront/coldfront/pull/365) ## [1.0.4] - 2021-03-25 -- Slurm plugin: disabled resource should not show up in slurm files [#235](https://github.com/ubccr/coldfront/issues/235) -- Fix ldap config [#271](https://github.com/ubccr/coldfront/issues/271) -- Add sample csv data to pip packaging [#279](https://github.com/ubccr/coldfront/issues/279) +- Slurm plugin: disabled resource should not show up in slurm files [#235](https://github.com/coldfront/coldfront/issues/235) +- Fix ldap config [#271](https://github.com/coldfront/coldfront/issues/271) +- Add sample csv data to pip packaging [#279](https://github.com/coldfront/coldfront/issues/279) - Add LDAP User Search plugin configs ## [1.0.3] - 2021-03-02 -- Refactor ColdFront settings [#264](https://github.com/ubccr/coldfront/pull/264) +- Refactor ColdFront settings [#264](https://github.com/coldfront/coldfront/pull/264) - Lots of documenation updates now hosted on readthedocs. [see here](https://coldfront.readthedocs.io) - Fix setuptools for pip installs @@ -150,17 +178,18 @@ - Initial release -[0.0.1]: https://github.com/ubccr/coldfront/releases/tag/v0.0.1 -[1.0.1]: https://github.com/ubccr/coldfront/releases/tag/v1.0.1 -[1.0.2]: https://github.com/ubccr/coldfront/releases/tag/v1.0.2 -[1.0.3]: https://github.com/ubccr/coldfront/releases/tag/v1.0.3 -[1.0.4]: https://github.com/ubccr/coldfront/releases/tag/v1.0.4 -[1.1.0]: https://github.com/ubccr/coldfront/releases/tag/v1.1.0 -[1.1.1]: https://github.com/ubccr/coldfront/releases/tag/v1.1.1 -[1.1.2]: https://github.com/ubccr/coldfront/releases/tag/v1.1.2 -[1.1.3]: https://github.com/ubccr/coldfront/releases/tag/v1.1.3 -[1.1.4]: https://github.com/ubccr/coldfront/releases/tag/v1.1.4 -[1.1.5]: https://github.com/ubccr/coldfront/releases/tag/v1.1.5 -[1.1.6]: https://github.com/ubccr/coldfront/releases/tag/v1.1.6 -[1.1.7]: https://github.com/ubccr/coldfront/releases/tag/v1.1.7 -[Unreleased]: https://github.com/ubccr/coldfront/compare/v1.1.7...HEAD +[0.0.1]: https://github.com/coldfront/coldfront/releases/tag/v0.0.1 +[1.0.1]: https://github.com/coldfront/coldfront/releases/tag/v1.0.1 +[1.0.2]: https://github.com/coldfront/coldfront/releases/tag/v1.0.2 +[1.0.3]: https://github.com/coldfront/coldfront/releases/tag/v1.0.3 +[1.0.4]: https://github.com/coldfront/coldfront/releases/tag/v1.0.4 +[1.1.0]: https://github.com/coldfront/coldfront/releases/tag/v1.1.0 +[1.1.1]: https://github.com/coldfront/coldfront/releases/tag/v1.1.1 +[1.1.2]: https://github.com/coldfront/coldfront/releases/tag/v1.1.2 +[1.1.3]: https://github.com/coldfront/coldfront/releases/tag/v1.1.3 +[1.1.4]: https://github.com/coldfront/coldfront/releases/tag/v1.1.4 +[1.1.5]: https://github.com/coldfront/coldfront/releases/tag/v1.1.5 +[1.1.6]: https://github.com/coldfront/coldfront/releases/tag/v1.1.6 +[1.1.7]: https://github.com/coldfront/coldfront/releases/tag/v1.1.7 +[1.1.8]: https://github.com/coldfront/coldfront/releases/tag/v1.1.8 +[Unreleased]: https://github.com/coldfront/coldfront/compare/v1.1.8...HEAD diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ddc157a0b..3a996ee1e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,10 +1,10 @@ # Contributing to ColdFront -Before we start, thank you for considering contributing to ColdFront! +Before we start, thank you for considering contributing to ColdFront! -Every contribution no matter how small is welcome here! Whether you are adding a whole new feature, improving the aesthetics of the webpage, adding some tests cases, or just fixing a typo your contributions are appreciated. +Every contribution no matter how small is welcome here! Whether you are adding a whole new feature, improving the aesthetics of the webpage, adding some tests cases, or just fixing a typo your contributions are appreciated. -In this document you will find a set a guidelines for contributing to the ColdFront project, not hard rules. However, sticking to the advice contained in this document will help you to make better contributions, save time, and increase the chances of your contributions getting accepted. +In this document you will find a set a guidelines for contributing to the ColdFront project, not hard rules. However, sticking to the advice contained in this document will help you to make better contributions, save time, and increase the chances of your contributions getting accepted. This project abides by a [Code of Conduct](CODE_OF_CONDUCT.md) that all contributors are required to uphold. Please read this document before interacting with the project. @@ -20,11 +20,11 @@ For most contributions, you will start by opening up an issue, discussing change ### Issues -We track requested changes using GitHub issues. These include bugs, feature requests, and general concerns. +We track requested changes using GitHub issues. These include bugs, feature requests, and general concerns. -Before making an issue, please look at current and previous issues to make sure that your concern has not already been raised by someone else. It is also advised to read through the [current documentation](https://coldfront.readthedocs.io/en/stable/). If an issue with your concern is already opened you are encouraged to comment further on it. The `Search Issues` feature is great to check to see if someone has already raised your issue before. +Before making an issue, please look at current and previous issues to make sure that your concern has not already been raised by someone else. It is also advised to read through the [current documentation](https://coldfront.readthedocs.io/en/stable/). If an issue with your concern is already opened you are encouraged to comment further on it. The `Search Issues` feature is great to check to see if someone has already raised your issue before. -If, after searching pre-existing issues, your concern has not been raised (or you are unsure if a previous issue covers your concern) please open a new issue with any labels you believe are relevant. Please include any relevant images, links, and syntax-highlighted text snippets to help maintainers understand your concerns better. It is also helpful to include any debugging steps you have attempted or ideas on how to fix your issue. +If, after searching pre-existing issues, your concern has not been raised (or you are unsure if a previous issue covers your concern) please open a new issue with any labels you believe are relevant. Please include any relevant images, links, and syntax-highlighted text snippets to help maintainers understand your concerns better. It is also helpful to include any debugging steps you have attempted or ideas on how to fix your issue. ### Pull Requests @@ -34,7 +34,7 @@ To create a pull request: 2. Create a branch off the `main` branch. 3. Make commits to your branch. Make sure your additions include [testing](#testing) for any new functionality. Make sure that you run the full test suite on your PR before submitting. If your changes necessitate removing or changing previous tests, please state this explicitly in your PR. Also ensure that your changes pass the [linter and formatter](#formatting-and-linting). 4. Create a pull request back to this main repository. -5. Wait for a maintainer to review your code and request any changes. Don't worry if the maintainer asks for changes! This feedback is perfectly normal and ensures a more maintainable project for everyone. +5. Wait for a maintainer to review your code and request any changes. Don't worry if the maintainer asks for changes! This feedback is perfectly normal and ensures a more maintainable project for everyone. ## Conventions and Style Guide @@ -44,7 +44,7 @@ Please use a spell-checker when modifying the codebase to reduce the prevalence #### Annotations -You are encouraged to use Python's type annotations to improve code readability and maintainability. Whenever possible, use the most recent annotation syntax available for the minimum version of Python supported by ColdFront. +You are encouraged to use Python's type annotations to improve code readability and maintainability. Whenever possible, use the most recent annotation syntax available for the minimum version of Python supported by ColdFront. > The minimum Python version supported can be found in the `pyproject.toml` file. @@ -52,11 +52,11 @@ You are encouraged to use Python's type annotations to improve code readability All new and changed features must include unit tests to verify that they work correctly. Every non-trivial function should have at least as many test cases as its cyclomatic complexity to verify all independent code paths in the function operate correctly. -When using [uv](https://docs.astral.sh/uv/), the full test suite can be run using the command `uv run coldfront test`. +When using [uv](https://docs.astral.sh/uv/), the full test suite can be run using the command `uv run coldfront test`. #### Formatting and Linting -This project is formatted and linted using [ruff](https://docs.astral.sh/ruff/). +This project is formatted and linted using [ruff](https://docs.astral.sh/ruff/). You can use Ruff to check for any linting errors in proposed Python code using `uv run ruff check`. Ruff can also fix many linting errors automatically with `uv run ruff check --fix` when using [uv](https://docs.astral.sh/uv/). @@ -64,4 +64,4 @@ If your code is failing linting checks but you you have a valid reason to leave You can also use Ruff to check formatting using `uv run ruff format --check` and automatically fix formatting errors with `uv run ruff format`. -If your code is failing formatting checks but you have a valid reason to leave it unchanged, you can suppress warnings for a specific block of code by enclosing it with the comments `# fmt: off` and `# fmt: on`. These comments work at the statement level so placing them inside of expressions will not have any effect. +If your code is failing formatting checks but you have a valid reason to leave it unchanged, you can suppress warnings for a specific block of code by enclosing it with the comments `# fmt: off` and `# fmt: on`. These comments work at the statement level so placing them inside of expressions will not have any effect. diff --git a/Dockerfile b/Dockerfile index 17330ac492..7c2cd29614 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt install -y \ libglib2.0-dev \ libsasl2-dev -COPY --from=ghcr.io/astral-sh/uv:0.7 /uv /bin/uv +COPY --from=ghcr.io/astral-sh/uv:0.9.13 /uv /bin/uv ENV UV_COMPILE_BYTECODE=1 ENV UV_LINK_MODE=copy ENV UV_PYTHON_INSTALL_DIR=/python diff --git a/LICENSES/ISC.txt b/LICENSES/ISC.txt deleted file mode 100644 index b9c199c98f..0000000000 --- a/LICENSES/ISC.txt +++ /dev/null @@ -1,8 +0,0 @@ -ISC License: - -Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-2003 by Internet Software Consortium - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MANIFEST.in b/MANIFEST.in index 04703efeeb..71880a602f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,6 @@ recursive-include coldfront/core/field_of_science/management/commands/data * recursive-include coldfront/plugins/iquota/templates * recursive-include coldfront/plugins/system_monitor/templates * -recursive-include coldfront/plugins/academic_analytics/templates * recursive-include coldfront/templates * recursive-include coldfront/static * recursive-include coldfront/core/portal/templates * @@ -12,6 +11,7 @@ recursive-include coldfront/core/publication/templates * recursive-include coldfront/core/grant/templates * recursive-include coldfront/core/user/templates * recursive-include coldfront/core/resource/templates * +recursive-include coldfront/plugins/slurm/templates * recursive-include coldfront/plugins/maintenance_mode/templates * recursive-include coldfront/plugins/advanced_search/templates * recursive-include coldfront/plugins/customizable_forms/templates * @@ -22,3 +22,4 @@ recursive-include coldfront/plugins/announcements/templates * recursive-include coldfront/plugins/help/templates * recursive-include coldfront/plugins/movable_allocations/templates * recursive-include coldfront/plugins/request_forms/templates * +recursive-include coldfront/plugins/academic_analytics/templates * diff --git a/README.md b/README.md index 9729f4df83..096910660f 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,8 @@ -![ColdFront](docs/pages/images/logo-lg.png) - # ColdFront - Resource Allocation System [![Documentation Status](https://readthedocs.org/projects/coldfront/badge/?version=latest)](https://coldfront.readthedocs.io/en/latest/?badge=latest) -ColdFront is an open source resource and allocation management system designed to provide a -central portal for administration, reporting, and measuring scientific impact -of cyberinfrastructure resources. ColdFront was created to help high performance computing (HPC) centers manage access to a diverse set of resources across large groups of users and provide a rich set of -extensible meta data for comprehensive reporting. The flexiblity of ColdFront allows centers to manage and automate their policies and procedures within the framework provided or extend the functionality with [plugins](docs/pages/index.md#extensibility). ColdFront is written in Python and released under the GPLv3 license. +ColdFront is an open source resource and allocation management system designed to provide a central portal for administration, reporting, and measuring scientific impact of cyberinfrastructure resources. ColdFront was created to help high performance computing (HPC) centers manage access to a diverse set of resources across large groups of users and provide a rich set of extensible meta data for comprehensive reporting. The flexiblity of ColdFront allows centers to manage and automate their policies and procedures within the framework provided or extend the functionality with [plugins](docs/pages/index.md#extensibility). ColdFront is written in Python and released under the GPLv3 license. ## Features @@ -31,18 +26,13 @@ _Submit a PR to add your plugin to the list above._ ## Documentation -For more information on installing and using ColdFront see our [documentation here](https://coldfront.readthedocs.io) +For more information on installing and using ColdFront refer to the [documentation here](https://docs.coldfront.dev) -## Contact Information -If you would like a live demo followed by QA, please contact us at -ccr-coldfront-admin-list@listserv.buffalo.edu. You can also contact us for -general inquiries and installation troubleshooting. +If you would like a live demo followed by QA, please contact us at ccr-coldfront-admin-list@listserv.buffalo.edu. You can also contact us for general inquiries and installation troubleshooting. -If you would like to join our mailing list to receive news and updates, please -send an email to listserv@listserv.buffalo.edu with no subject, and the -following command in the body of the message: +## ColdFront Community -subscribe ccr-open-coldfront-list@listserv.buffalo.edu first_name last_name +There is a large, active community around ColdFront and we invite you to [join us](https://coldfront.dev/community/)! ## License diff --git a/REUSE.toml b/REUSE.toml index 18005a899f..4dd0ba8aa8 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -19,6 +19,9 @@ path = [ "**.gitignore", "**.html", "**.css", + "**.scss", + "**.js", + "**.ts", "**.webmanifest", ] SPDX-FileCopyrightText = "(C) ColdFront Authors" @@ -36,6 +39,12 @@ SPDX-License-Identifier = "CC-BY-NC-ND-4.0" [[annotations]] path = [ "uv.lock", + "coldfront/static/package-lock.json", + "coldfront/static/bundles/manifest.json", + "coldfront/static/package.json", + "coldfront/static/tsconfig.json", + "coldfront/static/.prettierignore", + "coldfront/static/.prettierrc", "coldfront/**.png", "coldfront/**.jpg", ] @@ -44,49 +53,14 @@ SPDX-License-Identifier = "CC0-1.0" [[annotations]] path = [ - "coldfront/static/bootstrap/*", + "coldfront/static/bundles/fa-*.woff2", ] SPDX-FileCopyrightText = "Copyright (c) 2011-2025 The Bootstrap Authors" SPDX-License-Identifier = "MIT" [[annotations]] path = [ - "coldfront/static/c3js/*", + "coldfront/static/bundles/c3.js", ] SPDX-FileCopyrightText = "Copyright (c) 2013 Masayuki Tanaka" SPDX-License-Identifier = "MIT" - -[[annotations]] -path = [ - "coldfront/static/datatable/*", -] -SPDX-FileCopyrightText = "Copyright (C) 2008-2025, SpryMedia Ltd." -SPDX-License-Identifier = "MIT" - -[[annotations]] -path = [ - "coldfront/static/flatpickr/*", -] -SPDX-FileCopyrightText = "Copyright (c) 2017 Gregory Petrosyan" -SPDX-License-Identifier = "MIT" - -[[annotations]] -path = [ - "coldfront/static/jquery/*", -] -SPDX-FileCopyrightText = "Copyright OpenJS Foundation and other contributors" -SPDX-License-Identifier = "MIT" - -[[annotations]] -path = [ - "coldfront/static/select2/*", -] -SPDX-FileCopyrightText = "Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors" -SPDX-License-Identifier = "MIT" - -[[annotations]] -path = [ - "coldfront/static/d3/*", -] -SPDX-FileCopyrightText = "Copyright 2010-2023 Mike Bostock" -SPDX-License-Identifier = "ISC" diff --git a/coldfront-custom-resources b/coldfront-custom-resources deleted file mode 160000 index b9e685f023..0000000000 --- a/coldfront-custom-resources +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b9e685f023160253c8a84e12ad0a1b5a82b3457f diff --git a/coldfront/__init__.py b/coldfront/__init__.py index d53cbb860f..4d8660e1e9 100644 --- a/coldfront/__init__.py +++ b/coldfront/__init__.py @@ -5,7 +5,7 @@ import os import sys -__version__ = "1.1.7" +__version__ = "1.1.8" VERSION = __version__ diff --git a/coldfront/components/site/static/common/css/brand.css b/coldfront/components/site/static/common/css/brand.css index e90e64d8b0..2aba799b74 100644 --- a/coldfront/components/site/static/common/css/brand.css +++ b/coldfront/components/site/static/common/css/brand.css @@ -98,6 +98,14 @@ width: 100%; } +#footer .row > * { + width: auto; /* Fixes signature and copyright not being inline */ +} + +#branding-bar .row > * { + --bs-gutter-x: 0; /* Fixes IU icon shrinking */ +} + #branding-bar { position: fixed; line-height: 1.5; diff --git a/coldfront/components/site/static/common/css/common.css b/coldfront/components/site/static/common/css/common.css index d72c73a083..5be41e10ab 100644 --- a/coldfront/components/site/static/common/css/common.css +++ b/coldfront/components/site/static/common/css/common.css @@ -34,66 +34,6 @@ body > main > div > div.card.border-primary > div.card-body > form > div.alert.a } -/* - * These were copied from django-hijack https://github.com/arteria/django-hijack - * - */ - .hijacked-warning { - background-size: 50px 50px; - background-color: #ffe761; - color: #000; - background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent); - background-image: linear-gradient(135deg, rgba(0, 0, 0, .04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, .04) 50%, rgba(0, 0, 0, .04) 75%, transparent 75%, transparent); - margin-bottom:0; -} - -.hijacked-warning-controls, -.hijacked-warning-controls form { - display: inline; -} - -.django-hijack-button-default { - -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; - -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; - box-shadow:inset 0px 1px 0px 0px #ffffff; - background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffffff), color-stop(1, #f6f6f6)); - background:-moz-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); - background:-webkit-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); - background:-o-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); - background:-ms-linear-gradient(top, #ffffff 5%, #f6f6f6 100%); - background:linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%); - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0); - background-color:#ffffff; - -moz-border-radius:6px; - -webkit-border-radius:6px; - border-radius:6px; - border:1px solid #dcdcdc; - display:inline-block; - cursor:pointer; - color:#666666; - font-family:Arial; - font-size:11px; - font-weight:bold; - padding:3px 12px; - text-decoration:none; - text-shadow:0px 1px 0px #ffffff; -} -.django-hijack-button-default:hover { - background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f6f6f6), color-stop(1, #ffffff)); - background:-moz-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); - background:-webkit-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); - background:-o-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); - background:-ms-linear-gradient(top, #f6f6f6 5%, #ffffff 100%); - background:linear-gradient(to bottom, #f6f6f6 5%, #ffffff 100%); - filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#ffffff',GradientType=0); - background-color:#f6f6f6; -} -.django-hijack-button-default:active { - position:relative; - top:1px; -} - .form-control[readonly]{background-color:#ffffff;opacity:1} .bg-primary { @@ -104,118 +44,6 @@ body > main > div > div.card.border-primary > div.card-body > form > div.alert.a border-color: #990000 !important; } -.btn-primary { - background-color: #006298; - border-color: #006298; -} - -.btn-primary:disabled { - background-color: #006298; - border-color: #006298; - pointer-events: none; -} - -.btn-primary:hover { - background-color: #01426A; - border-color: #01426A; -} - -.badge-success { - background-color: #008216; - border-color: #008216; -} - -.badge-primary { - background-color: #006298; - border-color: #006298; -} - -.btn-success { - background-color: #008216; - border-color: #008216; -} - -.btn-success:hover { - background-color: #006611; - border-color: #006611; -} - -.badge-danger { - background-color: #990000; - border-color: #990000; -} - -.btn-danger { - background-color: #990000; - border-color: #990000; -} - -.btn-danger:hover { - background-color: #7c0000; - border-color: #7c0000; -} - -.text-primary { - color: #006298 !important; -} - -.text-success { - color: #008216 !important; -} - -.text-warning { - color: #a35a00 !important; -} - -.text-danger { - color: #990000 !important; -} - -.page-link { - color: #006298; -} - -.page-link:hover { - color: #01426A; -} - -.page-item.active .page-link { - background-color: #006298; - border-color: #01426A; -} - -.alert-warning { - color: black; - background-color: #FDF7E7; - border-color: #F5BB17; -} - -.alert-info { - color: black; - background-color: #E9F6FC; - border-color: #49AFC7; -} - -.alert-success { - color: black; - background-color: #DDF4EA; - border-color: #009933; -} - -.alert-danger { - color: black; - background-color: #FDEEE8; - border-color: #F25B19; -} - -a { - color: #006298; -} - -a:hover { - color: #01426A; -} - .dropdown-submenu { position: relative; } @@ -257,3 +85,14 @@ a:hover { #branding-bar { position: relative !important; } + +.form-label { + font-weight: bold; +} + +.validating-feedback { + width: 100%; + margin-top: .25rem; + font-size: 80%; + color: #006298; +} diff --git a/coldfront/components/site/templates/allocation/allocation_add_users.html b/coldfront/components/site/templates/allocation/allocation_add_users.html index a4d7cff8e7..ec59e05969 100644 --- a/coldfront/components/site/templates/allocation/allocation_add_users.html +++ b/coldfront/components/site/templates/allocation/allocation_add_users.html @@ -19,7 +19,7 @@

Users in the Allocation

- +
@@ -60,21 +60,29 @@

Users not in the Allocation

- Users not in the allocation + Users not in the allocation {% csrf_token %}
Username
- + @@ -90,28 +98,60 @@

Users not in the Allocation

{% for form in formset %} @@ -141,8 +181,8 @@

Users not in the Allocation

@@ -157,27 +197,17 @@

Users not in the Allocation

{% endif %} {% endblock %} diff --git a/coldfront/components/site/templates/allocation/allocation_allocationattribute_delete.html b/coldfront/components/site/templates/allocation/allocation_allocationattribute_delete.html index f2fc8c66e2..d78283880d 100644 --- a/coldfront/components/site/templates/allocation/allocation_allocationattribute_delete.html +++ b/coldfront/components/site/templates/allocation/allocation_allocationattribute_delete.html @@ -18,13 +18,13 @@

Delete allocation attributes from allocation for project: {{allocation.proje {% csrf_token %}
- Select allocation attributes to delete + Select allocation attributes to delete

Users not in the allocation – check rows to add themUsers not in the allocation – check rows to add them
- - + + - - Hover over an icon to see a user's account status for this resource - + # Username
- {% if account_results|get_value_from_dict:form.username.value == 'no_account' %} - - No IU account - + {% elif account_results|get_value_from_dict:form.username.value == 'no_resource_account' %} - - No {{ allocation.get_parent_resource.name }} account - + {% elif account_results|get_value_from_dict:form.username.value in 'has_account, has_resource_account' %} - - Has an account - + {% else %} - - No account required - + {% endif %} {{ forloop.counter }}
@@ -35,7 +35,7 @@

Delete allocation attributes from allocation for project: {{allocation.proje {% for form in formset %}

- + Name
-
{{form.name.value}} -