Thank you for considering contributing to the CoreZipCode! Welcome to our Contribution Guide.
If you don't want contribute with code, but want to help us Reporting Issues, just skip to Reporting an Issue section.
However, if you prefer to work with code, simply go to Cloning the repository section and continue to the end of this document.
We follow (or try to) this code architecture principles:
- OOP
- SOLID
- Design Patterns
- DRY - Don't Repeat Yourself
- KISS - Keep It Simple, Stupid
- YAGNI - You Aren't Gonna Need It
-
Describe what you expected to happen and what actually happens.
-
If possible, include a minimal but complete example to help us reproduce the issue.
-
We'll try to fix it as soon as possible but be in mind that CoreZipCode is open source and you can probably submit a pull request to fix it even faster.
-
Just open you issue.
First of all you'll need some tools like Microsoft .Net Core and Git to get your development environment working, as code editor we used Visual Studio Code, but it's only a suggestion, use whatever code editor you want.
You can clone by https:
git clone https://github.com/danilolutz/CoreZipCode.git
Or by SSH:
git clone git@github.com:danilolutz/CoreZipCode.git
Whatever you prefer. Clone the repo and start your work following this steps (aka gitflow):
- 🔧 Create a new branch based on develop
- ✅ Name you branch how you prefer BUT develop or master
- 🎨 Do the best of your art
- 📝 Make commit with a clear message
- 👌 Open a pull request from your new branch to develop
We usually use TDD as development workflow, just a suggestion.
Maybe you ask yourself: How can I contribute? or What i can do?
We'll help you:
- You can implement you favorite zipcode or postcode service and submit to CoreZipCode to be an out-of-the-box service;
- You can find and fix bugs;
- Implement openned issues;
- Improve the CoreZipCode programming.
Only thing will be required by us to approve the pull requests are the unit tests (with correct code coverage) for the new implementations.
You already know how it's works, just add you test class in CoreZipCode.Tests
project, implement it, run the unit tests, be sure everything is okay and submit to repo.
To run the tests go to solution folder and execute:
dotnet test
If you want to see how the code coverage is going, just execute:
dotnet test CoreZipCode.Tests/CoreZipCode.Tests.csproj -p:CollectCoverage=true -p:CoverletOutputFormat=opencover -p:CoverletOutput=".coverage/coverage.opencover.xml" -p:Exclude="[CoreZipCode.Tests*]*" -p:Exclude="[xunit*]*"
reportgenerator -reports:CoreZipCode.Tests/.coverage/coverage.opencover.xml -targetdir:CoreZipCode.Tests/.coverage
And open the file CoreZipCode.Tests/.coverage/index.htm
to see how the unit tests are affecting the code coverage.
NOTE: You need to have ReportGenerator installed. Use the follow command:
dotnet tool install -g dotnet-reportgenerator-globaltool
to install it globally.