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

Tracking pull request to merge release-0.2.0 to main #282

Open
wants to merge 2,639 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
2639 commits
Select commit Hold shift + click to select a range
3e90bbc
chore: add test environment users
Dec 11, 2024
1c7aa1b
refactor: update bceid dashboard links and improve accessibility
hamed-valiollahi Dec 11, 2024
a299583
refactor: replace typography with bctypography across components for …
hamed-valiollahi Dec 11, 2024
85c783d
Merge pull request #1411 from bcgov/LCFS-1207-Changes-FuelOtherUse
areyeslo Dec 11, 2024
769a7c5
chore: Merge branch 'release-0.2.0' into refactor/hamed-replace-typog…
hamed-valiollahi Dec 11, 2024
d668ffd
chore: testing parallel testing workflow file
Dec 11, 2024
a970e99
Merge branch 'release-0.2.0' into fix/hamed-collapse-gov-comment-box-…
hamed-valiollahi Dec 11, 2024
1a5bae9
Merge branch 'release-0.2.0' into refactor/hamed-bceid-dashboard-link…
hamed-valiollahi Dec 11, 2024
ab6fd33
Merge branch 'release-0.2.0' into refactor/hamed-reformat-org-user-ma…
hamed-valiollahi Dec 11, 2024
aa0c65d
Merge pull request #1435 from bcgov/refactor/hamed-replace-typography…
hamed-valiollahi Dec 11, 2024
55f7dbe
Merge branch 'release-0.2.0' into chore/alex-parallel-testing-workflow
AlexZorkin Dec 11, 2024
0a64875
Merge branch 'release-0.2.0' into refactor/hamed-bceid-dashboard-link…
hamed-valiollahi Dec 11, 2024
8190bde
fix: fix failing test.
hamed-valiollahi Dec 11, 2024
cacb11c
Merge branch 'release-0.2.0' into chore/alex-update-test-users-241211
AlexZorkin Dec 11, 2024
54a6569
chore: resolve conflicts.
hamed-valiollahi Dec 11, 2024
c086a3d
Merge pull request #1439 from bcgov/chore/alex-parallel-testing-workflow
AlexZorkin Dec 11, 2024
4d7571a
Merge branch 'release-0.2.0' into refactor/hamed-bceid-dashboard-link…
hamed-valiollahi Dec 11, 2024
f30fc9b
chore(deps): bump nanoid from 3.3.7 to 3.3.8 in /frontend
dependabot[bot] Dec 11, 2024
68ccf7a
Merge pull request #1440 from bcgov/dependabot/npm_and_yarn/frontend/…
AlexZorkin Dec 11, 2024
44a03ec
Merge remote-tracking branch 'origin/release-0.2.0' into fix/kevin-1400
kevin-hashimoto Dec 11, 2024
f9c76d3
chore: clean
kevin-hashimoto Dec 11, 2024
f0919b3
Merge remote-tracking branch 'origin/release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 11, 2024
bce4b4e
Merge pull request #1434 from bcgov/chore/alex-update-test-users-241211
AlexZorkin Dec 11, 2024
6a70acc
Merge remote-tracking branch 'origin/release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 12, 2024
ced2f61
Merge remote-tracking branch 'origin/release-0.2.0' into fix/kevin-1400
kevin-hashimoto Dec 12, 2024
227b166
Merge pull request #1431 from bcgov/fix/kevin-1400
kevin-hashimoto Dec 12, 2024
941fdcd
Merge branch 'release-0.2.0' into feat/prashanth-email-trigger-1226
prv-proton Dec 12, 2024
907963b
Replace Typography with BCTypography
areyeslo Dec 12, 2024
3dc12d2
Merge pull request #1442 from bcgov/hotfix-UpdateTypographytoBCTypogr…
areyeslo Dec 12, 2024
d1eebc2
Merge branch 'release-0.2.0' into refactor/hamed-bceid-dashboard-link…
hamed-valiollahi Dec 12, 2024
5a90065
Merge pull request #1438 from bcgov/refactor/hamed-bceid-dashboard-li…
hamed-valiollahi Dec 12, 2024
8d9e5fe
Merge branch 'release-0.2.0' into refactor/hamed-reformat-org-user-ma…
hamed-valiollahi Dec 12, 2024
33befe5
Merge remote-tracking branch 'origin/release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 12, 2024
be0e6b4
Merge pull request #1437 from bcgov/refactor/hamed-reformat-org-user-…
hamed-valiollahi Dec 12, 2024
242fba0
Merge branch 'release-0.2.0' into fix/hamed-collapse-gov-comment-box-…
hamed-valiollahi Dec 12, 2024
3c014c2
Merge pull request #1436 from bcgov/fix/hamed-collapse-gov-comment-bo…
hamed-valiollahi Dec 12, 2024
c77f4c6
Merge branch 'release-0.2.0' into feat/prashanth-email-trigger-1226
prv-proton Dec 12, 2024
4c251ea
Merge branch 'release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 12, 2024
a583a79
Merge pull request #1402 from bcgov/feat/prashanth-email-trigger-1226
prv-proton Dec 12, 2024
56ab63d
Fix caching issues in github workflow
Dec 12, 2024
903efa8
Merge branch 'release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 12, 2024
71c2d5b
.
Dec 12, 2024
a0bc2da
chore: merge release
Dec 12, 2024
971335b
optimize
Dec 12, 2024
92773a3
feat: add $ sign to fair market value per credit field in transfer in…
hamed-valiollahi Dec 12, 2024
e73316f
update
Dec 12, 2024
31acf1f
fix: phantom pill
kevin-hashimoto Dec 12, 2024
a971634
Autopopulating units field depending on the Fuel Type selected
areyeslo Dec 12, 2024
929e2fc
Revert "optimize"
Dec 12, 2024
8d17b43
parallelize tests
Dec 12, 2024
8195a59
Revert "parallelize tests"
Dec 12, 2024
431a716
Merge branch 'release-0.2.0' into fix/prashanth-workflow-caching
prv-proton Dec 12, 2024
8bb9a90
Provide default value to organization_name field in FSE
areyeslo Dec 12, 2024
926c881
Merge branch 'release-0.2.0' into hotfix-organizationName-FinalSupply…
areyeslo Dec 12, 2024
cbc1888
Merge pull request #1447 from bcgov/hotfix-organizationName-FinalSupp…
areyeslo Dec 12, 2024
799afa6
fix: correct default_carbon_intensity for 'Other diesel' fuel type
hamed-valiollahi Dec 12, 2024
e923eac
Merge branch 'release-0.2.0' into fix/prashanth-workflow-caching
prv-proton Dec 12, 2024
ad157c1
finalize
Dec 12, 2024
1f21cc6
update
Dec 12, 2024
33a3c0d
.
Dec 12, 2024
882a381
.
Dec 12, 2024
780c475
Code review changes.
areyeslo Dec 12, 2024
d08d44e
Merge branch 'release-0.2.0' into LCFS-1399-FuelsOtherUse-UnitAutoPop…
areyeslo Dec 12, 2024
b488ee9
.
Dec 12, 2024
c2864ec
.
Dec 12, 2024
390f6f1
Merge pull request #1445 from bcgov/LCFS-1399-FuelsOtherUse-UnitAutoP…
areyeslo Dec 12, 2024
7fc8e8e
Merge branch 'release-0.2.0' into feat/hamed-add-dollar-sign-value-cr…
prv-proton Dec 12, 2024
ec5620a
feat: clickable summaries
kevin-hashimoto Dec 12, 2024
4cb7fe3
Merge branch 'release-0.2.0' into feat/kevin-1391
kevin-hashimoto Dec 12, 2024
60af6aa
Merge branch 'release-0.2.0' into fix/prashanth-workflow-caching
dhaselhan Dec 12, 2024
1f15bd6
Merge pull request #1444 from bcgov/feat/hamed-add-dollar-sign-value-…
hamed-valiollahi Dec 12, 2024
5b65e4a
Merge branch 'release-0.2.0' into feat/kevin-1391
kevin-hashimoto Dec 12, 2024
da34ded
Merge pull request #1451 from bcgov/feat/kevin-1391
kevin-hashimoto Dec 13, 2024
5ec3d92
Merge branch 'release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 13, 2024
f08a1ad
Merge branch 'release-0.2.0' into fix/prashanth-workflow-caching
prv-proton Dec 13, 2024
39d0e62
Autopopulate fuelCategory and fuelCode when selecting fuelType
areyeslo Dec 13, 2024
2ddb754
Merge pull request #1443 from bcgov/fix/prashanth-workflow-caching
prv-proton Dec 13, 2024
779901b
Merge branch 'release-0.2.0' into fix/hamed-correct-default-ci-1425
hamed-valiollahi Dec 13, 2024
935f3d3
Merge pull request #1450 from bcgov/fix/hamed-correct-default-ci-1425
hamed-valiollahi Dec 13, 2024
ff27e83
feat: enforce mandatory fuel code selection for schedules validation
hamed-valiollahi Dec 13, 2024
26839b8
chore: Merge branch 'release-0.2.0' into feat/hamed-fuel-code-validat…
hamed-valiollahi Dec 13, 2024
9744d96
feat: compliance report etl work
Dec 14, 2024
1ffb4f0
initial draft
Dec 15, 2024
4af96aa
Merge branch 'release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 16, 2024
c4a6cc0
updates
Dec 16, 2024
2552cdf
cache oc command
kuanfandevops Dec 16, 2024
d87caa7
Merge branch 'release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 17, 2024
d70cc19
feat: reports to have blank row on load + open first cell
kevin-hashimoto Dec 17, 2024
64c4517
Merge branch 'release-0.2.0' into feat/kevin-1397
kevin-hashimoto Dec 17, 2024
1e40528
updates
Dec 17, 2024
66b2615
route and user name fixes.
Dec 17, 2024
dd6e869
fix tests
Dec 17, 2024
be8136c
Merge branch 'release-0.2.0' into feat/prashanth-inapp-notfn-1135
prv-proton Dec 17, 2024
99a42ce
Merge branch 'release-0.2.0' into LCFS-1207-Followup-AutopopulateFuel…
areyeslo Dec 17, 2024
57cd699
Merge branch 'release-0.2.0' into feat/hamed-fuel-code-validation-1429
hamed-valiollahi Dec 17, 2024
c16d7cb
Merge pull request #1452 from bcgov/LCFS-1207-Followup-AutopopulateFu…
areyeslo Dec 17, 2024
3caa3d6
Merge branch 'release-0.2.0' into feat/hamed-fuel-code-validation-1429
hamed-valiollahi Dec 17, 2024
bef9b1d
Merge pull request #1461 from bcgov/feat/hamed-fuel-code-validation-1429
hamed-valiollahi Dec 17, 2024
2ac157a
Merge branch 'release-0.2.0' into feat/prashanth-inapp-notfn-1135
prv-proton Dec 17, 2024
71736f8
filter fixes
Dec 17, 2024
a53aa91
Merge branch 'release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 17, 2024
1d05045
Merge branch 'release-0.2.0' into feat/kevin-1397
kevin-hashimoto Dec 17, 2024
6e2f6b4
feat: etl logic updates for compliance period and transfer
Dec 17, 2024
58071b2
Merge pull request #1470 from bcgov/feat/kevin-1397
kevin-hashimoto Dec 17, 2024
86b2fc7
Merge branch 'release-0.2.0' into feat/kevin-1387
kevin-hashimoto Dec 17, 2024
86b1146
update for PR review comments
Dec 17, 2024
a76a847
Merge branch 'release-0.2.0' into feat/prashanth-inapp-notfn-1135
prv-proton Dec 17, 2024
8edd0af
Merge pull request #1432 from bcgov/feat/kevin-1387
kevin-hashimoto Dec 17, 2024
9a1db6f
Merge branch 'release-0.2.0' into feat/prashanth-inapp-notfn-1135
dhaselhan Dec 17, 2024
eeae8a7
Validation for Quantity Supplied in Fuel Supply.
areyeslo Dec 2, 2024
b4a8d8a
Validation of quantity in LCFS.
areyeslo Dec 2, 2024
9879041
Zero is not a valid number for quantity supplied
areyeslo Nov 28, 2024
747e5e4
Added vitests.
areyeslo Dec 4, 2024
5ff19a3
removing vitests
areyeslo Dec 11, 2024
a14d1ec
Add validation in quantity for different schedules.
areyeslo Dec 13, 2024
4dab704
Merge pull request #1335 from bcgov/LCFS-LCFS-1280-FuelSupplyValidati…
areyeslo Dec 17, 2024
f403a42
updates
Dec 17, 2024
d7e3adb
Merge branch 'release-0.2.0' into feat/prashanth-inapp-notfn-1135
prv-proton Dec 17, 2024
5b29999
Merge pull request #1464 from bcgov/feat/prashanth-inapp-notfn-1135
prv-proton Dec 17, 2024
a12ebac
bug fix for ag-grid checkbox
Dec 17, 2024
b03c127
.
Dec 17, 2024
d8fb658
correct test cases
Dec 17, 2024
9e10bc6
Merge pull request #1475 from bcgov/fix/prashshanth-checkbox-notfn-bug
prv-proton Dec 17, 2024
ec65eb2
fix: ensure fuel code assignment and prevent field clearing on prefix…
hamed-valiollahi Dec 17, 2024
ab89b0b
feat: Add validation rule for other_fuel_type
dhaselhan Dec 17, 2024
7b266bf
feat: Sync reports from TFRS -> LCFS
dhaselhan Dec 16, 2024
a6635a1
ag-grid upgrade
Dec 17, 2024
efa1fb3
Rebase Migration
dhaselhan Dec 17, 2024
0fc47d7
ag-grid upgrade
Dec 17, 2024
36458ea
fix: correct column headings in Export Fuel table
hamed-valiollahi Dec 17, 2024
b3a70ae
Merge pull request #1466 from bcgov/feat/daniel-sync-compliance-reports
dhaselhan Dec 17, 2024
f500c63
Merge branch 'release-0.2.0' into fix/prashanth-ag-grid-upgrade
prv-proton Dec 17, 2024
74d2c30
Merge pull request #1479 from bcgov/fix/prashanth-ag-grid-upgrade
prv-proton Dec 17, 2024
788a8c1
Merge branch 'release-0.2.0' into fix/hamed-export-fuel-headings-1459
hamed-valiollahi Dec 17, 2024
cef77fd
fix: relocate 'Comments to the Director' widget to correct position
hamed-valiollahi Dec 17, 2024
161fbd9
Merge branch 'release-0.2.0' into fix/hamed-relocate-comments-widget-…
hamed-valiollahi Dec 17, 2024
bb9e0e6
Merge pull request #1480 from bcgov/fix/hamed-export-fuel-headings-1459
hamed-valiollahi Dec 17, 2024
ac1bc2d
fix: Sorting & Display of FSE
dhaselhan Dec 17, 2024
33d3ddf
feat: update FSE identification form explanation wording
hamed-valiollahi Dec 17, 2024
f870eb3
Merge branch 'release-0.2.0' into feat/hamed-fse-form-wording-update-…
hamed-valiollahi Dec 17, 2024
c33d1b5
refactor: remove unnecessary React fragment wrapper
hamed-valiollahi Dec 17, 2024
81b833f
chore: Merge branch 'fix/hamed-relocate-comments-widget-1454' of http…
hamed-valiollahi Dec 17, 2024
5ad8fc1
Merge branch 'release-0.2.0' into fix/hamed-relocate-comments-widget-…
hamed-valiollahi Dec 17, 2024
29c2bc8
fix issue of updating gov users with "Government of B.C." in database.
Dec 17, 2024
deab8ae
Merge pull request #1485 from bcgov/feat/hamed-fse-form-wording-updat…
hamed-valiollahi Dec 17, 2024
e5aaec7
feat: unassociated credit trade calculations, credit validation script
Dec 17, 2024
0966229
Merge branch 'release-0.2.0' into fix/prashanth-bug-chgng-user-name
prv-proton Dec 17, 2024
f6a18d6
feat: Add default CI to Fuel Category
dhaselhan Dec 18, 2024
3bc241e
Merge branch 'release-0.2.0' into fix/hamed-relocate-comments-widget-…
dhaselhan Dec 18, 2024
ce726f7
feat: clear alert on action
kevin-hashimoto Dec 18, 2024
f3b404d
Merge pull request #1483 from bcgov/fix/hamed-relocate-comments-widge…
hamed-valiollahi Dec 18, 2024
8d403e5
Merge branch 'release-0.2.0' into fix/hamed-fuel-code-logic-fix-1303-…
dhaselhan Dec 18, 2024
96c428a
fix: filter showing on other uses summary
kevin-hashimoto Dec 18, 2024
0f35a15
Merge pull request #1476 from bcgov/fix/hamed-fuel-code-logic-fix-130…
hamed-valiollahi Dec 18, 2024
2a2cd6b
Merge branch 'release-0.2.0' into feat/daniel-requir-other-1455
dhaselhan Dec 18, 2024
04a7a3b
Merge pull request #1477 from bcgov/feat/daniel-requir-other-1455
dhaselhan Dec 18, 2024
a458e4c
feat: toast on 400+ errors
kevin-hashimoto Dec 17, 2024
1ee6405
chore: remove unused methods
kevin-hashimoto Dec 17, 2024
d425239
Merge pull request #1478 from bcgov/feat/kevin-1441
kevin-hashimoto Dec 18, 2024
a3becaf
feat: validation fix
Dec 18, 2024
a6cb6fa
feat: add legacy_id
Dec 18, 2024
dfebecf
feat: nested links
kevin-hashimoto Dec 18, 2024
1c85e93
Merge branch 'release-0.2.0' into feat/kevin-1467
kevin-hashimoto Dec 18, 2024
9b208f1
fix: removed continue on error so if tests fail the check fails
Dec 18, 2024
1a03366
Merge branch 'release-0.2.0' into feat/alex-compliance-report-etl
AlexZorkin Dec 18, 2024
376b5d4
Merge branch 'release-0.2.0' into fix/prashanth-bug-chgng-user-name
prv-proton Dec 18, 2024
7d397b3
Merge pull request #1486 from bcgov/fix/prashanth-bug-chgng-user-name
prv-proton Dec 18, 2024
fd1198c
Add data transformation to show transport modes.
areyeslo Dec 17, 2024
3187c52
Merge pull request #1474 from bcgov/LCFS-1446-FuelCodeFeedstockTransp…
areyeslo Dec 18, 2024
bce3579
Supplier cannot add its own Organization as Legal Name Transaction Pa…
areyeslo Dec 17, 2024
82a4ed6
Merge branch 'release-0.2.0' into LCFS-1453-LegalNameOfTransactionPar…
areyeslo Dec 18, 2024
5fa0ddc
Merge pull request #1489 from bcgov/LCFS-1453-LegalNameOfTransactionP…
areyeslo Dec 18, 2024
ac49b23
Merge branch 'release-0.2.0' into fix/daniel-fse-sorting-1460
dhaselhan Dec 18, 2024
37360a9
Merge pull request #1484 from bcgov/fix/daniel-fse-sorting-1460
dhaselhan Dec 18, 2024
14c0508
Merge branch 'release-0.2.0' into feat/daniel-add-ci-to-fuel-category…
dhaselhan Dec 18, 2024
a0ec216
Merge branch 'release-0.2.0' into feat/kevin-1458
kevin-hashimoto Dec 18, 2024
cf6599e
Merge pull request #1492 from bcgov/feat/kevin-1458
kevin-hashimoto Dec 18, 2024
61b379d
Merge branch 'release-0.2.0' into feat/kevin-1467
kevin-hashimoto Dec 18, 2024
a2d2293
Merge branch 'release-0.2.0' into feat/daniel-add-ci-to-fuel-category…
dhaselhan Dec 18, 2024
ac810e0
Merge branch 'release-0.2.0' into fix/alex-workflow-tests-241217
AlexZorkin Dec 18, 2024
fa8aeb3
Merge pull request #1490 from bcgov/feat/daniel-add-ci-to-fuel-catego…
dhaselhan Dec 18, 2024
d5ea831
Merge branch 'release-0.2.0' into fix/alex-workflow-tests-241217
AlexZorkin Dec 18, 2024
29703ca
Merge branch 'release-0.2.0' into feat/kevin-1467
kevin-hashimoto Dec 18, 2024
38c46c1
Merge pull request #1493 from bcgov/feat/kevin-1467
kevin-hashimoto Dec 18, 2024
01026ee
Merge branch 'release-0.2.0' into feat/kevin-1456
kevin-hashimoto Dec 18, 2024
3c9e779
Merge pull request #1491 from bcgov/feat/kevin-1456
kevin-hashimoto Dec 18, 2024
e6fdac8
Add email config for backend test (#1488)
kuanfandevops Dec 18, 2024
4dd57f4
feat: clear alert on action
kevin-hashimoto Dec 18, 2024
db47165
feat: nested links
kevin-hashimoto Dec 18, 2024
6deb494
Add email config for backend test (#1488)
kuanfandevops Dec 18, 2024
45a6322
fix: merge fix
Dec 18, 2024
65db511
Merge branch 'release-0.2.0' into fix/alex-workflow-tests-241217
AlexZorkin Dec 18, 2024
2dd4f58
fix: grid alert not returning correct alert
kevin-hashimoto Dec 18, 2024
ffb6a8e
fix: test fix and package lock update
Dec 18, 2024
af3cbd2
Merge pull request #1499 from bcgov/fix/grid-alert
kevin-hashimoto Dec 18, 2024
7041eb7
Merge branch 'release-0.2.0' into fix/alex-workflow-tests-241217
AlexZorkin Dec 18, 2024
be97282
Merge pull request #1494 from bcgov/fix/alex-workflow-tests-241217
AlexZorkin Dec 18, 2024
33cf651
Merge branch 'release-0.2.0' into feat/alex-compliance-report-etl
AlexZorkin Dec 18, 2024
cb5f7aa
Merge pull request #1428 from bcgov/feat/alex-compliance-report-etl
AlexZorkin Dec 18, 2024
0bbea98
fix: Round non-currency numbers in Summary Table
dhaselhan Dec 18, 2024
a464e91
fix: Disable navigating unless report is draft
dhaselhan Dec 18, 2024
09dd16a
Merge pull request #1505 from bcgov/fix/daniel-block-navigation-1473
dhaselhan Dec 18, 2024
871f880
Optimize query for fuel supply
Dec 19, 2024
75d18e0
fix: update fuel select to turn white on activation
hamed-valiollahi Dec 19, 2024
e3b77f6
fix: correct pagination to reflect filtered user count
hamed-valiollahi Dec 19, 2024
d5e5255
fix: ensure fuel code increments and duplicate rows are placed below …
hamed-valiollahi Dec 19, 2024
b5ff857
feat: Add Legacy Report View
dhaselhan Dec 17, 2024
39457c8
Code Review Feedback
dhaselhan Dec 18, 2024
78d4523
Decrease logging
dhaselhan Dec 18, 2024
94cf924
Add missing await
dhaselhan Dec 18, 2024
d10b9fe
Code Review Feedback
dhaselhan Dec 19, 2024
9a630ac
chore: etl launch changes
Dec 19, 2024
da7a5b4
Removing pre-select in Fuel Category when having multiple elements.
areyeslo Dec 19, 2024
2dca338
Merge pull request #1508 from bcgov/LCFS-1457-LargeFSBreakingReport
areyeslo Dec 19, 2024
45c8c73
fix: remove unnecessary condition for get_users_paginated
hamed-valiollahi Dec 19, 2024
fefcacc
Update fuel code explanation for IDIR users
Dec 19, 2024
60b16dd
Merge branch 'release-0.2.0' into feat/daniel-legacy-report-view-1396
dhaselhan Dec 19, 2024
a98abf4
Merge pull request #1482 from bcgov/feat/daniel-legacy-report-view-1396
dhaselhan Dec 19, 2024
5b9ac63
Merge branch 'release-0.2.0' into fix/hamed-pagination-user-table-1430
hamed-valiollahi Dec 20, 2024
30d75c4
Merge pull request #1513 from bcgov/fix/hamed-pagination-user-table-1430
hamed-valiollahi Dec 20, 2024
a16351f
Merge branch 'release-0.2.0' into fix/daniel-round-summary-numbers-1462
dhaselhan Dec 20, 2024
f4d17b4
Merge branch 'release-0.2.0' into feat/prashanth-fuel-entry-guide-1469
prv-proton Dec 20, 2024
15ff76b
Merge pull request #1524 from bcgov/feat/prashanth-fuel-entry-guide-1469
prv-proton Dec 20, 2024
04b209d
Supporting documents for Compliance Report with status submitted or a…
areyeslo Dec 12, 2024
adbb4fd
Adding Supporting Documents to compliance reports submitted/assessed …
areyeslo Dec 16, 2024
acd349f
Always show supportind documents and edit based on conditions
areyeslo Dec 16, 2024
95defd2
Add validation when uploading documents
areyeslo Dec 17, 2024
faae96e
move validation to service
areyeslo Dec 18, 2024
7314769
Merge pull request #1471 from bcgov/LCFS-1426-UploadFileAttachements-…
areyeslo Dec 20, 2024
eca1dea
Merge branch 'release-0.2.0' into fix/daniel-round-summary-numbers-1462
dhaselhan Dec 20, 2024
dfb5501
Merge pull request #1504 from bcgov/fix/daniel-round-summary-numbers-…
dhaselhan Dec 20, 2024
aa830be
fix: adjust line 1 and 2 calculations
kevin-hashimoto Dec 20, 2024
8945caf
Merge branch 'release-0.2.0' into feat/kevin-1448
kevin-hashimoto Dec 20, 2024
eace15c
Code review changes
areyeslo Dec 20, 2024
8174d52
Merge branch 'release-0.2.0' into LCFS-1515-FuelSupplyOtherJetFuelCat…
areyeslo Dec 20, 2024
882242b
Merge pull request #1521 from bcgov/LCFS-1515-FuelSupplyOtherJetFuelC…
areyeslo Dec 20, 2024
e6678e0
Merge branch 'release-0.2.0' into feat/kevin-1448
kevin-hashimoto Dec 20, 2024
ec4fba4
Merge pull request #1538 from bcgov/feat/kevin-1448
kevin-hashimoto Dec 21, 2024
4735230
fix: lng end use type text
kevin-hashimoto Dec 21, 2024
2b3cd02
Merge branch 'release-0.2.0' into fix/hamed-fuel-active-color-1429
hamed-valiollahi Dec 23, 2024
4b88087
Merge pull request #1512 from bcgov/fix/hamed-fuel-active-color-1429
hamed-valiollahi Dec 23, 2024
85521bd
Merge branch 'release-0.2.0' into fix/hamed-fuel-code-duplicate-1303
hamed-valiollahi Dec 23, 2024
e0a352f
Merge pull request #1519 from bcgov/fix/hamed-fuel-code-duplicate-1303
hamed-valiollahi Dec 23, 2024
f1e2249
Merge branch 'release-0.2.0' into fix/kevin-1514
prv-proton Dec 23, 2024
92591f1
Merge pull request #1558 from bcgov/fix/kevin-1514
kevin-hashimoto Dec 23, 2024
5566bde
Merge branch 'release-0.2.0' into chore/alex-etl-launch
AlexZorkin Dec 23, 2024
d62ab2a
Merge pull request #1520 from bcgov/chore/alex-etl-launch
AlexZorkin Dec 23, 2024
ae7cbb9
feat: updated syncing logic for supplemental report creation
Dec 24, 2024
d23ce4b
fix: cleanup and test updates
Dec 24, 2024
04035e3
Merge pull request #1563 from bcgov/feat/alex-suplemental-syncing-241224
AlexZorkin Dec 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
"""Add Default CI to Categories

Revision ID: 851e09cf8661
Revises: 5b374dd97469
Create Date: 2024-12-17 23:58:07.462215

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "851e09cf8661"
down_revision = "5b374dd97469"
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"fuel_category",
sa.Column(
"default_carbon_intensity",
sa.Numeric(precision=10, scale=2),
nullable=True,
comment="Default carbon intensity of the fuel category",
),
)

# Populate default values for existing records
op.execute(
"""
UPDATE "fuel_category" SET "default_carbon_intensity" = 88.83 WHERE "description" = 'Jet fuel';
"""
)
op.execute(
"""
UPDATE "fuel_category" SET "default_carbon_intensity" = 100.21 WHERE "description" = 'Diesel';
"""
)
op.execute(
"""
UPDATE "fuel_category" SET "default_carbon_intensity" = 93.67 WHERE "description" = 'Gasoline';
"""
)

# Now set the column to NOT NULL after populating defaults
op.alter_column(
"fuel_category",
"default_carbon_intensity",
existing_type=sa.Numeric(precision=10, scale=2),
nullable=False,
)

# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("fuel_category", "default_carbon_intensity")
# ### end Alembic commands ###
11 changes: 9 additions & 2 deletions backend/lcfs/db/models/fuel/FuelCategory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from sqlalchemy import Column, Integer, Text, Enum
from sqlalchemy import Column, Integer, Text, Enum, Float, Numeric
from lcfs.db.base import BaseModel, Auditable, DisplayOrder, EffectiveDates
from sqlalchemy.orm import relationship

Expand All @@ -25,7 +25,14 @@ class FuelCategory(BaseModel, Auditable, DisplayOrder, EffectiveDates):
nullable=False,
comment="Name of the fuel category",
)
description = Column(Text, nullable=True, comment="Description of the fuel categor")
description = Column(
Text, nullable=True, comment="Description of the fuel category"
)
default_carbon_intensity = Column(
Numeric(10, 2),
nullable=False,
comment="Default carbon intensity of the fuel category",
)

energy_effectiveness_ratio = relationship("EnergyEffectivenessRatio")
target_carbon_intensities = relationship(
Expand Down
11 changes: 7 additions & 4 deletions backend/lcfs/db/seeders/common/seed_fuel_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,20 @@
{
"fuel_category_id": 1,
"category": "Gasoline",
"description": "Gasoline"
"description": "Gasoline",
"default_carbon_intensity": 93.67
},
{
"fuel_category_id": 2,
"category": "Diesel",
"description": "Diesel"
"description": "Diesel",
"default_carbon_intensity": 100.21
},
{
"fuel_category_id": 3,
"category": "Jet fuel",
"description": "Jet fuel"
"description": "Jet fuel",
"default_carbon_intensity": 88.83
}
],
"end_use_types": [
Expand Down Expand Up @@ -1092,4 +1095,4 @@
"display_order": 4
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ async def expected_uses(dbsession):
@pytest.fixture
async def fuel_categories(dbsession):
fuel_categories = [
FuelCategory(fuel_category_id=998, category="Gasoline"),
FuelCategory(fuel_category_id=999, category="Diesel"),
FuelCategory(
fuel_category_id=998, category="Gasoline", default_carbon_intensity=0
),
FuelCategory(
fuel_category_id=999, category="Diesel", default_carbon_intensity=0
),
]

dbsession.add_all(fuel_categories)
Expand Down
92 changes: 89 additions & 3 deletions backend/lcfs/tests/fuel_code/test_fuel_code_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ async def test_get_fuel_type_by_id_not_found(fuel_code_repo, mock_db):

@pytest.mark.anyio
async def test_get_fuel_categories(fuel_code_repo, mock_db):
mock_fc = FuelCategory(fuel_category_id=1, category="Renewable")
mock_fc = FuelCategory(
fuel_category_id=1, category="Renewable", default_carbon_intensity=0
)
mock_result = MagicMock()
mock_result.scalars.return_value.all.return_value = [mock_fc]
mock_db.execute.return_value = mock_result
Expand All @@ -157,12 +159,14 @@ async def test_get_fuel_categories(fuel_code_repo, mock_db):

@pytest.mark.anyio
async def test_get_fuel_category_by_name(fuel_code_repo, mock_db):
mock_fc = FuelCategory(fuel_category_id=2, category="Fossil")
mock_fc = FuelCategory(
fuel_category_id=2, category="Fossil", default_carbon_intensity=0
)
mock_result = MagicMock()
mock_result.scalar_one_or_none.return_value = mock_fc
mock_db.execute.return_value = mock_result

result = await fuel_code_repo.get_fuel_category_by_name("Fossil")
result = await fuel_code_repo.get_fuel_category_by(category="Fossil")
assert result == mock_fc


Expand Down Expand Up @@ -646,6 +650,88 @@ async def test_get_standardized_fuel_data(fuel_code_repo, mock_db):
assert result.uci == 5.0


@pytest.mark.anyio
async def test_get_standardized_fuel_data_unrecognized(fuel_code_repo, mock_db):
# Mock an unrecognized fuel type
mock_fuel_type = FuelType(
fuel_type_id=1,
fuel_type="UnknownFuel",
default_carbon_intensity=None,
unrecognized=True,
)

# Mock a fuel category with a default CI
mock_fuel_category = FuelCategory(
fuel_category_id=2, category="SomeCategory", default_carbon_intensity=93.67
)

# The repo uses get_one to get the fuel type.
mock_db.get_one.return_value = mock_fuel_type

# Mock the repo method to get the fuel category
fuel_code_repo.get_fuel_category_by = AsyncMock(return_value=mock_fuel_category)

# Setup side effects for subsequent queries:
# Energy Density
energy_density_result = MagicMock(
scalars=MagicMock(
return_value=MagicMock(
first=MagicMock(return_value=EnergyDensity(density=35.0))
)
)
)
# EER
eer_result = MagicMock(
scalars=MagicMock(
return_value=MagicMock(
first=MagicMock(return_value=EnergyEffectivenessRatio(ratio=2.0))
)
)
)
# Target Carbon Intensities
tci_result = MagicMock(
scalars=MagicMock(
return_value=MagicMock(
all=MagicMock(
return_value=[TargetCarbonIntensity(target_carbon_intensity=50.0)]
)
)
)
)
# Additional Carbon Intensity
aci_result = MagicMock(
scalars=MagicMock(
return_value=MagicMock(
one_or_none=MagicMock(
return_value=AdditionalCarbonIntensity(intensity=5.0)
)
)
)
)

# Set the side_effect for the mock_db.execute calls in the order they're invoked
mock_db.execute.side_effect = [
energy_density_result,
eer_result,
tci_result,
aci_result,
]

result = await fuel_code_repo.get_standardized_fuel_data(
fuel_type_id=1, fuel_category_id=2, end_use_id=3, compliance_period="2024"
)

# Since fuel_type is unrecognized, it should use the FuelCategory's default CI
assert result.effective_carbon_intensity == 93.67
assert result.target_ci == 50.0
assert result.eer == 2.0
assert result.energy_density == 35.0
assert result.uci == 5.0

# Ensure get_fuel_category_by was called once with the correct parameter
fuel_code_repo.get_fuel_category_by.assert_awaited_once_with(fuel_category_id=2)


@pytest.mark.anyio
async def test_get_additional_carbon_intensity(fuel_code_repo, mock_db):
aci = AdditionalCarbonIntensity(additional_uci_id=1, intensity=10.0)
Expand Down
8 changes: 4 additions & 4 deletions backend/lcfs/web/api/allocation_agreement/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ async def convert_to_model(
allocation_agreement.allocation_transaction_type
)
)
fuel_category = await self.fuel_repo.get_fuel_category_by_name(
allocation_agreement.fuel_category
fuel_category = await self.fuel_repo.get_fuel_category_by(
category=allocation_agreement.fuel_category
)
fuel_type = await self.fuel_repo.get_fuel_type_by_name(
allocation_agreement.fuel_type
Expand Down Expand Up @@ -226,8 +226,8 @@ async def update_allocation_agreement(
!= allocation_agreement_data.fuel_category
):
existing_allocation_agreement.fuel_category = (
await self.fuel_repo.get_fuel_category_by_name(
allocation_agreement_data.fuel_category
await self.fuel_repo.get_fuel_category_by(
category=allocation_agreement_data.fuel_category
)
)

Expand Down
15 changes: 10 additions & 5 deletions backend/lcfs/web/api/fuel_code/repo.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from dataclasses import dataclass
from datetime import date
from typing import List, Dict, Any, Union, Optional, Sequence

import structlog
from fastapi import Depends
from sqlalchemy import and_, or_, select, func, text, update, distinct, desc, asc
from sqlalchemy.dialects import postgresql
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import joinedload, contains_eager

Expand Down Expand Up @@ -33,7 +33,6 @@
)
from lcfs.web.api.fuel_code.schema import FuelCodeCloneSchema, FuelCodeSchema
from lcfs.web.core.decorators import repo_handler
from dataclasses import dataclass

logger = structlog.get_logger(__name__)

Expand Down Expand Up @@ -175,9 +174,9 @@ async def get_fuel_categories(self) -> List[FuelCategory]:
return (await self.db.execute(select(FuelCategory))).scalars().all()

@repo_handler
async def get_fuel_category_by_name(self, name: str) -> FuelCategory:
"""Get a fuel category by its name"""
result = await self.db.execute(select(FuelCategory).filter_by(category=name))
async def get_fuel_category_by(self, **filters: Any) -> FuelCategory:
"""Get a fuel category by any filters"""
result = await self.db.execute(select(FuelCategory).filter_by(**filters))
return result.scalar_one_or_none()

@repo_handler
Expand Down Expand Up @@ -861,6 +860,12 @@ async def get_standardized_fuel_data(
if fuel_code_id:
fuel_code = await self.get_fuel_code(fuel_code_id)
effective_carbon_intensity = fuel_code.carbon_intensity
# Other Fuel uses the Default CI of the Category
elif fuel_type.unrecognized:
fuel_category = await self.get_fuel_category_by(
fuel_category_id=fuel_category_id
)
effective_carbon_intensity = fuel_category.default_carbon_intensity
else:
effective_carbon_intensity = fuel_type.default_carbon_intensity

Expand Down
Loading