Skip to content

Commit 7cf2b24

Browse files
committed
README v1
1 parent 5aa0776 commit 7cf2b24

9 files changed

+543
-2
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[Makefile]
12+
indent_style = tab
13+
indent_size = 4
14+
end_of_line = lf
15+
charset = utf-8
16+
trim_trailing_whitespace = true
17+
insert_final_newline = true

.gitattributes

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Basic .gitattributes for a python repo.
2+
3+
# Source files
4+
# ============
5+
*.pxd text
6+
*.py text
7+
*.py3 text
8+
*.pyw text
9+
*.pyx text
10+
11+
# Binary files
12+
# ============
13+
*.db binary
14+
*.p binary
15+
*.pkl binary
16+
*.pyc binary
17+
*.pyd binary
18+
*.pyo binary
19+
20+
# Note: .db, .p, and .pkl files are associated
21+
# with the python modules ``pickle``, ``dbm.*``,
22+
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
23+
# (among others).

.gitignore

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
db.sqlite3
58+
59+
# Flask stuff:
60+
instance/
61+
.webassets-cache
62+
63+
# Scrapy stuff:
64+
.scrapy
65+
66+
# Sphinx documentation
67+
docs/_build/
68+
69+
# PyBuilder
70+
target/
71+
72+
# Jupyter Notebook
73+
.ipynb_checkpoints
74+
75+
# pyenv
76+
.python-version
77+
78+
# celery beat schedule file
79+
celerybeat-schedule
80+
81+
# SageMath parsed files
82+
*.sage.py
83+
84+
# Environments
85+
.env
86+
.venv
87+
env/
88+
venv/
89+
ENV/
90+
env.bak/
91+
venv.bak/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/
105+
106+
# line_profiler
107+
*.prof
108+
*.lprof
109+
110+
# memory_profiler
111+
mprofile*
112+
113+
# node deps
114+
node_modules
115+
npm*.log
116+
yarn*.log
117+

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: python
2+
python:
3+
- "2.7"
4+
- "3.6"
5+
install: make install
6+
before_install:
7+
- sudo apt-get install -y realpath
8+
- pip install -U setuptools
9+
script: make test
10+
notifications:
11+
email: false

MIT-LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2018 Jonas Grimfelt <[email protected]>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
NAME := "config2"
3+
BRANCH := $(shell git for-each-ref --format='%(objectname) %(refname:short)' refs/heads | awk "/^$$(git rev-parse HEAD)/ {print \$$2}")
4+
HASH := $(shell git rev-parse HEAD)
5+
DATETIME := $(shell date | sed 's/ /./g')
6+
7+
all: test
8+
9+
.PHONY: clean
10+
clean:
11+
CLEAR_PATTERNS='*.pyc __pycache__ build dist *.egg-info'; \
12+
for PATTERN in $$CLEAR_PATTERNS; do \
13+
echo "rm -rf \$$(find $$PWD -name $$PATTERN)"; \
14+
rm -rf $$(find $$PWD -name $$PATTERN); \
15+
done
16+
17+
.PHONY: install
18+
install:
19+
pip install -r requirements.txt
20+
21+
.PHONY: test
22+
test:
23+
python ./$(NAME)/tests
24+
25+
.PHONY: testimport
26+
testimport:
27+
pip uninstall -y $(NAME) && \
28+
pip install -U . && \
29+
python -c "import $(NAME); print('$(NAME)', $(NAME))" && \
30+
echo "OK"
31+
32+
.PHONY: build
33+
build:
34+
rm -rf ./dist && \
35+
python -m pip install --user --upgrade setuptools wheel && \
36+
python setup.py sdist bdist_wheel
37+
38+
.PHONY: dist
39+
dist: build
40+
python -m pip install --user --upgrade twine && \
41+
twine upload dist/*
42+
43+
.PHONY: dist-dev
44+
dist-dev: build
45+
python -m pip install --user --upgrade twine && \
46+
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

0 commit comments

Comments
 (0)