bcgov / cas-reporting

This is for the Clean Growth Digital Services team for work related to reporting.
Apache License 2.0
0 stars 0 forks source link

Handle Pulp & Paper emission category exceptions #402

Open dleard opened 1 week ago

dleard commented 1 week ago

Description:

The Pulp & Paper activity has a couple exceptions around emission categories that need to be handled.

Normally. we categorise fuels as 'Woody Biomass' based on what fuel was used when creating an emission. However, the pulp & paper activity does not collect fuel data. Instead, we need to use the methodology to determine if an emission is 'Woody Biomass.

Here are the rules that should apply for Pulp & Paper:

If the emission has the methodologies Solids-HHV or Solids-CC, then the emission should be categorised as ‘Woody Biomass’ (in addition to its 'Basic' category)

If the emission has the methodologies Replacement methodology or Alternative Parameter, then there should be a boolean field on the methodology data that indicates if the emission should be categorised as 'Woody Biomass' & that boolean should be used to apply the 'Woody Biomass' category.

We'll need to update the 'emission_category_mapping_service' with a function to handle exceptions. It should check if the activity is Pulp & Paper, if it's not, return if it is, check if the emission's methodology is Solids-HHV or Solids-CC if it is, apply the 'Woody Biomass' emission category to the emission if it's not, check if the methodology is Replacement or Alternative Parameter if it is, check if the boolean field on that methodology is true if it's not, return if it is, apply the 'Woody Biomass' emission category to the emission

Acceptance Criteria:

Given I am on the Pulp & Paper activity page When I select Replacement or Alternative Parameter methodology Then I see a checkbox that says "This methodology calculates emissions from spent liquor combustion" And when that checkbox is checked, the emission is categorised as "Woody Biomass" on save

Given I am on the Pulp & Paper activity page When I select either Solids-HHV or Solids-CC as the methodology for an emission Then the emission is categorised as "Woody Biomass" on save

Development Checklist:

Definition of Ready (Note: If any of these points are not applicable, mark N/A)

Definition of Done (Note: If any of these points are not applicable, mark N/A)

Blocked By/Blocking

Notes:

-