-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from micktwomey/go-1.0.0
Release 1.0.0-alpha.0
- Loading branch information
Showing
20 changed files
with
1,288 additions
and
384 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,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
charset = utf-8 | ||
insert_final_newline = true | ||
|
||
[{*.yaml,*.yml}] | ||
indent_size = 2 |
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,19 @@ | ||
#shellcheck shell=bash | ||
|
||
layout_poetry() { | ||
if [[ ! -f pyproject.toml ]]; then | ||
log_error 'No pyproject.toml found. Use "poetry new" or "poetry init" to create one first.' | ||
exit 2 | ||
fi | ||
|
||
local PYTHON | ||
PYTHON=$(poetry run which python) | ||
local VENV | ||
VENV=$(dirname "${PYTHON}") | ||
VIRTUAL_ENV=$(echo "$VENV" | rev | cut -d'/' -f2- | rev) | ||
export VIRTUAL_ENV | ||
export POETRY_ACTIVE=1 | ||
PATH_add "$VENV" | ||
} | ||
|
||
layout poetry |
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,67 +1,42 @@ | ||
# Build a matrix of versions using tox support from https://github.com/ymyzk/tox-gh-actions | ||
name: Python build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 8 | ||
matrix: | ||
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
# python-version: [3.6, 3.7, 3.8, 3.9, pypy3] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Load pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
- name: Install nox | ||
run: python -m pip install --upgrade nox | ||
- name: nox test | ||
run: nox --python ${{ matrix.python-version }} --session test | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Load pip cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('dev-requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: pip install -r dev-requirements.txt | ||
- name: Lint with mypy | ||
run: mypy --ignore-missing-imports -p iso8601 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
- name: Install nox | ||
run: python -m pip install --upgrade nox | ||
- name: nox lint | ||
run: nox --session lint |
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 |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
__pycache__ | ||
build | ||
dist | ||
.vscode | ||
.hypothesis |
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,23 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
# To update: run `pre-commit autoupdate` | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.9.2 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 21.6b0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.910 | ||
hooks: | ||
- id: mypy |
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 @@ | ||
python 3.8.5 2.7.18 3.7.9 3.6.12 3.5.9 | ||
python 3.9.6 3.10.0b3 3.8.7 3.7.9 3.6.12 |
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 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.