Skip to content

Commit

Permalink
Merge branch 'main' into deprecate-evolve-kw
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Apr 3, 2023
2 parents 898ee75 + f04fa4e commit 1e25f93
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
46 changes: 43 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,35 @@ You can (and should) run our test suite using [*tox*].
However, you’ll probably want a more traditional environment as well.
We highly recommend to develop using the latest Python release because we try to take advantage of modern features whenever possible.

Clone the *attrs* repository to your computer:
First [fork](https://github.com/python-attrs/attrs/fork) the repository on GitHub.

Clone the fork to your computer:

```console
$ git clone git@github.com:python-attrs/attrs.git
$ git clone git@github.com:<your-username>/attrs.git
```

Or if you prefer to use Git via HTTPS:

```console
$ git clone https://github.com/python-attrs/attrs.git
$ git clone https://github.com/<your-username>/attrs.git
```

Then add the *attrs* repository as *upstream* remote:

```console
$ git remote add -t main -m main --tags upstream https://github.com/python-attrs/attrs.git
```

The next step is to sync the upstream repository with your local copy:

```console
$ git fetch upstream
```

This is important to obtain eventually missing tags, which are needed to install the development version later on.
See [#1104](https://github.com/python-attrs/attrs/issues/1104) for more information.

Change into the newly created directory and after activating a virtual environment install an editable version of *attrs* along with its tests and docs requirements:

```console
Expand All @@ -81,6 +98,29 @@ $ make html

The built documentation can then be found in `docs/_build/html/`.

To file a pull request, create a new branch on top of the upstream repository:

```console
$ git fetch --all
$ git checkout -b my_topical_branch upstream/main
```

Make your changes, push them to your fork (the remote *origin*):

```console
$ git push -u origin
```

and publish the PR in GitHub's web interface!

Before starting to work on your next pull request, run the following command to sync your local repository with the remotes:

```console
$ git fetch --all
$ git checkout main
$ git merge
```

---

To avoid committing code that violates our style guide, we strongly advise you to install [*pre-commit*] and its hooks:
Expand Down
1 change: 1 addition & 0 deletions changelog.d/1105.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added instructions for pull request workflow to `CONTRIBUTING.md`.

0 comments on commit 1e25f93

Please sign in to comment.