Skip to content

Commit

Permalink
Initial commit (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
cariad committed Nov 9, 2021
1 parent 7451d66 commit 5010638
Show file tree
Hide file tree
Showing 57 changed files with 17,477 additions and 0 deletions.
225 changes: 225 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
version: 2.1

orbs:
codecov: codecov/codecov@3.0.0

jobs:
cache:
docker:
- image: cimg/python:3.10.0
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- pipenv-{{ .Branch }}-
- pipenv-
- run: pipenv sync --dev
- save_cache:
key: pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
paths:
- .venv

lint_black:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run: pipenv run ./lint-black.sh

lint_flake8:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run: pipenv run ./lint-flake8.sh

lint_isort:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run: pipenv run ./lint-isort.sh

lint_package_types:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- restore_cache:
keys:
- mypy-package-{{ .Branch }}
- mypy-package-main
- run: pipenv run ./lint-package-types.sh
- save_cache:
key: mypy-package-{{ .Branch }}
paths:
- .mypy_cache

lint_shell:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run: pipenv run ./lint-shell.sh

lint_test_types:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- restore_cache:
keys:
- mypy-test-{{ .Branch }}
- mypy-test-main
- run: pipenv run ./lint-test-types.sh
- save_cache:
key: mypy-test-{{ .Branch }}
paths:
- .mypy_cache

lint_yaml:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run: pipenv run ./lint-yaml.sh

test:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run: pipenv run ./test.sh
- codecov/upload:
file: coverage.xml

build:
docker:
- image: cimg/python:3.10.0
environment:
resource_class: medium
steps:
- checkout
- restore_cache:
keys:
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
- run: pipenv run ./build.sh
- run: pip install dist/*
- run: if [[ -z "${CIRCLE_TAG}" ]]; then circleci-agent step halt; fi
- run: pipenv run twine upload dist/*

workflows:
default:
jobs:
- cache:
context:
- python
filters:
branches:
only: /.*/
tags:
only: /.*/
- lint_black:
context:
- python
requires:
- cache
- lint_flake8:
context:
- python
requires:
- cache
- lint_isort:
context:
- python
requires:
- cache
- lint_package_types:
context:
- python
requires:
- cache
- lint_shell:
context:
- python
requires:
- cache
- lint_test_types:
context:
- python
requires:
- cache
- lint_yaml:
context:
- python
requires:
- cache
- test:
context:
- python
filters:
branches:
only: /.*/
tags:
only: /.*/
requires:
- cache
- build:
context:
- python
filters:
branches:
only: /.*/
tags:
only: /.*/
requires:
- lint_black
- lint_flake8
- lint_isort
- lint_package_types
- lint_shell
- lint_test_types
- lint_yaml
- test
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
exclude = .venv,dist
ignore = E501, W503
max-line-length = 88
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: cariad
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
__pycache__
.coverage
.mypy_cache
coverage.xml
dist
docsrc/build
htmlcov
startifact.egg-info
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"cSpell.words": [
"furo",
"mypy",
"startifact"
],
"restructuredtext.confPath": "${workspaceFolder}/docsrc/source"
}
9 changes: 9 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: default

ignore: |
.venv
rules:
document-start: disable
line-length:
max: 88
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include startifact/VERSION
24 changes: 24 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
boto3 = "~=1.18"

[dev-packages]
black = "==21.9b0"
boto3-stubs = {extras = ["s3", "ssm"], version = "*"}
flake8 = "*"
furo = "*"
isort = "*"
mypy = "*"
pytest = "*"
pytest-cov = "*"
shellcheck-py = "*"
sphinx = "*"
twine = "*"
yamllint = "*"

[requires]
python_version = "3.10"
Loading

0 comments on commit 5010638

Please sign in to comment.