-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump version, merge pull request #13 from casperdcl/devel
- Loading branch information
Showing
26 changed files
with
455 additions
and
350 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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
[run] | ||
branch = True | ||
include = argopt/* | ||
omit = | ||
argopt/tests/* | ||
argopt/_docopt.py | ||
relative_files = True | ||
[report] | ||
show_missing = True |
Validating CODEOWNERS rules …
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,3 @@ | ||
# Require maintainer's :+1: for changes to the .github/ repo-config files | ||
# mainly due to https://github.com/probot/settings privilege escalation | ||
.github/* @github/pages |
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,2 @@ | ||
github: casperdcl | ||
custom: https://caspersci.uk.to/donate |
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,50 @@ | ||
name: Comment Bot | ||
on: | ||
issue_comment: | ||
types: [created] | ||
pull_request_review_comment: | ||
types: [created] | ||
jobs: | ||
tag: # /tag <tagname> <commit> | ||
if: startsWith(github.event.comment.body, '/tag ') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: React Seen | ||
uses: actions/github-script@v2 | ||
with: | ||
script: | | ||
const perm = await github.repos.getCollaboratorPermissionLevel({ | ||
owner: context.repo.owner, repo: context.repo.repo, | ||
username: context.payload.comment.user.login}) | ||
post = (context.eventName == "issue_comment" | ||
? github.reactions.createForIssueComment | ||
: github.reactions.createForPullRequestReviewComment) | ||
if (!["admin", "write"].includes(perm.data.permission)){ | ||
post({ | ||
owner: context.repo.owner, repo: context.repo.repo, | ||
comment_id: context.payload.comment.id, content: "laugh"}) | ||
throw "Permission denied for user " + context.payload.comment.user.login | ||
} | ||
post({ | ||
owner: context.repo.owner, repo: context.repo.repo, | ||
comment_id: context.payload.comment.id, content: "eyes"}) | ||
- name: Tag Commit | ||
run: | | ||
git clone https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} repo | ||
git -C repo tag $(echo "$BODY" | awk '{print $2" "$3}') | ||
git -C repo push --tags | ||
rm -rf repo | ||
env: | ||
BODY: ${{ github.event.comment.body }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
- name: React Success | ||
uses: actions/github-script@v2 | ||
with: | ||
script: | | ||
post = (context.eventName == "issue_comment" | ||
? github.reactions.createForIssueComment | ||
: github.reactions.createForPullRequestReviewComment) | ||
post({ | ||
owner: context.repo.owner, repo: context.repo.repo, | ||
comment_id: context.payload.comment.id, content: "rocket"}) |
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,136 @@ | ||
name: Test | ||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '3 2 1 * *' # M H d m w (monthly at 2:03) | ||
jobs: | ||
check: | ||
if: github.event_name != 'pull_request' || github.head_ref != 'devel' | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: set PYSHA | ||
run: echo "PYSHA=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PYSHA }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
- name: Test | ||
run: | | ||
pip install -U tox | ||
tox -e setup.py | ||
- name: Self install | ||
run: pip install -U .[dev] | ||
- name: Build | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine check dist/* | ||
- uses: reviewdog/action-setup@v1 | ||
- if: github.event_name != 'schedule' | ||
name: flake8 | ||
run: | | ||
pre-commit run -a flake8 | reviewdog -f=pep8 -name=Format -tee -reporter=github-check -filter-mode nofilter | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Lint | ||
run: pre-commit run -a --show-diff-on-failure | ||
test: | ||
if: github.event_name != 'pull_request' || github.head_ref != 'devel' | ||
strategy: | ||
matrix: | ||
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy3] | ||
name: Python ${{ matrix.python }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install | ||
run: pip install -U tox | ||
- name: Test | ||
run: | | ||
if [[ "$PYVER" == py* ]]; then | ||
tox -e $PYVER # basic:pypy | ||
else | ||
tox -e py${PYVER/./} # normal | ||
fi | ||
env: | ||
PYVER: ${{ matrix.python }} | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Coveralls Parallel | ||
uses: AndreMiras/coveralls-python-action@develop | ||
with: | ||
parallel: true | ||
finish: | ||
if: github.event_name != 'pull_request' || github.head_ref != 'devel' | ||
name: Coverage | ||
continue-on-error: ${{ github.event_name != 'push' }} | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Coveralls Finished | ||
uses: AndreMiras/coveralls-python-action@develop | ||
with: | ||
parallel-finished: true | ||
deploy: | ||
if: github.event_name != 'pull_request' || github.head_ref != 'devel' | ||
name: Deploy | ||
needs: [check, test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
uses: casperdcl/deploy-pypi@v1 | ||
with: | ||
build: true | ||
gpg_key: ${{ secrets.GPG_KEY }} | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
skip_existing: true | ||
- id: collect_assets | ||
name: Collect assets | ||
run: | | ||
echo "::set-output name=asset_path::$(ls dist/*.whl)" | ||
echo "::set-output name=asset_name::$(basename dist/*.whl)" | ||
echo "::set-output name=asset_path_sig::$(ls dist/*.whl.asc 2>/dev/null)" | ||
echo "::set-output name=asset_name_sig::$(basename dist/*.whl.asc 2>/dev/null)" | ||
git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md | ||
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: argopt ${{ github.ref }} stable | ||
body_path: _CHANGES.md | ||
draft: true | ||
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.collect_assets.outputs.asset_path }} | ||
asset_name: ${{ steps.collect_assets.outputs.asset_name }} | ||
asset_content_type: application/zip | ||
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ${{ steps.collect_assets.outputs.asset_path_sig }} | ||
asset_name: ${{ steps.collect_assets.outputs.asset_name_sig }} | ||
asset_content_type: text/plain |
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,9 +1,11 @@ | ||
*.py[co] | ||
# build | ||
argopt.egg-info/ | ||
build/ | ||
dist/ | ||
/argopt/_dist_ver.py | ||
/.eggs/ | ||
/*.egg-info | ||
/build/ | ||
/dist/ | ||
# test | ||
.tox/ | ||
.coverage | ||
__pycache__ | ||
__pycache__/ |
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,28 @@ | ||
default_language_version: | ||
python: python3 | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.3.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
- hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-bugbear | ||
- flake8-comprehensions | ||
- flake8-debugger | ||
- flake8-string-format | ||
repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
- hooks: | ||
- id: isort | ||
repo: https://github.com/timothycrosley/isort | ||
rev: 5.6.4 |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.