-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add template updates to this project. (#148)
* Add template updates to this project. Incorporate learnings for project structuring from template.py. * Fix pre-commit failures. * More pre-commit fixes. * More pre-commit fixes.
- Loading branch information
Showing
47 changed files
with
644 additions
and
442 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
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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,20 @@ | ||
# Dependency Review Action | ||
# | ||
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. | ||
# | ||
# Source repository: https://github.com/actions/dependency-review-action | ||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement | ||
name: 'Dependency Review' | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v3 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v2 |
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 @@ | ||
# This workflow runs poetry against the repository. | ||
# | ||
# You can adjust the behavior by modifying this file. | ||
name: Run poetry | ||
|
||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
poetry: | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.7" # EOL 2023-06-27 | ||
- "3.8" # EOL 2024-10 | ||
- "3.9" # EOL 2025-10 | ||
- "3.10" # EOL 2026-10 | ||
- "3.11" # EOL 2027-10 | ||
experimental: [false] | ||
include: | ||
- python-version: 3.x | ||
experimental: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install poetry | ||
run: pipx install poetry | ||
- name: setup python-${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
- name: poetry build | ||
run: | | ||
poetry build | ||
tar -zvtf dist/zfs_replicate-*.tar.gz | grep zfs/replicate/ | ||
- name: poetry check | ||
run: poetry check |
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,14 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] |
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,27 +1,27 @@ | ||
--- | ||
name: pypi publish | ||
on: # yamllint disable-line | ||
release: | ||
types: [created] | ||
# This workflow runs poetry against the repository. | ||
# | ||
# You can adjust the behavior by modifying this file. | ||
name: Publish to PyPi | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.x | ||
- name: install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install poetry | ||
- name: build and publish | ||
env: | ||
PYPI_USER: ${{ secrets.PYPI_USERNAME }} | ||
PYPI_PASS: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
poetry config http-basic.pypi $PYPI_USER $PYPI_PASS | ||
poetry build | ||
poetry publish | ||
poetry: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install poetry | ||
run: pipx install poetry | ||
- name: setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
cache: poetry | ||
- name: poetry build | ||
run: poetry build | ||
- name: poetry publish | ||
run: poetry publish --username __token__ --password=${{ secrets.PYPI_API_TOKEN }} |
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,43 @@ | ||
# This workflow runs pytest against the repository. | ||
# | ||
# You can adjust the behavior by modifying this file. | ||
name: Run pytest | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.7" # EOL 2023-06-27 | ||
- "3.8" # EOL 2024-10 | ||
- "3.9" # EOL 2025-10 | ||
- "3.10" # EOL 2026-10 | ||
- "3.11" # EOL 2027-10 | ||
experimental: [false] | ||
include: | ||
- python-version: 3.x | ||
experimental: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install poetry | ||
run: pipx install poetry | ||
- name: setup python-${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
- name: poetry install | ||
run: poetry install | ||
- name: poetry run pytest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
poetry run pytest | ||
poetry run coveralls --service=github |
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
# This workflow runs scripts. | ||
# | ||
# You can adjust the behavior by modifying this file. | ||
name: Run scripts with --help | ||
|
||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
scripts: | ||
runs-on: ubuntu-latest | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.7" # EOL 2023-06-27 | ||
- "3.8" # EOL 2024-10 | ||
- "3.9" # EOL 2025-10 | ||
- "3.10" # EOL 2026-10 | ||
- "3.11" # EOL 2027-10 | ||
experimental: [false] | ||
include: | ||
- python-version: 3.x | ||
experimental: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install poetry | ||
run: pipx install poetry | ||
- name: setup python-${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
- name: poetry install | ||
run: poetry install | ||
- name: initiliase --help | ||
run: poetry run -- zfs-replicate --help |
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,27 @@ | ||
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. | ||
# | ||
# You can adjust the behavior by modifying this file. | ||
# For more information, see: | ||
# https://github.com/actions/stale | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: '18 10 * * *' | ||
|
||
jobs: | ||
stale: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/stale@v5 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: 'Stale issue message' | ||
stale-pr-message: 'Stale pull request message' | ||
stale-issue-label: 'no-issue-activity' | ||
stale-pr-label: 'no-pr-activity' |
Oops, something went wrong.