Skip to content

Commit 5d9b0c2

Browse files
looselycoupledimmesys
authored andcommitted
Fix setup.py script (#20)
* minor fix to docs * fixes/updates to setup script
1 parent 3f3ebef commit 5d9b0c2

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

DESCRIPTION.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# btrdb
2+
3+
These are BTrDB Bindings for Python allowing you painless and productive access to the Berkeley Tree Database (BTrDB). BTrDB is a time series database focusing on blazing speed with respect to univariate time series data at the nanosecond scale.
4+
5+
Please see the full documentation at: [https://btrdb.readthedocs.io/en/latest/](https://btrdb.readthedocs.io/en/latest/) particularly the quick [start guide](https://btrdb.readthedocs.io/en/latest/quick-start.html)

docs/source/index.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,24 @@ your appetite.
3434
.. code-block:: python
3535
3636
import btrdb
37+
from btrdb.utils.timez import to_nanoseconds
38+
39+
# establish connection to server
3740
conn = btrdb.connect("192.168.1.101:4410")
3841
3942
# search for streams and view metadata
4043
streams = conn.streams_in_collection("USEAST_NOC1/90807")
4144
for stream in streams:
42-
print(stream.collection(), stream.tags())
45+
print(stream.collection, stream.name, stream.tags())
4346
44-
# view raw data points
47+
# retrieve a single stream
4548
stream = conn.stream_from_uuid("07d28a44-4991-492d-b9c5-2d8cec5aa6d4")
46-
start = datetime(2018,1,1,12,30, tzinfo=timezone.utc)
47-
start = start.timestamp() * 1e9
48-
end = start + (3600 * 1e9)
4949
50-
for point, _ in stream.rawValues(start, end):
51-
print(point.time, point.value)
50+
# print one hour of time series data starting at 1/1/2018 12:30:00 UTC
51+
start = to_nanoseconds(datetime(2018,1,1,12,30))
52+
end = start + (60 * 60 * 1e9)
53+
for point, _ in stream.values(start, end):
54+
print(point.time, point.value)
5255
5356
If you don't have access to a BTrDB server, then please see our smartgridstore
5457
`docs <https://docs.smartgrid.store/>`_ and `repo <https://github.com/BTrDB/smartgridstore>`_

setup.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
##########################################################################
2828

2929
## Basic information
30-
NAME = "btrdb4-python"
30+
NAME = "btrdb"
3131
DESCRIPTION = "Bindings to interact with the Berkeley Tree Database using gRPC."
3232
AUTHOR = "Michael Andersen, Allen Leis"
3333
@@ -43,25 +43,27 @@
4343
## Define the classifiers
4444
## See https://pypi.python.org/pypi?%3Aaction=list_classifiers
4545
CLASSIFIERS = (
46-
'Development Status :: 5 - Beta',
46+
'Development Status :: 5 - Production/Stable',
4747
'Intended Audience :: Developers',
48+
'Intended Audience :: Information Technology',
4849
'Intended Audience :: Science/Research',
49-
'License :: OSI Approved :: Apache Software License',
50+
'License :: OSI Approved :: BSD License',
5051
'Natural Language :: English',
5152
'Operating System :: OS Independent',
5253
'Programming Language :: Python',
54+
'Programming Language :: Python :: 3.4',
5355
'Programming Language :: Python :: 3.5',
5456
'Programming Language :: Python :: 3.6',
5557
'Programming Language :: Python :: 3.7',
56-
'Topic :: Software Development',
58+
'Topic :: Database',
5759
'Topic :: Software Development :: Libraries :: Python Modules',
5860
)
5961

6062
## Important Paths
6163
PROJECT = os.path.abspath(os.path.dirname(__file__))
6264
REQUIRE_PATH = "requirements.txt"
6365
VERSION_PATH = os.path.join(PACKAGE, "version.py")
64-
PKG_DESCRIBE = "DESCRIPTION.rst"
66+
PKG_DESCRIBE = "DESCRIPTION.md"
6567

6668
## Directories to ignore in find_packages
6769
EXCLUDES = (
@@ -124,8 +126,8 @@ def get_description_type(path=PKG_DESCRIBE):
124126
"name": NAME,
125127
"version": get_version(),
126128
"description": DESCRIPTION,
127-
# "long_description": read(PKG_DESCRIBE),
128-
# "long_description_content_type": get_description_type(PKG_DESCRIBE),
129+
"long_description": read(PKG_DESCRIBE),
130+
"long_description_content_type": get_description_type(PKG_DESCRIBE),
129131
"classifiers": CLASSIFIERS,
130132
"keywords": KEYWORDS,
131133
"license": LICENSE,
@@ -150,7 +152,7 @@ def get_description_type(path=PKG_DESCRIBE):
150152
"console_scripts": [],
151153
},
152154
"install_requires": list(get_requires()),
153-
"python_requires": ">=3.5, <4",
155+
"python_requires": ">=3.4, <4",
154156
"setup_requires":["pytest-runner"],
155157
"tests_require":["pytest"],
156158
}

0 commit comments

Comments
 (0)