-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename master and add labeler (#243)
* add CONTRIBUTING.md * add labeler and update workflow files * add labeler and update workflow files * Adjust CONTIBUTING.md text
- Loading branch information
Showing
9 changed files
with
197 additions
and
93 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,41 @@ | ||
# Contribution Guidelines | ||
|
||
Thank you for considering contributing! We welcome contributions in the form of bug reports, feature requests, code patches, or documentation improvements. | ||
|
||
Please follow these guidelines to ensure a smooth contribution process. | ||
|
||
## Bug Reports | ||
|
||
If you've found a bug, please create a bug report. Make sure to provide the following information: | ||
|
||
- **Environment Information:** (e.g., mytoyota version, Python version) | ||
- **Steps to Reproduce the Bug:** | ||
- **Expected Behavior:** | ||
- **Current Behavior:** | ||
|
||
## Feature Requests | ||
|
||
If you have an idea for a new feature, please create a feature request. Describe the desired feature and why it would be useful. | ||
|
||
## Code Contributions | ||
|
||
We welcome code contributions! If you'd like to participate in development, follow these steps: | ||
|
||
1. Fork this repository. | ||
2. Create a branch for your changes: e.g `git checkout -b feature/feature_description` or `git checkout -b bug/bug_description`. | ||
3. Develop and test your changes. | ||
4. Ensure your code complies with style guidelines: `poetry run pre-commit run --all-files`. | ||
5. Create a pull request in this repository with a clear description of the changes. | ||
|
||
### Development Requirements | ||
|
||
- Dependencies are managed with [Poetry](https://python-poetry.org/). Add new dependencies to the `pyproject.toml` file and run `poetry install`. | ||
- Style guidelines are enforced with [pre-commit](https://pre-commit.com/). Install pre-commit with `poetry run pre-commit install`. | ||
|
||
### Tests | ||
|
||
Ensure that all tests pass successfully before creating a pull request. | ||
|
||
```bash | ||
poetry run pytest | ||
``` |
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,15 +1,14 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
versioning-strategy: lockfile-only | ||
versioning-strategy: "lockfile-only" | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- "dependencies" | ||
- package-ecosystem: github-actions | ||
interval: "weekly" | ||
labels: [":robot: bot", ":game_die: dependencies"] | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
labels: | ||
- "dependencies" | ||
interval: "weekly" | ||
labels: [":robot: bot", ":game_die: dependencies"] |
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,71 @@ | ||
--- | ||
# the GitHub Action https://github.com/marketplace/actions/github-labeler. | ||
- name: ":bell: automerge" | ||
color: "8f4fbc" | ||
description: "" | ||
- name: ":robot: bot" | ||
color: "69cde9" | ||
description: "" | ||
- name: ":bug: bug" | ||
color: "b60205" | ||
description: "" | ||
- name: ":warning: breaking change" | ||
color: "b60205" | ||
description: "" | ||
- name: ":game_die: dependencies" | ||
color: "0366d6" | ||
description: "" | ||
- name: ":memo: documentation" | ||
color: "c5def5" | ||
description: "" | ||
- name: ":busts_in_silhouette: duplicate" | ||
color: "cccccc" | ||
description: "" | ||
- name: ":speech_balloon: translation" | ||
color: "b2a8a6" | ||
description: "" | ||
- name: ":wrench: enhancement" | ||
color: "0054ca" | ||
description: "" | ||
- name: ":rocket: feature" | ||
color: "0e8a16" | ||
description: "" | ||
- name: ":mega: feedback" | ||
color: "03a9f4" | ||
description: "" | ||
- name: ":clock10: future maybe" | ||
color: "fef2c0" | ||
description: "" | ||
- name: ":hatching_chick: good first issue" | ||
color: "7057ff" | ||
description: "" | ||
- name: ":pray: help wanted" | ||
color: "4caf50" | ||
description: "" | ||
- name: ":no_entry_sign: invalid" | ||
color: "e6e6e6" | ||
description: "" | ||
- name: ":mag: investigate" | ||
color: "e6625b" | ||
description: "" | ||
- name: ":thinking: needs more info" | ||
color: "795548" | ||
description: "" | ||
- name: ":pushpin: pinned" | ||
color: "28008e" | ||
description: "" | ||
- name: ":question: question" | ||
color: "3f51b5" | ||
description: "" | ||
- name: ":skull: stale" | ||
color: "237da0" | ||
description: "" | ||
- name: ":eyes: upstream" | ||
color: "fbca04" | ||
description: "" | ||
- name: ":construction_worker: WIP" | ||
color: "668000" | ||
description: "" | ||
- name: ":coffin: wontfix" | ||
color: "ffffff" | ||
description: "" |
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 |
---|---|---|
@@ -1,44 +1,34 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Build package | ||
name: "Build package" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- "v0.7" | ||
branches: ["master", "main"] | ||
pull_request: | ||
branches: | ||
- master | ||
- "v0.7" | ||
branches: ["master", "main"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
runs-on: "${{ matrix.os }}" | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest, windows-latest] | ||
os: ["macos-latest", "ubuntu-latest", "windows-latest"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
- name: "⤵️ Check out code from GitHub" | ||
uses: "actions/checkout@v4" | ||
- name: "🐍 Set up Python ${{ matrix.python-version }}" | ||
uses: "actions/setup-python@v4" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2.3.0 | ||
python-version: "${{ matrix.python-version }}" | ||
- name: "⚙️ Install Poetry" | ||
uses: "abatilo/actions-poetry@v2.3.0" | ||
with: | ||
poetry-version: 1.5.1 | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Test package building | ||
run: | | ||
poetry build | ||
- name: "⚙️ Install dependencies" | ||
run: "poetry install" | ||
- name: "🚀 Test package building" | ||
run: "poetry 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: "Manage labels" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
labeler: | ||
name: "Labeler" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "⤵️ Check out code from GitHub" | ||
uses: "actions/checkout@v4" | ||
- name: "🚀 Run Labeler" | ||
uses: "crazy-max/ghaction-github-labeler@v5" | ||
with: | ||
skip-delete: false |
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,54 +1,46 @@ | ||
name: Linting | ||
name: "Linting" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- "v0.7" | ||
branches: ["master", "main"] | ||
pull_request: | ||
|
||
jobs: | ||
pre-commit: | ||
name: Pre-commit | ||
name: "Pre-commit" | ||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
runs-on: ubuntu-latest | ||
runs-on: "ubuntu-latest" | ||
env: | ||
OS: ubuntu-latest | ||
PYTHON: ${{ matrix.python-version }} | ||
OS: "ubuntu-latest" | ||
PYTHON: "${{ matrix.python-version }}" | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
- name: "⤵️ Check out code from GitHub" | ||
uses: "actions/checkout@v4" | ||
- name: "🐍 Set up Python ${{ matrix.python-version }}" | ||
uses: "actions/setup-python@v4" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2.3.0 | ||
python-version: "${{ matrix.python-version }}" | ||
- name: "⚙️ Install Poetry" | ||
uses: "abatilo/actions-poetry@v2.3.0" | ||
with: | ||
poetry-version: 1.5.1 | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Run pre-commit on all files | ||
- name: "⚙️ Install dependencies" | ||
run: "poetry install" | ||
- name: "🚀 Run pre-commit on all files" | ||
run: | | ||
poetry run pre-commit run --all-files --show-diff-on-failure --color=always | ||
- name: Run pytest with coverage | ||
- name: "🚀 Run pytest with coverage" | ||
run: | | ||
poetry run pip install coverage | ||
poetry run coverage run -m pytest | ||
poetry run coverage xml | ||
- name: Upload Coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
- name: "⬆️ Upload Coverage to Codecov" | ||
uses: "codecov/codecov-action@v3" | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
token: "${{ secrets.CODECOV_TOKEN }}" | ||
env_vars: OS,PYTHON | ||
fail_ci_if_error: true | ||
flags: unittests | ||
flags: "unittests" | ||
verbose: true |
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,17 +1,18 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
name: Upload Python Package to PyPi | ||
name: "Upload Python Package to PyPi" | ||
|
||
on: | ||
release: | ||
types: [published] | ||
types: ["published"] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build package and publish to pypi | ||
uses: JRubics/poetry-publish@v1.17 | ||
- name: "⤵️ Check out code from GitHub" | ||
uses: "actions/checkout@v4" | ||
- name: "🚀 Build package and publish to pypi" | ||
uses: "JRubics/poetry-publish@v1.17" | ||
with: | ||
pypi_token: ${{ secrets.PYPI_PASSWORD }} | ||
pypi_token: "${{ secrets.PYPI_PASSWORD }}" |
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,17 +1,15 @@ | ||
name: Draft a release note | ||
name: "Draft a release note" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- "v0.7" | ||
branches: ["master", "main"] | ||
|
||
jobs: | ||
draft_release: | ||
name: Release Drafter | ||
runs-on: ubuntu-latest | ||
name: "Release Drafter" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Run release-drafter | ||
uses: release-drafter/release-drafter@v5 | ||
- name: "🚀 Run release-drafter" | ||
uses: "release-drafter/release-drafter@v5" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |