Skip to content

Contribution

Kuba Szostak edited this page Jun 30, 2024 · 1 revision

Contributions are welcome

You can help this project by enhancing the codebase or providing unit tests. This guide will walk you through the process of creating a pull request (PR) to our GitHub repository. Following these instructions will help ensure a smooth and efficient review process.

Step 1: Fork the Repository

If you haven't already, fork the repository to your GitHub account. This creates a copy of the repository where you can make changes.

image

Step 2: Clone the Repository

Clone your forked repository to your local machine using the following command:

git clone https://github.com/YOUR_USERNAME/NetTopologySuite.IO.Esri.git

Replace YOUR_USERNAME with your GitHub username.

Step 3: Create a New Branch

Before making any changes, create a new branch from the develop branch.

git checkout -b fix/issue012_description

Please follow fix/issue012_description naming convention when creating a new branch.

image

Step 4: Make Your Changes

  • Make the necessary changes to the codebase to address the issue or implement the new feature.
  • Follow the .NET naming guidelines.
  • Document the code:
    • All classes must have code documentation.
    • All public or protected methods, functions and properties must have sufficient code documentation.

Step 5: Add Tests

Ensure that your changes are covered by tests. Tests should be added to the Visual Studio Project NetTopologySuite.IO.Esri.Test within the Issues folder. Follow existing naming convention for your test files.

image

Test data

If your changes address issues caused by specific shapefiles, it is advisable to add these shapefiles to the TestData\TestShapefiles\Issues folder. If you add a shapefile, it should be used in your tests. Ensure that your test files in the Issues folder follow existing naming convention.

image

You can reference test data using dedicated TestShapefiles class:

var shpPath = TestShapefiles.PathTo("Issues/027/faults_bounddaries.shp");
var features = Shapefile.ReadAllFeatures(shpPath);

You can also create a temporary shapefile if needed for your tests:

var shpFile = TestShapefiles.GetTempShpPath();
Shapefile.WriteAllFeatures(features, shpFile);
TestShapefiles.DeleteShp(shpFile);

Step 6: Commit Your Changes

Commit your changes with a meaningful commit message. Ensure your commit messages are clear and concise.

git add .
git commit -m "Fix issue #012: Description of the fix"

Step 7: Push Your Changes

Push your changes to your forked repository:

git push origin fix/issue012_description

Step 8: Create a Pull Request

Navigate to your forked repository on GitHub. You should see a prompt to create a pull request for your recently pushed branch. Click on the "Compare & pull request" button.

Pull Request Description

In the pull request description, provide the following information:

  • A brief summary of the changes
  • A link to the issue being addressed
  • Any additional context or details that might be useful for the reviewer

Step 9: Submit the Pull Request

Submit the pull request for review. Your changes will be reviewed, and you may be asked to make additional modifications.

Step 10: Respond to Review Feedback

Be responsive to any feedback provided by the reviewers. Make the necessary changes and push them to the same branch. Your pull request will be updated automatically.