-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from Snowflake-Labs/update_contributing_guide…
…lines Changes
- Loading branch information
Showing
6 changed files
with
59 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,43 +7,44 @@ operating environment, schemachange version and python version. Whenever possibl | |
also include a brief, self-contained code example that demonstrates the problem. | ||
|
||
We have | ||
included [issue templates for reporting bugs, requesting features and seeking clarifications.](https://github.com/Snowflake-Labs/schemachange/issues/new/choose) | ||
Choose the appropriate issue template to contribute to the repository. | ||
included [issue templates](https://github.com/Snowflake-Labs/schemachange/issues/new/choose) for reporting bugs, requesting features and seeking clarifications. Choose the appropriate issue template to contribute to the repository. | ||
|
||
## Contributing code | ||
|
||
Thanks for your interest in contributing code to schemachange! | ||
Thank you for your interest in contributing code to schemachange! | ||
|
||
+ If this is your first time contributing to a project on GitHub, please read through | ||
our [guide to contributing to schemachange](guide-to-contributing-to-schemachange). | ||
+ If this is your first time contributing to a project on GitHub, please continue reading through | ||
[our guide to contributing to schemachange](#guide-to-contributing-to-schemachange). | ||
+ There are many online tutorials to help you [learn git](https://try.github.io/). For discussions of specific git | ||
workflows, see these discussions | ||
on [linux git workflow](https://www.mail-archive.com/[email protected]/msg39091.html), | ||
and [ipython git workflow](https://mail.python.org/pipermail/ipython-dev/2010-October/005632.html). | ||
|
||
### Guide to contributing to schemachange | ||
|
||
> **IMPORTANT** : You will need to follow the [provisioning and schemachange setup instructions](../demo/README.MD) to ensure you can run GitHub actions against your Snowflake account before placing a PR with main schemachange repository so that your PR can be merged into schemachange master branch. | ||
1. If you are a first-time contributor | ||
+ Go to [Snowflake-Labs/Schemachange](https://github.com/Snowflake-Labs/schemachange) and click the "fork" button to | ||
create your own copy of the project. | ||
+ [Clone](https://github.com/git-guides/git-clone) the project to your local computer | ||
|
||
```shell | ||
git clone https://github.com/your-username/schemachange.git | ||
|
||
# Replace <you-github-username> with your Github User Name otherwise | ||
# you will not be able to clone from the fork you created earlier. | ||
git clone https://github.com/<your-github-username>/schemachange.git | ||
``` | ||
|
||
+ Change the directory | ||
|
||
```shell | ||
cd schemachange | ||
``` | ||
|
||
+ Add upstream repository: | ||
|
||
```shell | ||
git remote add upstream https://github.com/Snowflake-Labs/schemachange | ||
``` | ||
|
||
+ Now, `git remote -v` will show two [remote](https://github.com/git-guides/git-remote) repositories named: | ||
|
@@ -54,7 +55,6 @@ Thanks for your interest in contributing code to schemachange! | |
```shell | ||
git checkout main | ||
git pull upstream main --tags | ||
``` | ||
|
||
2. Create and Activate a Virtual Environment | ||
|
@@ -68,20 +68,22 @@ Thanks for your interest in contributing code to schemachange! | |
of [this](https://docs.python.org/3/library/venv.html#how-venvs-work) table: | ||
|
||
| Platform | Shell | Command | | ||
|----------|------------|---------------------------------------| | ||
|----------|------------|---------------------------------------| | ||
| POSIX | bash/zsh | `$ source <venv>/bin/activate` | | ||
| POSIX | fish | `$ source <venv>/bin/activate.fish` | | ||
| POSIX | csh/tcsh | `$ source <venv>/bin/activate.csh` | | ||
| POSIX | PowerShell | `$ <venv>/bin/Activate.ps1` | | ||
| Windows | cmd.exe | `C:\> <venv>\Scripts\activate.bat` | | ||
| Windows | PowerShell | `PS C:\> <venv>\Scripts\Activate.ps1` | | ||
|
||
3. With your virtual environment activated, upgrade pip | ||
3. With your virtual environment activated, upgrade `pip` | ||
|
||
```bash | ||
python -m pip install --upgrade pip | ||
``` | ||
|
||
4. Install the repo as an "editable" package with development dependencies | ||
|
||
```bash | ||
pip install -e .[dev] | ||
``` | ||
|
@@ -90,27 +92,30 @@ Thanks for your interest in contributing code to schemachange! | |
+ Create a branch for the features you want to work on. Since the branch name will appear in the merge message, use | ||
a sensible name such as 'update-build-library-dependencies': | ||
|
||
```shell | ||
git checkout -b update-build-library-dependencies | ||
``` | ||
```shell | ||
git checkout -b update-build-library-dependencies | ||
``` | ||
|
||
+ Commit locally as you progress ( [git add](https://github.com/git-guides/git-add) | ||
and [git commit](https://github.com/git-guides/git-commit) ). Use a properly formatted commit message. Be sure to | ||
document any changed behavior. | ||
document any changed behavior in the [CHANGELOG.md](../CHANGELOG.md) file to help us collate the changes for a specific release. | ||
|
||
4. Test your contribution locally | ||
|
||
4. Test your contribution | ||
```bash | ||
python -m pytest | ||
``` | ||
PS: Please add test cases to the features you are developing so that over time, we can capture any lapse in functionality changes. | ||
|
||
5. Push your contribution to GitHub | ||
|
||
5. To submit your contribution | ||
+ [Push](https://github.com/git-guides/git-push) your changes back to your fork on GitHub | ||
[Push](https://github.com/git-guides/git-push) your changes back to your fork on GitHub | ||
|
||
```shell | ||
git push origin update-build-library-dependencies | ||
``` | ||
|
||
6. Raise a Pull Request to merge your contribution into the a Schemachange Release | ||
+ Go to GitHub. The new branch will show up with a | ||
green [Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#initiating-the-pull-request) | ||
button. Make sure the title and message are clear, concise and self-explanatory. Then click the button to submit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters