-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,042 additions
and
95 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* @pall-j |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Contributing to pysparkdt | ||
|
||
## Suggesting changes | ||
1. Create an [issue](https://github.com/datamole-ai/pysparkdt/issues) describing the change you want to make. | ||
|
||
## General workflow | ||
|
||
### Environment setup | ||
pysparkdt uses [Poetry](https://python-poetry.org/) for managing dependencies. | ||
Follow the instructions on the Poetry website to install it. | ||
We recommend [pyenv](https://github.com/pyenv/pyenv) | ||
([installer](https://github.com/pyenv/pyenv-installer)) for managing Python versions. | ||
```bash | ||
# Install Python 3.12 | ||
pyenv install 3.12 | ||
|
||
# Use pyenv's Python 3.12 for the current folder | ||
pyenv local 3.12 | ||
|
||
# Create virtual environment (install all optional dependencies) | ||
poetry install --extras all | ||
|
||
# Activate Poetry virtual environment in the current shell | ||
poetry shell | ||
``` | ||
|
||
You can also use `poetry run` to run commands in the virtual environment without activating it in the current shell (via `poetry shell`). | ||
|
||
|
||
### Test the newly implemented changes | ||
Create unit tests by creating a Python script in the folder `tests` prefixed with `test_`. | ||
The script should contain functions also prefixed with `test_` that make assertions. | ||
See the `tests` folder for reference. | ||
|
||
## Pull Requests & Git | ||
|
||
* Split your work into separate and atomic pull requests. Put any | ||
non-obvious reasoning behind any change to the pull request description. | ||
Separate “preparatory” changes and modifications from new features & | ||
improvements. | ||
* The pull requests are squashed when merged. The PR title is used as the commit title. | ||
The PR description is used as the commit description. | ||
* Use conventional commit messages in the PR title and description. | ||
See [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). | ||
Usage of conventional commit PR titles and descriptions is enforced by the CI pipeline. | ||
* Prefer adding new commits over amending existing ones during the review process. | ||
The latter makes it harder to review changes and track down modifications. | ||
|
||
|
||
## Code style | ||
|
||
* The line length is limited to 79 characters in Python code, | ||
except if it would make the code less readable. | ||
* `ruff` is used for formatting and linting Python code. | ||
The following commands can be used to properly format the code and check | ||
for linting errors with automatic fixing: | ||
```bash | ||
poetry run ruff format . | ||
poetry run ruff check . --fix | ||
``` | ||
The following commands can be used to check if the code is properly | ||
formatted and check for linting errors: | ||
```bash | ||
poetry run ruff format --check . | ||
poetry run ruff check . | ||
``` | ||
|
||
All of the above code style requirements are enforced by the CI pipeline. |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2024 Datamole, s.r.o. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.