Skip to content

Commit 0553eef

Browse files
committed
Merge pull request #60 in CATS/pyclowder2 from pypi to develop
* commit '6b14c9726e19250e86e116094775d7741e88ad36': use setup.py when creating dockerfile, requirements for editor/testing Fixed build errors, updated python packages Modify markup to render description.rst in PyPI. Add missing MANIFEST.in file. Change package description (it was for terrautils). More whitespace. More whitespace cleanup. Add Rob Kooper has author within setup.py. Fix bugs with DatasetApi class. Add basic metadata to setup.py and create new description.rst file. Add standard .gitignore and .dockerignore files.
2 parents 5e12f08 + 6b14c97 commit 0553eef

File tree

8 files changed

+202
-19
lines changed

8 files changed

+202
-19
lines changed

.dockerignore

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
sample-extractors
2-
docker-compose.yml
3-
.idea
1+
.dockerignore
2+
Dockerfile
3+
db.sqlite3
4+
**/__pycache__
5+
*.pyc
6+
*.pyo
7+
*.pyd
8+
.Python
9+
env
10+
pip-log.txt
11+
pip-delete-this-directory.txt
12+
.tox
13+
.coverage
14+
.coverage.*
15+
.cache
16+
coverage.xml
17+
*,cover
18+
*.log
419
.git

.gitignore

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

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ RUN apt-get -q -q update && apt-get install -y --no-install-recommends \
1818

1919
# instal pyclowder2
2020
COPY pyclowder /tmp/pyclowder/pyclowder
21-
COPY setup.py requirements.txt /tmp/pyclowder/
21+
COPY setup.py description.rst /tmp/pyclowder/
2222

23-
RUN pip install --upgrade -r /tmp/pyclowder/requirements.txt \
24-
&& pip install --upgrade /tmp/pyclowder \
23+
RUN pip install --upgrade /tmp/pyclowder \
2524
&& rm -rf /tmp/pyclowder
2625

2726
# change folder

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include description.rst README.md

description.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
This package provides standard functions for interacting with the
2+
Clowder open source data management system. Clowder is designed
3+
to allow researchers to build customized catalogs in the clouds
4+
to help you manage research data.
5+
6+
Installation
7+
------------
8+
9+
The easiest way install pyclowder is using pip and pulling from PyPI.
10+
Use the following command to install::
11+
12+
pip install pyclowder
13+
14+
Because this system is still under rapid development, you may want to
15+
install by cloning the repo using the following commands::
16+
17+
git clone https://opensource.ncsa.illinois.edu/bitbucket/scm/cats/pyclowder2.git
18+
cd pyclowder2
19+
pip install -r requirements.txt
20+
python setup.py install
21+
22+
Or you can install directly from NCSA's Bitbucket::
23+
24+
pip install -r https://opensource.ncsa.illinois.edu/bitbucket/projects/CATS/repos/pyclowder2/raw/requirements.txt git+https://opensource.ncsa.illinois.edu/bitbucket/scm/cats/pyclowder2.git
25+

pyclowder/datasets.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,14 @@ class DatasetsApi(object):
283283
API to manage the REST CRUD endpoints for datasets.
284284
"""
285285

286-
def __init__(self, client=None, host=None, key=None, username=None, password=None):
286+
def __init__(self, client=None, host=None, key=None,
287+
username=None, password=None):
287288
"""Set client if provided otherwise create new one"""
288289
if client:
289-
self.api_client = client
290+
self.client = client
290291
else:
291-
self.client = ClowderClient(host=host, key=key, username=username, password=password)
292+
self.client = ClowderClient(host=host, key=key,
293+
username=username, password=password)
292294

293295
def datasets_get(self):
294296
"""
@@ -299,7 +301,7 @@ def datasets_get(self):
299301
"""
300302
logging.debug("Getting all datasets")
301303
try:
302-
return self.client.get("/datasets/")
304+
return self.client.get("/datasets")
303305
except Exception as e:
304306
logging.error("Error retrieving dataset list: %s", e.message)
305307

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
enum34==1.1.6
2-
pika==0.10.0
3-
PyYAML==3.11
4-
requests==2.10.0
2+
pika==0.11.2
3+
PyYAML==3.12
4+
requests==2.18.4
55
wheel==0.24.0
6+
urllib3==1.22
67
pytest==3.0.3
78
pytest-pep8==1.0.6
8-
urllib3==1.14

setup.py

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,42 @@
1-
from distutils.core import setup
1+
from setuptools import setup, find_packages
2+
3+
4+
def description():
5+
"""Return description in Restructure Text format."""
6+
7+
with open('description.rst') as f:
8+
return f.read()
9+
210

311
setup(name='pyclowder',
4-
version='2.0.0',
5-
packages=['pyclowder'],
12+
version='2.0.2',
13+
packages=find_packages(),
14+
description='Python SDK for the Clowder Data Management System',
15+
long_description=description(),
16+
author='Rob Kooper',
17+
author_email='[email protected]',
18+
19+
url='https://clowder.ncsa.illinois.edu',
20+
project_urls={
21+
'Source': 'https://opensource.ncsa.illinois.edu/bitbucket/scm/cats/pyclowder2.git',
22+
},
23+
24+
license='BSD',
25+
classifiers=[
26+
'Development Status :: 4 - Beta',
27+
'Intended Audience :: Science/Research',
28+
'License :: OSI Approved :: BSD License',
29+
'Programming Language :: Python :: 2.7'
30+
],
31+
keywords=['clowder', 'data management system'],
32+
33+
install_requires=[
34+
'enum34==1.1.6',
35+
'pika==0.11.2',
36+
'PyYAML==3.12',
37+
'requests==2.18.4',
38+
],
39+
40+
include_package_data=True,
41+
zip_safe=True,
642
)

0 commit comments

Comments
 (0)