Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
matin committed Mar 19, 2020
0 parents commit cc02f66
Show file tree
Hide file tree
Showing 10 changed files with 224 additions and 0 deletions.
120 changes: 120 additions & 0 deletions .gitignore
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

41 changes: 41 additions & 0 deletions Makefile
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cuenca: python client library
Empty file added cuenca/__init__.py
Empty file.
Empty file added cuenca/client.py
Empty file.
Empty file added cuenca/py.typed
Empty file.
Empty file.
1 change: 1 addition & 0 deletions cuenca/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.0.1dev0'
15 changes: 15 additions & 0 deletions setup.cfg
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
46 changes: 46 additions & 0 deletions setup.py
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',
],
)

0 comments on commit cc02f66

Please sign in to comment.