quilt
Advanced tools
| """ | ||
| Helper functions. | ||
| """ | ||
| import numpy as np | ||
| from . import nodes | ||
| from .tools.command import build_from_node, build, push | ||
| def save(package, data, params={}, is_public=False): | ||
| """Build and push data to Quilt registry at user/package/data_node, | ||
| associating params as metadata for the data node. | ||
| :param package: short package specifier string, i.e. 'team:user/pkg/subpath' | ||
| :param data: data to save (np.ndarray or pd.DataFrame) | ||
| :param params: metadata dictionary | ||
| :param is_public: boolean kwarg to push the packages publicly | ||
| """ | ||
| for key, value in params.items(): | ||
| if isinstance(value, np.ndarray): | ||
| value = value.astype(float) | ||
| params[key] = value.tolist() | ||
| build_from_node(package, nodes.DataNode(None, None, data, params)) | ||
| push('{}'.format(package), is_public=is_public) | ||
+2
-2
| Metadata-Version: 1.1 | ||
| Name: quilt | ||
| Version: 2.9.10 | ||
| Version: 2.9.11 | ||
| Summary: Quilt is a data package manager | ||
@@ -9,3 +9,3 @@ Home-page: https://github.com/quiltdata/quilt | ||
| License: LICENSE | ||
| Download-URL: https://github.com/quiltdata/quilt/releases/tag/2.9.10 | ||
| Download-URL: https://github.com/quiltdata/quilt/releases/tag/2.9.11 | ||
| Description-Content-Type: UNKNOWN | ||
@@ -12,0 +12,0 @@ Description: |
| Metadata-Version: 1.1 | ||
| Name: quilt | ||
| Version: 2.9.10 | ||
| Version: 2.9.11 | ||
| Summary: Quilt is a data package manager | ||
@@ -9,3 +9,3 @@ Home-page: https://github.com/quiltdata/quilt | ||
| License: LICENSE | ||
| Download-URL: https://github.com/quiltdata/quilt/releases/tag/2.9.10 | ||
| Download-URL: https://github.com/quiltdata/quilt/releases/tag/2.9.11 | ||
| Description-Content-Type: UNKNOWN | ||
@@ -12,0 +12,0 @@ Description: |
| appdirs>=1.4.0 | ||
| future>=0.16.0 | ||
| numpy>=1.14.0 | ||
| packaging>=16.8 | ||
@@ -4,0 +5,0 @@ pandas>=0.19.2 |
@@ -8,2 +8,3 @@ README.md | ||
| quilt/team.py | ||
| quilt/util.py | ||
| quilt.egg-info/PKG-INFO | ||
@@ -10,0 +11,0 @@ quilt.egg-info/SOURCES.txt |
@@ -122,1 +122,4 @@ """ | ||
| ) | ||
| from .util import save | ||
@@ -1333,4 +1333,8 @@ # -*- coding: utf-8 -*- | ||
| """ | ||
| return _load(pkginfo, hash)[0] | ||
| node, pkgroot, info = _load(pkginfo, hash) | ||
| for subnode_name in info.subpath: | ||
| node = node[subnode_name] | ||
| return node | ||
| def export(package, output_path='.', force=False, symlinks=False): | ||
@@ -1337,0 +1341,0 @@ """Export package file data. |
+3
-2
@@ -19,3 +19,3 @@ from setuptools import setup, find_packages | ||
| name="quilt", | ||
| version="2.9.10", | ||
| version="2.9.11", | ||
| packages=find_packages(), | ||
@@ -37,3 +37,3 @@ description='Quilt is a data package manager', | ||
| url='https://github.com/quiltdata/quilt', | ||
| download_url='https://github.com/quiltdata/quilt/releases/tag/2.9.10', | ||
| download_url='https://github.com/quiltdata/quilt/releases/tag/2.9.11', | ||
| keywords='quilt quiltdata shareable data dataframe package platform pandas', | ||
@@ -44,2 +44,3 @@ install_requires=[ | ||
| 'future>=0.16.0', # stdlib backport: 'from builtins import xxx', plus others. | ||
| 'numpy>=1.14.0', # required by pandas, but missing from its dependencies. | ||
| 'packaging>=16.8', | ||
@@ -46,0 +47,0 @@ 'pandas>=0.19.2', |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
391008
0.28%48
2.13%8564
0.29%