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

refactor(x/ecocredit): update project id and batch denom #1046

Merged
merged 27 commits into from
May 4, 2022

Conversation

ryanchristo
Copy link
Member

@ryanchristo ryanchristo commented Apr 21, 2022

Description

Closes: #1032

Update project id to include class id and batch denom to use project id rather than class id. This pull request also removes support for custom project ids but I can revert if we feel this is something we still want to support.

This pull request does not include the following items brought up in #1032 that are still being discussed in #883 and #1066:

  • a reference id without unique constraints for convenient lookups
  • global project ids rather than project ids scoped to credit classes
  • support for multiple credit classes using a join table that would store a class-project-id

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@codecov
Copy link

codecov bot commented Apr 27, 2022

Codecov Report

Merging #1046 (39a603a) into master (b237a50) will decrease coverage by 6.04%.
The diff coverage is 58.82%.

@@            Coverage Diff             @@
##           master    #1046      +/-   ##
==========================================
- Coverage   68.97%   62.93%   -6.05%     
==========================================
  Files         216      213       -3     
  Lines       21312    19385    -1927     
==========================================
- Hits        14701    12200    -2501     
- Misses       5259     5908     +649     
+ Partials     1352     1277      -75     
Flag Coverage Δ
experimental-codecov ?
stable-codecov 62.93% <58.82%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ryanchristo ryanchristo marked this pull request as ready for review April 27, 2022 04:19
@ryanchristo ryanchristo changed the title fix(x/ecocredit): project id and batch denom refactor(x/ecocredit): update project id and batch denom Apr 27, 2022
Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

looks good - just one nit. i'm not partial to whether or not we do project ID's so ill approve once theres product consensus 👍🏻

x/ecocredit/core/utils.go Outdated Show resolved Hide resolved
@clevinson
Copy link
Member

Concept ACK on removing custom project_id's and changing the batch denom as described here.

Copy link
Contributor

@technicallyty technicallyty left a comment

Choose a reason for hiding this comment

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

lgtm, pre-approving

@ryanchristo
Copy link
Member Author

@aleem1314 can you review when you get a chance? 🙏

Copy link
Contributor

@aleem1314 aleem1314 left a comment

Choose a reason for hiding this comment

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

Pre approving

@ryanchristo ryanchristo enabled auto-merge (squash) May 4, 2022 15:14
@ryanchristo ryanchristo merged commit e4baa84 into master May 4, 2022
@ryanchristo ryanchristo deleted the ryan/1032-project-id-batch-denom branch May 4, 2022 15:26
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.

A credit class with multiple projects breaks batch creation
5 participants