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

feat!: Add dates as a top level field to credit batches (#393) #412

Merged
merged 7 commits into from
Jul 15, 2021

Conversation

ruhatch
Copy link
Contributor

@ruhatch ruhatch commented Jul 12, 2021

Description

Add start_date and end_date fields to BatchInfo and associated MsgCreateBatchRequest. These dates track the period during which the credit batch was quantified and verified.

Closes: #393


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)

@ruhatch ruhatch requested a review from a team July 12, 2021 10:42
@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #412 (d4e1cd1) into master (00397ce) will increase coverage by 0.99%.
The diff coverage is 71.86%.

❗ Current head d4e1cd1 differs from pull request most recent head 5f4e7d8. Consider uploading reports for the commit 5f4e7d8 to get more accurate results

@@            Coverage Diff             @@
##           master     #412      +/-   ##
==========================================
+ Coverage   55.10%   56.09%   +0.99%     
==========================================
  Files          33       59      +26     
  Lines         931     3742    +2811     
==========================================
+ Hits          513     2099    +1586     
- Misses        376     1372     +996     
- Partials       42      271     +229     
Flag Coverage Δ
experimental-codecov 56.09% <71.86%> (?)
stable-codecov 56.09% <71.86%> (?)

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

@ruhatch ruhatch requested a review from aaronc July 12, 2021 10:45
x/ecocredit/msgs.go Show resolved Hide resolved
x/ecocredit/server/testsuite/suite.go Show resolved Hide resolved
@ruhatch ruhatch requested a review from aaronc July 14, 2021 13:58
Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

LGTM

@aaronc aaronc enabled auto-merge (squash) July 14, 2021 15:34
@ruhatch ruhatch disabled auto-merge July 14, 2021 15:36
@ruhatch ruhatch enabled auto-merge (squash) July 14, 2021 15:36
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

approving, but left 2 suggestions which will improve the code maintenance.

@@ -30,6 +30,14 @@ message EventCreateBatch {

// total_amount is the total number of credits in the credit batch.
string total_amount = 4 [ (gogoproto.moretags) = "yaml:\"total_amount\"" ];

// start_date is the beginning of the period during which this credit batch
// was quantified and verified.
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of copying, how about saying:

start data is the MsgCreateBatchRequest.start_date value

Same for end_date.

x/ecocredit/client/tx.go Show resolved Hide resolved
Copy link
Contributor

@likhita-809 likhita-809 left a comment

Choose a reason for hiding this comment

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

lgtm

@ruhatch ruhatch disabled auto-merge July 15, 2021 08:33
@ruhatch ruhatch enabled auto-merge (squash) July 15, 2021 08:50
@ruhatch ruhatch merged commit 0bd4cd9 into master Jul 15, 2021
@ruhatch ruhatch deleted the ruhatch/batch-dates branch July 15, 2021 08:53
@clevinson clevinson mentioned this pull request Jul 27, 2021
7 tasks
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.

Add dates as a top level field to credit batches
5 participants