Skip to content

Commit 2c137f7

Browse files
authored
Update CONTRIBUTING.md (#1005)
Closes #850
1 parent 34b51f2 commit 2c137f7

File tree

1 file changed

+10
-21
lines changed

1 file changed

+10
-21
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -214,46 +214,36 @@ To begin, run `make dev` to install [Hatch](https://github.com/pypa/hatch), crea
214214
make dev
215215
```
216216

217+
Configure your IDE to use `.venv/bin/python` from the virtual environment when developing the project:
218+
![IDE Setup](docs/hatch-intellij.gif)
219+
220+
217221
Verify installation with
218222
```shell
219223
make test
220224
```
221225

222-
To ensure your integrated development environment (IDE) uses the newly created virtual environment, you can retrieve the Python path with this command:
223-
```shell
224-
hatch run python -c "import sys; print(sys.executable)"
225-
```
226226

227-
Configure your IDE to use this Python path so that you work within the virtual environment when developing the project:
228-
![IDE Setup](docs/hatch-intellij.gif)
229-
230-
Before every commit, apply the consistent formatting of the code, as we want our codebase look consistent:
227+
Before every commit, apply the consistent styleguide and formatting of the code, as we want our codebase to look consistent. Consult the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html) if you have any doubts. Make sure to run the tests.
231228
```shell
232-
make fmt
233-
```
234-
235-
Before every commit, run automated bug detector (`make lint`) and unit tests (`make test`) to ensure that automated
236-
pull request checks do pass, before your code is reviewed by others:
237-
```shell
238-
make lint test
229+
make fmt test
239230
```
240231

241232
## First contribution
242233

243234
Here are the example steps to submit your first contribution:
244235

245-
1. Make a Fork from ucx repo (if you really want to contribute)
236+
1. [Make a Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) from the repo
246237
2. `git clone`
247238
3. `git checkout main` (or `gcm` if you're using [ohmyzsh](https://ohmyz.sh/)).
248239
4. `git pull` (or `gl` if you're using [ohmyzsh](https://ohmyz.sh/)).
249240
5. `git checkout -b FEATURENAME` (or `gcb FEATURENAME` if you're using [ohmyzsh](https://ohmyz.sh/)).
250241
6. .. do the work
251242
7. `make fmt`
252-
8. `make lint`
253243
9. .. fix if any
254244
10. `make test`
255245
11. .. fix if any
256-
12. `git commit -a`. Make sure to enter meaningful commit message title.
246+
12. `git commit -a`. Make sure to enter a meaningful commit message title.
257247
13. `git push origin FEATURENAME`
258248
14. Go to GitHub UI and create PR. Alternatively, `gh pr create` (if you have [GitHub CLI](https://cli.github.com/) installed).
259249
Use a meaningful pull request title because it'll appear in the release notes. Use `Resolves #NUMBER` in pull
@@ -270,7 +260,7 @@ If you encounter any package dependency errors after `git pull`, run `make clean
270260
Sometimes, when dependencies are updated via `dependabot` for example, the environment may report the following error:
271261

272262
```sh
273-
$ hatch run unit:test-cov-report
263+
...
274264
ERROR: Cannot install databricks-labs-ucx[test]==0.0.3 and databricks-sdk~=0.8.0 because these package versions have conflicting dependencies.
275265
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
276266
```
@@ -298,8 +288,7 @@ $ hatch env show
298288
│ │ │ ruff>=0.0.243 │ │
299289
└─────────────┴─────────┴────────────────────────────────┴─────────────────┘
300290

301-
$ hatch env remove unit
302-
$ hatch run unit:test-cov-report
291+
$ make clean dev test
303292
========================================================================================== test session starts ===========================================================================================
304293
platform darwin -- Python 3.11.4, pytest-7.4.1, pluggy-1.3.0 -- /Users/lars.george/Library/Application Support/hatch/env/virtual/databricks-labs-ucx/H6b8Oom-/unit/bin/python
305294
cachedir: .pytest_cache

0 commit comments

Comments
 (0)