-
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
1 parent
655edf2
commit 9d65f24
Showing
14 changed files
with
313 additions
and
177 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,33 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
publish: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.11] | ||
poetry-version: [1.4.2] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: Publish | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
poetry publish --build |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
__pycache__ | ||
.pytest_cache | ||
|
||
.ruff_cache | ||
.vscode | ||
pytest-coverage.txt |
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,48 @@ | ||
# Contributing | ||
|
||
## Development | ||
|
||
### Setting up a development environment | ||
|
||
If you don't have a local development environment, you can follow these steps to set one up. | ||
|
||
Install [poetry](https://python-poetry.org/) and [task](https://taskfile.dev/). | ||
|
||
Now, initialize the project: | ||
|
||
```bash | ||
task init | ||
``` | ||
|
||
### Running tests | ||
|
||
You can run the tests with: | ||
|
||
```bash | ||
task tests | ||
``` | ||
|
||
This will run the tests with [pytest](https://docs.pytest.org/en/latest/) and show information about the coverage. | ||
|
||
### Formatting the code | ||
|
||
To look for formatting issues: | ||
```bash | ||
task check-formatting | ||
``` | ||
|
||
To format the code, you can use the command: | ||
|
||
```bash | ||
task formatting | ||
``` | ||
|
||
### Releasing a new version | ||
|
||
To release a new version, you need to follow these steps: | ||
|
||
1. Update the version with `poetry version <version>` and commit the changes. This project follows [Semantic Versioning](http://semver.org/), so the version number should follow the format `<major>.<minor>.<patch>`. | ||
|
||
2. Create a Github release with the new version number. | ||
|
||
3. (Optional) Publish the new version to PyPI with `poetry publish --build`. |
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,22 @@ | ||
version: 3 | ||
|
||
vars: | ||
DECISIONS_DIR: docs/decisions | ||
|
||
tasks: | ||
init: | ||
desc: initializes the project | ||
cmds: | ||
- poetry install -n | ||
tests: | ||
desc: run automated tests | ||
cmds: | ||
- poetry run pytest tests | tee pytest-coverage.txt | ||
check-formatting: | ||
desc: checks formatting | ||
cmds: | ||
- poetry run ruff check . | ||
formatting: | ||
desc: formats the code | ||
cmds: | ||
- poetry run ruff format . |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
# flake8: noqa | ||
from pier_ds_utils import estimator, transformer |
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
Oops, something went wrong.