Skip to content

Conversation

@allison-li-1016
Copy link
Contributor

@allison-li-1016 allison-li-1016 commented Apr 21, 2025

Review Time: Medium

Summary: Adding Treat Action class, and associated parameters and tests. The Treat Action will add CAR T-cell agents of specified dose and ratio next to source points or vasculature

@allison-li-1016 allison-li-1016 self-assigned this Apr 21, 2025
@allison-li-1016 allison-li-1016 marked this pull request as draft April 21, 2025 17:13
@allison-li-1016 allison-li-1016 changed the title CARCADE Refactor 3: Treat Action CARCADE Refactor 3: Treat Action (+params and tests) Apr 22, 2025
@allison-li-1016 allison-li-1016 marked this pull request as ready for review April 23, 2025 17:21
@allison-li-1016 allison-li-1016 requested review from a team, Jannetty, cainja, daniellevahdat, jacob-evarts, jessicasyu and pohaoc2 and removed request for a team April 23, 2025 17:21
@allison-li-1016
Copy link
Contributor Author

  1. Tests
  • Don't test private values
  1. Use enums to handle states
  2. Don't use 4 array lists just use 1 data structures

Copy link
Member

@cainja cainja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will revisit tests when we address some of the comments. I imagine they will lead to fairly large changes to the tests.

@allison-li-1016 allison-li-1016 marked this pull request as ready for review July 1, 2025 16:37
ArrayList<LocationContainer> locs,
ArrayList<Location> siteLocs,
PatchSimulation sim) {
if (type.equals("graph")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to use switch cases here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch + enums please

Copy link
Member

@cainja cainja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add an example input file/user interface for the treat action in the PR description

ArrayList<LocationContainer> locs,
ArrayList<Location> siteLocs,
PatchSimulation sim) {
if (type.equals("graph")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch + enums please

for (Object edgeObj : allEdges) {
SiteEdge edge = (SiteEdge) edgeObj;
Bag allEdgeLocs = new Bag();
if (Objects.equals(coord, "Hex")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just graphSites.getSpan() rather than casting and specifying the type of the graphsites?

}
pruneSite(locs, sim, damage, sitesLat, siteLocs);
} else {
throw new IllegalArgumentException(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using an enum means that you don't need this.

*/
public void step(SimState simstate) {
PatchSimulation sim = (PatchSimulation) simstate;
String type = "null";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would strongly prefer if you didn't do this.

latPositions = (int) (-3.5 * sampleLoc.getSubcoordinates().size() + 30);

// Determine type of sites component implemented.
if (comp instanceof PatchComponentSitesSource) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should all happen at the abstraction level of PatchComponentSites

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.

5 participants