-
Notifications
You must be signed in to change notification settings - Fork 0
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
[TBCCT-275] fix(api): Remove ecosystem dependant assumptions for conservation activity type (Refactor to reduce technical debt needed) #252
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
df4fab0
to
be07807
Compare
be07807
to
4449349
Compare
4449349
to
a8c4fa1
Compare
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.
Nice one @alepefe LGTM. I just left some minor comments.
However, since this touches critical parts, we really need to thoroughly tests the implementation to make sure we do not introduce any regression.
Also, lots of zod schema changes are present, so I'd like @agnlez 's review and input as well. I'll add him as reviewer
…t and use zod validation schema
a8c4fa1
to
dc9f00c
Compare
Being checking project creation with both scenarios: conservation and restoration and, in both cases, the same restrictions apply as we had in the previous version. So I would say LGTM 👍🏻 |
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.
Been testing it a bit, seems to work fine with some caveats I detected but they are already present in dev so not related to this branch.
HOWEVER, given the magnitude of the changes, let's wait for today's meeting before pushing this forward. I'll try to have someone testing this more in depth
This pull request focuses on updating the data transfer objects (DTOs) and related imports to use new schema-based DTOs instead of the previous class-validator-based DTOs. Here are the most important changes:
DTO Updates:
OverridableAssumptions
withOverridableAssumptionsDto
inassumptions.repository.ts
,sequestration-rate.calculator.ts
, and other related files. [1] [2] [3]OverridableCostInputs
withOverridableCostInputsDto
incost.calculator.ts
,data.repository.ts
, and other related files. [1] [2] [3]project-assumptions.dto.ts
,project-cost-inputs.dto.ts
,create-custom-project-dto.ts
, andconservation-project-params.dto.ts
. [1] [2] [3] [4]create-custom-project.dto.ts
.Repository and Service Updates:
AssumptionsRepository
to use the new DTOs and added a condition to return restoration rate only for restoration activities. [1] [2]CustomProjectsService
andCustomProjectsController
to use the newCreateCustomProjectDto
. [1] [2]Import Cleanups:
These changes ensure that the project now uses the new schema-based DTOs, which simplifies validation and improves consistency across the codebase.