Skip to content

Commit a381e9f

Browse files
authored
Bootstrap (#1)
1 parent c6b1e09 commit a381e9f

File tree

20 files changed

+818
-0
lines changed

20 files changed

+818
-0
lines changed

.circleci/config.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
version: 2.1
2+
3+
orbs:
4+
codecov: codecov/codecov@3.0.0
5+
6+
jobs:
7+
build:
8+
docker:
9+
- image: cimg/python:3.10.0
10+
environment:
11+
PIPENV_VENV_IN_PROJECT: true
12+
resource_class: medium
13+
steps:
14+
- checkout
15+
- restore_cache:
16+
keys:
17+
- pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
18+
- pipenv-{{ .Branch }}-
19+
- pipenv-
20+
- run: pipenv sync --dev
21+
- save_cache:
22+
key: pipenv-{{ .Branch }}-{{ checksum "Pipfile.lock" }}
23+
paths:
24+
- .venv
25+
- run: pipenv run ./lint.sh
26+
- run: pipenv run pytest
27+
- codecov/upload:
28+
file: coverage.xml
29+
- run: pipenv run ./build.sh
30+
- run: pip install dist/*
31+
- run: if [[ -z "${CIRCLE_TAG}" ]]; then circleci-agent step halt; fi
32+
- run: pipenv run twine upload dist/*
33+
34+
workflows:
35+
default:
36+
jobs:
37+
- build:
38+
filters:
39+
branches:
40+
only: /.*/
41+
tags:
42+
only: /.*/

.flake8

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
exclude = .venv,dist
3+
ignore = E501, W503
4+
max-line-length = 88

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.coverage
2+
changedifferently.egg-info
3+
coverage.xml
4+
dist
5+
htmlcov

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cSpell.words": [
3+
"changedifferently"
4+
]
5+
}

.yamllint.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
extends: default
2+
3+
ignore: |
4+
.venv
5+
6+
rules:
7+
document-start: disable
8+
line-length:
9+
max: 88

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include changedifferently/version/VERSION

Pipfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
8+
[dev-packages]
9+
black = "==21.9b0"
10+
flake8 = "*"
11+
isort = "*"
12+
mypy = "*"
13+
pytest = "*"
14+
pytest-cov = "*"
15+
twine = "*"
16+
shellcheck-py = "*"
17+
yamllint = "*"
18+
19+
[requires]
20+
python_version = "3.10"

Pipfile.lock

Lines changed: 611 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/env bash
2+
3+
set -euo pipefail
4+
5+
if [[ -n ${1:-} ]]; then
6+
version=${1}
7+
elif [[ -n ${CIRCLE_TAG:-} ]]; then
8+
version=${CIRCLE_TAG}
9+
else
10+
version="-1.-1.-1"
11+
fi
12+
13+
echo "${version}" > changedifferently/version/VERSION
14+
rm -rf dist
15+
python setup.py bdist_wheel
16+
rm -rf build

changedifferently/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)