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

EN-12514: github community standards #4319

Merged
merged 2 commits into from
Jul 22, 2022

Conversation

bogdan-rosianu
Copy link
Contributor

added code of conduct, PR template, contributing guide, and also refactored issue templates

@bogdan-rosianu bogdan-rosianu added the type:feature New feature or request label Jul 22, 2022
@bogdan-rosianu bogdan-rosianu self-assigned this Jul 22, 2022

## Use development branch

External contributions should happen against the `development` branch.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

## Use linter

Make sure the code is well-formatted and aligned before opening a PR. Some linters such `gofmt` can be used, or code style
can be proactively checked while written code when using an IDE.
Copy link
Contributor

Choose a reason for hiding this comment

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

writing? + comma before when

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

## Writing tests

In case of adding a new feature, make sure you follow these guidelines:
- Attempt to write some unit tests which verify the component in isolation and mock the external components around it
Copy link
Contributor

Choose a reason for hiding this comment

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

start all list entries with lower case, end them with ; except the last one which ends with .

Valid for all lists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


In case of adding a new feature, make sure you follow these guidelines:
- Attempt to write some unit tests which verify the component in isolation and mock the external components around it
- If the component relies on many other external components which are difficult to mock, write integrations tests for it
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add:

Although, this usually means that further decoupling using interfaces is required. Also, the component might needed to be split in smaller, specialized sub-components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

- Try to first write the unit test that exposes the bug, then fix it and have a test that will make sure the specific situation will always be tested in the future

In both cases, make sure that the new code has a good code coverage (ideally, 100% of the new lines are covered) and also try to cover edge-cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should add:

Please take care of the severity of the bug. Pushing directly a fix of an undiscovered, critical bug or a bug that can be exploited in such a way that could create damage to the blockchain, loss of funds, state alteration beyond repair, and so on, can be exploited before the team can take any action. Please contact the team on private channels before pushing the fix if you have any doubts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/ElrondNetwork/elrond-go/blob/main/.github/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's also add the version. Something like: v1.3.35.0-0-gfc78258fe/go1.17.6/linux-amd64 and the Host: DO, AWS, Contabo, no VPS (if you run your validator on a physical machine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

## Writing tests

In case of adding a new feature, make sure you follow these guidelines:
- Attempt to write some unit tests which verify the component in isolation and mock the external components around it
Copy link
Contributor

@raduchis raduchis Jul 22, 2022

Choose a reason for hiding this comment

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

Write unit tests which.... remove attempt and some
also two lines down

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

In case of adding a new feature, make sure you follow these guidelines:
- Attempt to write some unit tests which verify the component in isolation and mock the external components around it
- If the component relies on many other external components which are difficult to mock, write integrations tests for it
- Try to cover both expected functionality but also verify that the code fails in expected ways
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove try to: Cover both expected functionality...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@codecov-commenter
Copy link

Codecov Report

Merging #4319 (50cb97a) into master (4a29eda) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4319   +/-   ##
=======================================
  Coverage   70.90%   70.90%           
=======================================
  Files         618      618           
  Lines       82471    82471           
=======================================
+ Hits        58478    58480    +2     
+ Misses      19765    19764    -1     
+ Partials     4228     4227    -1     
Impacted Files Coverage Δ
storage/txcache/txListBySenderMap.go 100.00% <0.00%> (+2.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a29eda...50cb97a. Read the comment docs.

@bogdan-rosianu bogdan-rosianu merged commit db10dc2 into master Jul 22, 2022
@bogdan-rosianu bogdan-rosianu deleted the EN-12514-github-community-standard branch July 22, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants