From 2c3767cf7aa25e9bc806af69af6605b184e6a64d Mon Sep 17 00:00:00 2001 From: Xiang Chen Date: Fri, 1 Nov 2024 09:54:13 -0400 Subject: [PATCH 1/3] add CONTRIBUTING doc --- CONTRIBUTING.md | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..55f4202 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,110 @@ + +# Contributing to [PROJECT_NAME] + +Thank you for your interest in contributing to [PROJECT_NAME]! As a contributor, you’ll work from your fork of the main repository. This document outlines the steps to set up your development environment, guidelines for coding, and instructions for submitting contributions. + +## Customization Instructions + +To adapt this `CONTRIBUTING.md` template for a specific project: +1. Replace `[PROJECT_NAME]` with the name of your project. +2. Replace `[REPOSITORY_URL]` with the URL of the main repository on GitHub. +3. If needed, replace `[FORMAT_TOOL]` with the specific formatting tool or linter used in your project (e.g., `ruff`, `black`). + +After making these replacements, this file will be ready for use in your project repository. + +## Repository Information + +- **Main Repository**: `[REPOSITORY_URL]` + +## How to Fork the Repository + +1. **Go to the Repository on GitHub**: + - Open your web browser and navigate to the main repository you want to fork. For this project, the URL is `[REPOSITORY_URL]`. + +2. **Click the Fork Button**: + - In the upper-right corner of the repository page, you’ll see a button labeled **Fork**. Click it. + - GitHub will ask you to select your GitHub account or organization where you want the fork to be created. + +3. **Clone Your Fork Locally**: + - Once your fork is created, you can clone it to your local machine to start working: + ```bash + git clone https://github.com/your-username/[PROJECT_NAME].git + cd [PROJECT_NAME] + ``` + +You now have your own copy (fork) of the repository where you can make changes independently from the main repository. When you’re ready to contribute back, you can create a pull request from your fork to the main repository. + +## Getting Started + +1. **Fork the Repository**: First, create a fork of the main repository in your own GitHub account. This will allow you to freely make changes without affecting the main repository. + +2. **Clone Your Fork**: Clone your fork to your local machine: + ```bash + git clone https://github.com/your-username/[PROJECT_NAME].git + cd [PROJECT_NAME] + ``` + +3. **Add the Main Repository as Upstream**: To keep your fork in sync with the latest updates from the main repo, add it as a second remote named `upstream`: + ```bash + git remote add upstream [REPOSITORY_URL] + ``` + +4. **Create a Branch**: Create a new branch for each feature or bug fix: + ```bash + git checkout -b feature/your-feature-name + ``` + +## Making Changes + +- **Coding Standards**: Follow PEP 8 for Python code (or your organization’s standards). Use `[FORMAT_TOOL]` to ensure code formatting aligns with the repository’s requirements. +- **Testing**: Ensure your changes pass all tests. Include relevant tests for any new features you add. +- **Documentation**: Update the documentation for any significant code changes. This includes comments, docstrings, and relevant updates to the `README.md`. + +## Keeping Your Fork Updated + +Regularly pull updates from the main repository to keep your fork in sync: +```bash +git fetch upstream +git merge upstream/main +``` + +## Submitting a Pull Request + +When you’re ready to contribute your changes: + +1. **Commit Your Changes**: Write concise and descriptive commit messages. + ```bash + git add . + git commit -m "Description of changes" + ``` + +2. **Push to Your Fork**: + ```bash + git push origin feature/your-feature-name + ``` + +3. **Open a Pull Request**: + - Go to your forked repository on GitHub. + - Click on **New Pull Request**. + - Ensure the base repository is `[REPOSITORY_URL]` and the base branch is `main`. + - Provide a title and description for your pull request. + - Submit the pull request for review. + +## Code Review Process + +Once you submit a pull request: +- The maintainers will review your changes and may request modifications. +- Please address any feedback and re-submit for review. + +## Issues and Support + +If you encounter issues or have questions, feel free to open an issue on GitHub. We’ll do our best to assist. + +## License + +By contributing, you agree that your contributions will be licensed under the same open-source license as the project. + +--- + +Thank you for your contributions to [PROJECT_NAME]! We’re excited to work with you. + From 3b8c22cfed53ea80fa3a68d2ae94bf852b08ed13 Mon Sep 17 00:00:00 2001 From: Xiang Chen Date: Wed, 20 Nov 2024 12:17:11 -0500 Subject: [PATCH 2/3] update based on review --- CONTRIBUTING.md | 50 ++++++++++++++++++++----------------------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 55f4202..172bbff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,25 +1,16 @@ +# Contributing to package_name -# Contributing to [PROJECT_NAME] +Thank you for your interest in contributing to package_name! As a contributor, you’ll work from your fork of the main repository. This document outlines the steps to set up your development environment, guidelines for coding, and instructions for submitting contributions. -Thank you for your interest in contributing to [PROJECT_NAME]! As a contributor, you’ll work from your fork of the main repository. This document outlines the steps to set up your development environment, guidelines for coding, and instructions for submitting contributions. - -## Customization Instructions - -To adapt this `CONTRIBUTING.md` template for a specific project: -1. Replace `[PROJECT_NAME]` with the name of your project. -2. Replace `[REPOSITORY_URL]` with the URL of the main repository on GitHub. -3. If needed, replace `[FORMAT_TOOL]` with the specific formatting tool or linter used in your project (e.g., `ruff`, `black`). - -After making these replacements, this file will be ready for use in your project repository. ## Repository Information -- **Main Repository**: `[REPOSITORY_URL]` +- **Main Repository**: `https://github.com/ssec-jhu/base-template` ## How to Fork the Repository 1. **Go to the Repository on GitHub**: - - Open your web browser and navigate to the main repository you want to fork. For this project, the URL is `[REPOSITORY_URL]`. + - Open your web browser and navigate to the main repository you want to fork. For this project, the URL is `https://github.com/ssec-jhu/base-template`. 2. **Click the Fork Button**: - In the upper-right corner of the repository page, you’ll see a button labeled **Fork**. Click it. @@ -28,35 +19,33 @@ After making these replacements, this file will be ready for use in your project 3. **Clone Your Fork Locally**: - Once your fork is created, you can clone it to your local machine to start working: ```bash - git clone https://github.com/your-username/[PROJECT_NAME].git - cd [PROJECT_NAME] + git clone https://github.com/your-username/package_name.git + cd package_name ``` You now have your own copy (fork) of the repository where you can make changes independently from the main repository. When you’re ready to contribute back, you can create a pull request from your fork to the main repository. ## Getting Started -1. **Fork the Repository**: First, create a fork of the main repository in your own GitHub account. This will allow you to freely make changes without affecting the main repository. - -2. **Clone Your Fork**: Clone your fork to your local machine: - ```bash - git clone https://github.com/your-username/[PROJECT_NAME].git - cd [PROJECT_NAME] +1. **Fork and Clone the Repository**: + - Follow the instructions in the [How to Fork the Repository](#how-to-fork-the-repository) section. ``` -3. **Add the Main Repository as Upstream**: To keep your fork in sync with the latest updates from the main repo, add it as a second remote named `upstream`: +2. **Add the Main Repository as Upstream**: To keep your fork in sync with the latest updates from the main repo, add it as a second remote named `upstream`: ```bash - git remote add upstream [REPOSITORY_URL] + git remote add upstream https://github.com/ssec-jhu/base-template ``` -4. **Create a Branch**: Create a new branch for each feature or bug fix: +3. **Create a Branch**: Create a new branch for each feature or bug fix: ```bash + git fetch --all + git checkout upstream/main git checkout -b feature/your-feature-name ``` ## Making Changes -- **Coding Standards**: Follow PEP 8 for Python code (or your organization’s standards). Use `[FORMAT_TOOL]` to ensure code formatting aligns with the repository’s requirements. +- **Coding Standards**: Follow PEP 8 for Python code (or your organization’s standards). Use `tox -e check-style` to ensure code formatting aligns with the repository’s requirements. - **Testing**: Ensure your changes pass all tests. Include relevant tests for any new features you add. - **Documentation**: Update the documentation for any significant code changes. This includes comments, docstrings, and relevant updates to the `README.md`. @@ -65,7 +54,8 @@ You now have your own copy (fork) of the repository where you can make changes i Regularly pull updates from the main repository to keep your fork in sync: ```bash git fetch upstream -git merge upstream/main +git checkout +git rebase upstream/main ``` ## Submitting a Pull Request @@ -74,8 +64,8 @@ When you’re ready to contribute your changes: 1. **Commit Your Changes**: Write concise and descriptive commit messages. ```bash - git add . - git commit -m "Description of changes" + git add + git commit -am "Description of changes" ``` 2. **Push to Your Fork**: @@ -86,7 +76,7 @@ When you’re ready to contribute your changes: 3. **Open a Pull Request**: - Go to your forked repository on GitHub. - Click on **New Pull Request**. - - Ensure the base repository is `[REPOSITORY_URL]` and the base branch is `main`. + - Ensure the base repository is `https://github.com/ssec-jhu/base-template` and the base branch is `main`. - Provide a title and description for your pull request. - Submit the pull request for review. @@ -106,5 +96,5 @@ By contributing, you agree that your contributions will be licensed under the sa --- -Thank you for your contributions to [PROJECT_NAME]! We’re excited to work with you. +Thank you for your contributions to package_name! We’re excited to work with you. From 6da8b4c8c3fcbc03cff1fcce76829ba00ddd9b97 Mon Sep 17 00:00:00 2001 From: Xiang Chen Date: Fri, 22 Nov 2024 10:21:56 -0500 Subject: [PATCH 3/3] update2 --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 172bbff..044272c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,8 +19,8 @@ Thank you for your interest in contributing to package_name! As a contributor, y 3. **Clone Your Fork Locally**: - Once your fork is created, you can clone it to your local machine to start working: ```bash - git clone https://github.com/your-username/package_name.git - cd package_name + git clone https://github.com/your-username/base-template + cd ``` You now have your own copy (fork) of the repository where you can make changes independently from the main repository. When you’re ready to contribute back, you can create a pull request from your fork to the main repository.