forked from cuenca-mx/cuenca-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cc02f66
Showing
10 changed files
with
224 additions
and
0 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,120 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# pycharm | ||
.idea/ | ||
|
||
# visual studio code | ||
.vscode/ | ||
|
||
# environment variables | ||
.env | ||
|
||
# envrc | ||
.envrc | ||
|
||
# others | ||
.DS_Store | ||
|
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,41 @@ | ||
SHELL := bash | ||
PATH := ./venv/bin:${PATH} | ||
PYTHON=python3.7 | ||
PROJECT=cuenca | ||
isort = isort -rc -ac $(PROJECT) tests setup.py | ||
black = black -S -l 79 --target-version py37 $(PROJECT) tests setup.py | ||
|
||
|
||
all: test | ||
|
||
venv: | ||
$(PYTHON) -m venv --prompt $(PROJECT) venv | ||
pip install -qU pip | ||
|
||
install-test: | ||
pip install -q .[test] | ||
|
||
test: clean install-test lint | ||
python setup.py test | ||
|
||
format: | ||
$(isort) | ||
$(black) | ||
|
||
lint: | ||
flake8 $(PROJECT) tests setup.py | ||
$(isort) --check-only | ||
$(black) --check | ||
|
||
clean: | ||
find . -name '*.pyc' -exec rm -f {} + | ||
find . -name '*.pyo' -exec rm -f {} + | ||
find . -name '*~' -exec rm -f {} + | ||
rm -rf build dist $(PROJECT).egg-info | ||
|
||
release: clean | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* | ||
|
||
|
||
.PHONY: all install-test test format lint clean release |
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 @@ | ||
cuenca: python client library |
Empty file.
Empty file.
Empty file.
Empty file.
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 @@ | ||
__version__ = '0.0.1dev0' |
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,15 @@ | ||
[aliases] | ||
test=pytest | ||
|
||
[tool:pytest] | ||
addopts = -p no:warnings -v --cov=cuenca | ||
|
||
[flake8] | ||
inline-quotes = ' | ||
multiline-quotes = """ | ||
[isort] | ||
multi_line_output=3 | ||
include_trailing_comma=True | ||
force_grid_wrap=0 | ||
combine_as_imports=True |
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,46 @@ | ||
from importlib.machinery import SourceFileLoader | ||
|
||
from setuptools import find_packages, setup | ||
|
||
version = SourceFileLoader('version', 'cuenca/version.py').load_module() | ||
|
||
test_requires = [ | ||
'pytest', | ||
'pytest-vcr', | ||
'pytest-cov', | ||
'black', | ||
'isort[pipfile]', | ||
'flake8', | ||
] | ||
|
||
with open('README.md', 'r') as f: | ||
long_description = f.read() | ||
|
||
|
||
setup( | ||
name='cuenca', | ||
version=version.__version__, | ||
author='Cuenca', | ||
author_email='[email protected]', | ||
description='Cuenca API Client', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
url='https://github.com/cuenca-mx/cuenca-python', | ||
packages=find_packages(), | ||
python_requires='>=3.6', | ||
install_requires=[ | ||
'requests>=2.21.0,<2.22.0', | ||
'iso8601>=0.1.12,<0.2.0', | ||
'dataclasses>=0.6;python_version<"3.7"', | ||
], | ||
setup_requires=['pytest-runner'], | ||
tests_require=test_requires, | ||
extras_require=dict(test=test_requires), | ||
classifiers=[ | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
], | ||
) |