Skip to content

Commit d7e5831

Browse files
committed
feat: initial commit with configurations
1 parent 611a404 commit d7e5831

8 files changed

Lines changed: 89 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
131+
.vscode
132+
poetry.lock

dam/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.1.0"

pyproject.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[tool.poetry]
2+
name = "dam"
3+
version = "0.1.0"
4+
description = "Python Stream Processing toolkit"
5+
authors = [
6+
"Marcos Schroh <schrohm@gmail.com>",
7+
"Santiago Fraire Willemoës <santiwilly@gmail.com>"
8+
]
9+
readme = "README.md"
10+
keywords = ["stream", "processing", "streaming", "async"]
11+
12+
[tool.poetry.dependencies]
13+
python = "^3.7"
14+
15+
[tool.poetry.dev-dependencies]
16+
pytest = "^5.3.5"
17+
black = "^19.10b0"
18+
flake8 = "^3.7.9"
19+
isort = "^4.3.21"
20+
pytest-cov = "^2.8.1"
21+
mypy = "^0.761"
22+
23+
[build-system]
24+
requires = ["poetry>=0.12"]
25+
build-backend = "poetry.masonry.api"

scripts/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Development Scripts
2+
3+
- `scripts/test` - Run the test suite.
4+
- `scripts/lint` - Run the code linting.
5+
- `scripts/clean` - Remove annoying files and folders.
6+
7+
Styled after GitHub's ["Scripts to Rule Them All"](https://github.com/github/scripts-to-rule-them-all).

scripts/clean

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
if [ -d 'dist' ] ; then
4+
rm -rf dist
5+
fi
6+
7+
if [ -d 'site' ] ; then
8+
rm -rf site
9+
fi
10+
11+
if [ -d 'htmlcov' ] ; then
12+
rm -rf htmlcov
13+
fi
14+
15+
if [ -d 'dam.egg-info' ] ; then
16+
rm -rf dam.egg-info
17+
fi
18+
19+
# delete python cache
20+
find . -iname '*.pyc' -delete
21+
find . -iname '__pycache__' -delete

scripts/lint

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh -e
2+
3+
export PREFIX=""
4+
if [ -d 'venv' ] ; then
5+
export PREFIX="venv/bin/"
6+
elif [ -d '.venv' ] ; then
7+
export PREFIX=".venv/bin/"
8+
fi
9+
10+
set -x
11+
12+
${PREFIX}isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --apply dam tests
13+
${PREFIX}black dam tests

scripts/test

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh -e
2+
3+
export PREFIX=""
4+
if [ -d 'venv' ] ; then
5+
export PREFIX="venv/bin/"
6+
elif [ -d '.venv' ] ; then
7+
export PREFIX=".venv/bin/"
8+
fi
9+
10+
set -x
11+
12+
${PREFIX}pytest --cov-report term-missing --cov-report=xml:coverage.xml --cov=dam tests/
13+
${PREFIX}black dam tests --check
14+
${PREFIX}flake8 --max-line-length=88 dam/ tests/

tests/test_version.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from dam import __version__
2+
3+
4+
def test_version():
5+
assert __version__ == "0.1.0"

0 commit comments

Comments
 (0)