Skip to content
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

Update Animal V2 HTMX viewsets #1048

Merged
merged 24 commits into from
Jun 19, 2024
Merged

Update Animal V2 HTMX viewsets #1048

merged 24 commits into from
Jun 19, 2024

Conversation

munnsmunns
Copy link
Collaborator

@munnsmunns munnsmunns commented Jun 17, 2024

Updates the Animal V2 templates and viewsets for the Experiment update page to match the updated patterns in #992 and #1012.

@munnsmunns
Copy link
Collaborator Author

@shapiromatron There are some utility functions and css classes that the new htmx pattern uses but that aren't in the animal v2 branch yet. should we pull from main into this branch or should that happen in the animalv2 branch first? or just copy/paste those functions into this branch?

@shapiromatron
Copy link
Owner

shapiromatron commented Jun 17, 2024

@shapiromatron There are some utility functions and css classes that the new htmx pattern uses but that aren't in the animal v2 branch yet. should we pull from main into this branch or should that happen in the animalv2 branch first? or just copy/paste those functions into this branch?

Whatever would be quicker! If they're of equal difficulty, it'd be better to just merge main into animal-v2-htmx.

@munnsmunns munnsmunns marked this pull request as ready for review June 18, 2024 18:59
@shapiromatron shapiromatron merged commit 9286c28 into ICF-animal_v2_ui Jun 19, 2024
3 checks passed
@shapiromatron shapiromatron deleted the animal-v2-htmx branch June 19, 2024 04:51
shapiromatron added a commit that referenced this pull request Jan 16, 2025
* initial animalv2 model declarations

* implement initial feedback items

* help text cleanup and TODO removals

* dose_group_id added

* updated animalv2 migration file

* fixed ruff formatting issue on animalv2 migration file

* add animal_version flag to assessment

* enable basic UI functionality for animalv2 experiments

can we CRUD an Experiment; next step is to do a sub-object in htmx style.

* update experiment form to match mockup layout

* enable UI functionality for animalv2 chemicals

first sub-object in htmx style

* animalv2 tests first checkin

model tests (and a model update after finding a typo)

* additional animalv2 tests

* enable UI functionality for animalv2 animalgroups

* enable (partial) UI functionality for animalv2 treatments

note, dosegroups are not yet implemented for treatments.

* enable integrated subform UI functionality for dose groups associated with a treatment

* run `make format`

* implemented most feedback from draft PR

still having ruff-related formatting issues; resolving that before merging this into bioassay-v2.

* intentional format error introduction

troubleshooting ruff/CICD issues on my side

* removing intentional formatting errors

* switch test fixture back to animalv1 to avoid breaking existing integration tests

* implement endpoint UI

* implement observationtime UI

* implement DataExtraction UI

* move away from mutable argument default

* updated fixtures file with new animalv2 fields

* add additional test coverage for animalv2

modeled after epiv2. Not complete; hit hour cap.

* Update Animal V2 HTMX viewsets (#1048)

* update templates to new htmx pattern

* bring forward crud_url change

* fix some url issues

* condense htmx viewset urls

* fix template issues

* merge with main, use common templates

* fix data extraction url

* format

* html format

* fix animalv2 test helper

* add formset handling to shared _object_edit_row template

* fix study detail merge

* indent

* cleanup after merge

* fix spacing diff

* remove old template artifact

* fix migrations

* update comments

* improve layout

* use smarter clone method name

* rename context variable

* fix htmx style editing for experiment updates

---------

Co-authored-by: Andy Shapiro <shapiro.andy@epa.gov>
Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>

* change url from ani-bioassay to animal-bioassay

* move logic out of is_valid and into clean where possible

* remove extrajs from experiment form template

note - used only when initially creating experiment. When editing/associating
sub-objects, template is not even used.

* various minor reformatting/cleanup fixes

As per code review, stuff like:
* switching multiline imports back to single line where ruff allows
* backing out of unneeded reformatting changes
* comment cleanups
* etc.

(I think my ruff must have been misconfigured at some point, introducing
some of these errors)

* switch from hastext/safe to optional table row for comment display

* convert handcoded colgroup html to use the bs4 templatetag

* remove DoseGroupFormHelper and similars and switch to a common generic version

* collapse various aniv2 migrations into single cleaned up ones

* change v2_timepoints from prop to method and switch to standard Django get approach

* rework FormsetConfiguration as dataclass; add type hints and explanatory comments

* fix migrations

* htmx updates

* fix tests

* update test_forms

* cleanup type annotations and add TODO to comments

* add a feature flag

* review comments

* review JS

---------

Co-authored-by: Tom Feiler <tom.feiler@icf.com>
Co-authored-by: Andy Shapiro <shapiromatron@gmail.com>
Co-authored-by: Andy Shapiro <shapiro.andy@epa.gov>
Co-authored-by: Matt Munns <mmunns16@gmail.com>
Co-authored-by: casey1173 <caseyhansen1999@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants