summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-13 12:28:20 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-13 12:28:20 -0800
commit2888327e9edca05d50bc6d71bf68166ee0fabcfe (patch)
tree9d7da3c09a4fa52af197fc6786e8f37659e45d90 /python
parent7d17e7cac4fee2661fec6474a8aade3b38ef5448 (diff)
downloadfatcat-2888327e9edca05d50bc6d71bf68166ee0fabcfe.tar.gz
fatcat-2888327e9edca05d50bc6d71bf68166ee0fabcfe.zip
more python client library tomfoolery
Diffstat (limited to 'python')
-rw-r--r--python/.gitignore1
-rw-r--r--python/README.md2
l---------python/README_client.md1
-rwxr-xr-xpython/codegen_python_client.sh6
-rw-r--r--python/conftest.py3
-rw-r--r--python/fatcat_client/README.md (renamed from python/README_codegen.md)0
-rw-r--r--python/pytest.ini2
-rw-r--r--python/setup.py10
-rw-r--r--python/tox.ini8
9 files changed, 25 insertions, 8 deletions
diff --git a/python/.gitignore b/python/.gitignore
index 286019ee..e2dae299 100644
--- a/python/.gitignore
+++ b/python/.gitignore
@@ -1,5 +1,6 @@
codegen-out/
build/
+dist/
*.egg-info
*.json.gz
!.coveragerc
diff --git a/python/README.md b/python/README.md
index 9ba6b990..8f252512 100644
--- a/python/README.md
+++ b/python/README.md
@@ -17,7 +17,7 @@ server on the same machine by default), use:
An auto-generated python client library for the fatcat API lives under
`./fatcat_client`. It includes entity model objects and functions to call all
-API endpoints; see `./README_codegen.md` for details.
+API endpoints; see `./README_client.md` for details.
To re-generate swagger-codegen python client library (requires docker installed
locally):
diff --git a/python/README_client.md b/python/README_client.md
new file mode 120000
index 00000000..192bd0de
--- /dev/null
+++ b/python/README_client.md
@@ -0,0 +1 @@
+fatcat_client/README.md \ No newline at end of file
diff --git a/python/codegen_python_client.sh b/python/codegen_python_client.sh
index 3344c214..7cc7aa63 100755
--- a/python/codegen_python_client.sh
+++ b/python/codegen_python_client.sh
@@ -22,6 +22,6 @@ mkdir -p fatcat_client
mkdir -p tests/codegen_tests
cp -r $OUTPUT/fatcat_client/* fatcat_client
cp -r $OUTPUT/test/* tests/codegen_tests
-cp $OUTPUT/README.md README_codegen.md
-# safer than 'rm -rf $OUTPUT'
-mv $OUTPUT /tmp
+cp $OUTPUT/README.md fatcat_client/README.md
+# ooo, this makes me nervous
+rm -rf $OUTPUT
diff --git a/python/conftest.py b/python/conftest.py
new file mode 100644
index 00000000..aad02e76
--- /dev/null
+++ b/python/conftest.py
@@ -0,0 +1,3 @@
+import sys
+
+collect_ignore = ["setup.py"]
diff --git a/python/README_codegen.md b/python/fatcat_client/README.md
index 0d072dde..0d072dde 100644
--- a/python/README_codegen.md
+++ b/python/fatcat_client/README.md
diff --git a/python/pytest.ini b/python/pytest.ini
index 0a5e9216..afdebabc 100644
--- a/python/pytest.ini
+++ b/python/pytest.ini
@@ -1,6 +1,8 @@
[pytest]
+ignore = setup.py
+
# allow imports from files in current directory
python_paths = .
diff --git a/python/setup.py b/python/setup.py
index 1e0ee7fb..00425b4a 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -47,7 +47,7 @@ here = os.path.abspath(os.path.dirname(__file__))
# Import the README and use it as the long-description.
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
try:
- with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
+ with io.open(os.path.join(here, 'fatcat_client/README.md'), encoding='utf-8') as f:
long_description = '\n' + f.read()
except FileNotFoundError:
long_description = DESCRIPTION
@@ -104,7 +104,7 @@ setup(
version=about['__version__'],
description=DESCRIPTION,
long_description=long_description,
- #long_description_content_type='text/markdown',
+ long_description_content_type='text/markdown',
keywords=["Swagger", "fatcat"],
author=AUTHOR,
author_email=EMAIL,
@@ -124,9 +124,11 @@ setup(
# Trove classifiers
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
#'License :: OSI Approved :: MIT License',
+ 'Development Status :: 3 - Alpha',
+ 'Intended Audience :: Developers',
'Programming Language :: Python',
- #'Programming Language :: Python :: 3',
- #'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.5',
#'Programming Language :: Python :: Implementation :: CPython',
#'Programming Language :: Python :: Implementation :: PyPy'
],
diff --git a/python/tox.ini b/python/tox.ini
new file mode 100644
index 00000000..d4fc1d9d
--- /dev/null
+++ b/python/tox.ini
@@ -0,0 +1,8 @@
+[tox]
+envlist = py35
+
+[testenv]
+deps = pipenv
+commands =
+ pipenv install --dev
+ pipenv run pytest