[med-svn] [Git][med-team/python-datacache][master] 7 commits: New upstream version 1.2.1

Andreas Tille (@tille) gitlab at salsa.debian.org
Sun Dec 25 21:44:37 GMT 2022



Andreas Tille pushed to branch master at Debian Med / python-datacache


Commits:
98df5f10 by Andreas Tille at 2022-12-25T22:34:03+01:00
New upstream version 1.2.1
- - - - -
01bb5dec by Andreas Tille at 2022-12-25T22:34:03+01:00
routine-update: New upstream version

- - - - -
c12c35b0 by Andreas Tille at 2022-12-25T22:34:03+01:00
Update upstream source from tag 'upstream/1.2.1'

Update to upstream version '1.2.1'
with Debian dir c1c8b2e731e67f3bd16b35472098434d50a0ad07
- - - - -
c8dbcc7c by Andreas Tille at 2022-12-25T22:34:03+01:00
routine-update: Standards-Version: 4.6.2

- - - - -
46d0e7b0 by Andreas Tille at 2022-12-25T22:34:05+01:00
routine-update: Remove trailing whitespace in debian/changelog

- - - - -
98a52bf1 by Andreas Tille at 2022-12-25T22:39:12+01:00
Refresh patches

- - - - -
32bd7956 by Andreas Tille at 2022-12-25T22:40:25+01:00
Upload to unstable

- - - - -


22 changed files:

- + LICENSE
- PKG-INFO
- datacache.egg-info/PKG-INFO
- datacache.egg-info/SOURCES.txt
- datacache/__init__.py
- datacache/cache.py
- datacache/common.py
- datacache/database_helpers.py
- datacache/database_table.py
- datacache/database_types.py
- datacache/download.py
- + datacache/version.py
- debian/changelog
- debian/control
- debian/patches/noInternetAccessForDownloads.patch
- debian/patches/python3.10.patch
- debian/patches/switch-to-pytest.patch
- setup.py
- test/test_cache_object.py
- test/test_database_objects.py
- test/test_database_types.py
- test/test_db_from_dataframes.py


Changes:

=====================================
LICENSE
=====================================
@@ -0,0 +1,201 @@
+Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
\ No newline at end of file


=====================================
PKG-INFO
=====================================
@@ -1,35 +1,43 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: datacache
-Version: 1.1.5
+Version: 1.2.1
 Summary: Helpers for transparently downloading datasets
 Home-page: https://github.com/openvax/datacache
 Author: Alex Rubinsteyn
-Author-email: alex.rubinsteyn at mssm.edu
+Author-email: alex.rubinsteyn at unc.edu
 License: http://www.apache.org/licenses/LICENSE-2.0.html
-Description: DataCache
-        =========
-        
-        Helpers for transparently downloading datasets
-        
-        API
-        ---
-        
-        -  **fetch_file**\ (download_url, filename = *None*, decompress =
-           *False*, subdir = *None*)
-        -  **fetch_and_transform**\ (transformed_filename, transformer, loader,
-           source_filename, source_url, subdir = *None*)
-        -  **fetch_fasta_dict**\ (download_url, filename = *None*, subdir =
-           *None*)
-        -  **fetch_fasta_db**\ (table_name, download_url, fasta_filename =
-           *None*, key_column = *‘id’*, value_column = *‘seq’*, subdir = *None*)
-        -  **fetch_csv_db**\ (table_name, download_url, csv_filename = *None*,
-           subdir = *None*, \**pandas_kwargs)
-        
-Platform: UNKNOWN
-Classifier: Development Status :: 3 - Alpha
+Classifier: Development Status :: 4 - Beta
 Classifier: Environment :: Console
 Classifier: Operating System :: OS Independent
 Classifier: Intended Audience :: Science/Research
 Classifier: License :: OSI Approved :: Apache Software License
 Classifier: Programming Language :: Python
 Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
+Description-Content-Type: text/markdown
+License-File: LICENSE
+
+<a href="https://travis-ci.org/openvax/datacache">
+    <img src="https://travis-ci.org/openvax/datacache.svg?branch=master" alt="Build Status" />
+</a>
+<a href="https://coveralls.io/github/openvax/datacache?branch=master">
+    <img src="https://coveralls.io/repos/openvax/datacache/badge.svg?branch=master&service=github" alt="Coverage Status" />
+</a>
+<a href="https://pypi.python.org/pypi/datacache/">
+    <img src="https://img.shields.io/pypi/v/datacache.svg?maxAge=1000" alt="PyPI" />
+</a>
+
+DataCache
+=========
+
+Helpers for transparently downloading datasets
+
+## API
+
+* **fetch_file**(download_url, filename = *None*, decompress = *False*, subdir = *None*)
+* **fetch_and_transform**(transformed_filename, transformer, loader,
+        source_filename, source_url, subdir = *None*)
+* **fetch_fasta_dict**(download_url, filename = *None*, subdir = *None*)
+* **fetch_fasta_db**(table_name, download_url, fasta_filename = *None*,
+        key_column = *'id'*, value_column = *'seq'*, subdir = *None*)
+* **fetch_csv_db**(table_name, download_url, csv_filename = *None*, subdir = *None*,
+        \*\*pandas_kwargs)


=====================================
datacache.egg-info/PKG-INFO
=====================================
@@ -1,35 +1,43 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: datacache
-Version: 1.1.5
+Version: 1.2.1
 Summary: Helpers for transparently downloading datasets
 Home-page: https://github.com/openvax/datacache
 Author: Alex Rubinsteyn
-Author-email: alex.rubinsteyn at mssm.edu
+Author-email: alex.rubinsteyn at unc.edu
 License: http://www.apache.org/licenses/LICENSE-2.0.html
-Description: DataCache
-        =========
-        
-        Helpers for transparently downloading datasets
-        
-        API
-        ---
-        
-        -  **fetch_file**\ (download_url, filename = *None*, decompress =
-           *False*, subdir = *None*)
-        -  **fetch_and_transform**\ (transformed_filename, transformer, loader,
-           source_filename, source_url, subdir = *None*)
-        -  **fetch_fasta_dict**\ (download_url, filename = *None*, subdir =
-           *None*)
-        -  **fetch_fasta_db**\ (table_name, download_url, fasta_filename =
-           *None*, key_column = *‘id’*, value_column = *‘seq’*, subdir = *None*)
-        -  **fetch_csv_db**\ (table_name, download_url, csv_filename = *None*,
-           subdir = *None*, \**pandas_kwargs)
-        
-Platform: UNKNOWN
-Classifier: Development Status :: 3 - Alpha
+Classifier: Development Status :: 4 - Beta
 Classifier: Environment :: Console
 Classifier: Operating System :: OS Independent
 Classifier: Intended Audience :: Science/Research
 Classifier: License :: OSI Approved :: Apache Software License
 Classifier: Programming Language :: Python
 Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
+Description-Content-Type: text/markdown
+License-File: LICENSE
+
+<a href="https://travis-ci.org/openvax/datacache">
+    <img src="https://travis-ci.org/openvax/datacache.svg?branch=master" alt="Build Status" />
+</a>
+<a href="https://coveralls.io/github/openvax/datacache?branch=master">
+    <img src="https://coveralls.io/repos/openvax/datacache/badge.svg?branch=master&service=github" alt="Coverage Status" />
+</a>
+<a href="https://pypi.python.org/pypi/datacache/">
+    <img src="https://img.shields.io/pypi/v/datacache.svg?maxAge=1000" alt="PyPI" />
+</a>
+
+DataCache
+=========
+
+Helpers for transparently downloading datasets
+
+## API
+
+* **fetch_file**(download_url, filename = *None*, decompress = *False*, subdir = *None*)
+* **fetch_and_transform**(transformed_filename, transformer, loader,
+        source_filename, source_url, subdir = *None*)
+* **fetch_fasta_dict**(download_url, filename = *None*, subdir = *None*)
+* **fetch_fasta_db**(table_name, download_url, fasta_filename = *None*,
+        key_column = *'id'*, value_column = *'seq'*, subdir = *None*)
+* **fetch_csv_db**(table_name, download_url, csv_filename = *None*, subdir = *None*,
+        \*\*pandas_kwargs)


=====================================
datacache.egg-info/SOURCES.txt
=====================================
@@ -1,3 +1,4 @@
+LICENSE
 README.md
 setup.py
 datacache/__init__.py
@@ -8,6 +9,7 @@ datacache/database_helpers.py
 datacache/database_table.py
 datacache/database_types.py
 datacache/download.py
+datacache/version.py
 datacache.egg-info/PKG-INFO
 datacache.egg-info/SOURCES.txt
 datacache.egg-info/dependency_links.txt


=====================================
datacache/__init__.py
=====================================
@@ -1,5 +1,3 @@
-# Copyright (c) 2015-2018. Mount Sinai School of Medicine
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -12,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 from .download import fetch_file, fetch_and_transform, fetch_csv_dataframe
 from .database_helpers import (
     db_from_dataframe,
@@ -30,8 +26,7 @@ from .common import (
     build_local_filename
 )
 from .cache import Cache
-
-__version__ = '1.1.5'
+from .version import __version__
 
 __all__ = [
     'fetch_file',


=====================================
datacache/cache.py
=====================================
@@ -1,5 +1,3 @@
-# Copyright (c) 2015-2018. Mount Sinai School of Medicine
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -12,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 from os.path import exists, join
 from os import remove
 


=====================================
datacache/common.py
=====================================
@@ -1,5 +1,3 @@
-# Copyright (c) 2015-2018. Mount Sinai School of Medicine
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -12,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 import hashlib
 from os import makedirs, environ
 from os.path import join, exists, split, splitext


=====================================
datacache/database_helpers.py
=====================================
@@ -1,5 +1,3 @@
-# Copyright (c) 2015-2018. Mount Sinai School of Medicine
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at


=====================================
datacache/database_table.py
=====================================
@@ -1,5 +1,3 @@
-# Copyright (c) 2015-2018. Mount Sinai School of Medicine
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -12,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 from .database_types import db_type
 
 class DatabaseTable(object):


=====================================
datacache/database_types.py
=====================================
@@ -1,5 +1,3 @@
-# Copyright (c) 2015-2018. Mount Sinai School of Medicine
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -58,13 +56,6 @@ def _candidate_type_names(python_type_representation):
         Any Python object which represents a type, such as `int`,
         `dtype('int8')`, `np.int8`, or `"int8"`.
     """
-    # if we get a single character code we should normalize to a NumPy type
-    # using np.typeDict, which maps string representations of types to NumPy
-    # type objects
-    if python_type_representation in np.typeDict:
-        python_type_representation = np.typeDict[python_type_representation]
-        yield python_type_representation.__name__
-
     # if we get a dtype object i.e. dtype('int16'), then pull out its name
     if hasattr(python_type_representation, 'name'):
         yield python_type_representation.name


=====================================
datacache/download.py
=====================================
@@ -1,5 +1,3 @@
-# Copyright (c) 2015-2018. Mount Sinai School of Medicine
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -12,8 +10,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from __future__ import print_function, division, absolute_import
-
 import gzip
 import logging
 import os
@@ -21,11 +17,10 @@ import subprocess
 from shutil import move
 from tempfile import NamedTemporaryFile
 import zipfile
-
+import urllib
 
 import requests
 import pandas as pd
-from six.moves import urllib
 
 from .common import build_path, build_local_filename
 


=====================================
datacache/version.py
=====================================
@@ -0,0 +1,3 @@
+__version__ = '1.2.1'
+
+


=====================================
debian/changelog
=====================================
@@ -1,9 +1,18 @@
+python-datacache (1.2.1-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version
+  * Standards-Version: 4.6.2 (routine-update)
+  * Remove trailing whitespace in debian/changelog (routine-update)
+
+ -- Andreas Tille <tille at debian.org>  Sun, 25 Dec 2022 22:39:23 +0100
+
 python-datacache (1.1.5-2) unstable; urgency=medium
 
   [ Mohammed Bilal ]
   * Team Upload.
   * Add autopkgtest
-  
+
   [ Nilesh Patra ]
   * Switch from nose to pytest
 


=====================================
debian/control
=====================================
@@ -13,7 +13,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-biopython <!nocheck>,
                python3-typechecks <!nocheck>,
                python3-mock <!nocheck>,
-Standards-Version: 4.6.0
+Standards-Version: 4.6.2
 Homepage: https://github.com/openvax/datacache
 Vcs-Browser: https://salsa.debian.org/med-team/python-datacache
 Vcs-Git: https://salsa.debian.org/med-team/python-datacache.git


=====================================
debian/patches/noInternetAccessForDownloads.patch
=====================================
@@ -43,7 +43,7 @@ Description: Exclude tests accessing network
 +    assert filename_yahoo != filename_google
 --- a/test/test_cache_object.py
 +++ b/test/test_cache_object.py
-@@ -19,7 +19,7 @@ def test_cache_object_local_filename():
+@@ -21,7 +21,7 @@ def test_cache_object_local_filename():
      filename = Cache(CACHE_DIR).local_filename(filename="test")
      assert filename.endswith("test")
  
@@ -52,7 +52,7 @@ Description: Exclude tests accessing network
      cache = Cache(CACHE_DIR)
      path = cache.fetch(TEST_URL, filename=TEST_FILENAME)
      assert path.endswith(TEST_FILENAME), \
-@@ -37,7 +37,7 @@ def test_cache_fetch_force(mock_download
+@@ -39,7 +39,7 @@ def test_cache_fetch_force(mock_download
      assert len(mock_download.call_args_list) == 2, \
          "Expected two separate calls to _download, given force=True"
  
@@ -61,7 +61,7 @@ Description: Exclude tests accessing network
      cache = Cache(CACHE_DIR)
      path = cache.fetch(TEST_URL, filename=TEST_FILENAME)
      assert exists(path), "Expected %s to exist after download" % path
-@@ -45,7 +45,7 @@ def test_cache_delete_url():
+@@ -47,7 +47,7 @@ def test_cache_delete_url():
      assert not exists(path), \
          "Expected %s to be deleted after call to delete_url" % path
  


=====================================
debian/patches/python3.10.patch
=====================================
@@ -4,7 +4,7 @@ Description: There is no os.errno any more
 
 --- a/datacache/download.py
 +++ b/datacache/download.py
-@@ -17,6 +17,7 @@ from __future__ import print_function, d
+@@ -13,6 +13,7 @@
  import gzip
  import logging
  import os
@@ -12,7 +12,7 @@ Description: There is no os.errno any more
  import subprocess
  from shutil import move
  from tempfile import NamedTemporaryFile
-@@ -83,7 +84,7 @@ def _download_to_temp_file(
+@@ -78,7 +79,7 @@ def _download_to_temp_file(
              logger.info("Running: %s" % (" ".join(wget_command_list)))
              subprocess.call(wget_command_list)
          except OSError as e:


=====================================
debian/patches/switch-to-pytest.patch
=====================================
@@ -3,15 +3,7 @@ Author: Nilesh Patra <nilesh at debian.org>
 Last-Update: 2022-03-29
 --- a/test/test_cache_object.py
 +++ b/test/test_cache_object.py
-@@ -1,7 +1,6 @@
- from os import remove
- from os.path import exists
- from mock import patch
--from nose.tools import eq_
- 
- from datacache import Cache
- 
-@@ -26,7 +25,7 @@
+@@ -28,7 +28,7 @@ def notest_cache_fetch_google():
          "Expected local file to be named %s but got %s" % (
              TEST_FILENAME, path)
      assert exists(path), "File not found: %s" % path
@@ -20,34 +12,9 @@ Last-Update: 2022-03-29
  
  
  @patch('datacache.cache.download._download_and_decompress_if_necessary')
---- a/test/test_database_types.py
-+++ b/test/test_database_types.py
-@@ -1,4 +1,3 @@
--from nose.tools import eq_
- import numpy as np
- from datacache.database_types import db_type
- 
-@@ -7,9 +6,9 @@
-             int,
-             np.int8, np.int16, np.int32, np.int64,
-             np.uint8, np.uint16, np.uint32, np.uint64]:
--        eq_(db_type(int_type), "INT")
-+        assert(db_type(int_type) == "INT")
- 
-     for float_type in [float, np.float32, np.float64]:
--        eq_(db_type(float), "FLOAT")
-+        assert(db_type(float) == "FLOAT")
- 
--    eq_(db_type(str), "TEXT")
-+    assert(db_type(str) == "TEXT")
 --- a/test/test_db_from_dataframes.py
 +++ b/test/test_db_from_dataframes.py
-@@ -1,4 +1,3 @@
--from nose.tools import eq_
- import pandas as pd
- from tempfile import NamedTemporaryFile
- from datacache import db_from_dataframes, db_from_dataframe
-@@ -16,10 +15,10 @@
+@@ -18,10 +18,10 @@ def test_database_from_dataframes():
              subdir="test_datacache")
          cursor_A = db.execute("SELECT * FROM A")
          results_A = cursor_A.fetchall()
@@ -60,7 +27,7 @@ Last-Update: 2022-03-29
  
  def test_database_from_single_dataframe():
      with NamedTemporaryFile(suffix="test.db") as f:
-@@ -32,4 +31,4 @@
+@@ -34,4 +34,4 @@ def test_database_from_single_dataframe(
              subdir="test_datacache")
          cursor = db.execute("SELECT * FROM A")
          results = cursor.fetchall()
@@ -68,15 +35,7 @@ Last-Update: 2022-03-29
 +        assert(results == [(1, "a"), (2, "b"), (3, "c")])
 --- a/test/test_database_objects.py
 +++ b/test/test_database_objects.py
-@@ -6,7 +6,6 @@
- 
- import datacache
- 
--from nose.tools import eq_
- 
- TABLE_NAME = "test"
- INT_COL_NAME = "int_col"
-@@ -29,11 +28,11 @@
+@@ -30,11 +30,11 @@ def make_table_object():
  
  def test_database_table_object():
      table = make_table_object()
@@ -93,7 +52,7 @@ Last-Update: 2022-03-29
  
  def test_create_db():
      with tempfile.NamedTemporaryFile(suffix="test.db") as f:
-@@ -49,4 +48,4 @@
+@@ -50,4 +50,4 @@ def test_create_db():
          cursor = db.connection.execute(sql)
          int_result_tuple = cursor.fetchone()
          int_result = int_result_tuple[0]


=====================================
setup.py
=====================================
@@ -1,5 +1,3 @@
-# Copyright (c) 2014-2018. Mount Sinai School of Medicine
-#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -21,7 +19,7 @@ from setuptools import setup
 readme_filename = "README.md"
 current_directory = os.path.dirname(__file__)
 readme_path = os.path.join(current_directory, readme_filename)
-
+project_name = "datacache"
 
 try:
     with open(readme_path, "r") as f:
@@ -30,14 +28,7 @@ except:
     logging.warn("Failed to load %s", readme_filename)
     readme_markdown = ""
 
-try:
-    import pypandoc
-    readme_restructured = pypandoc.convert(readme_markdown, to="rst", format="md")
-except:
-    readme_restructured = readme_markdown
-    logging.warn("Failed to convert %s to reStructuredText", readme_filename)
-
-with open('datacache/__init__.py', 'r') as f:
+with open('%s/version.py' % project_name, 'r') as f:
     version = re.search(
         r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
         f.read(),
@@ -45,15 +36,15 @@ with open('datacache/__init__.py', 'r') as f:
 
 if __name__ == "__main__":
     setup(
-        name="datacache",
+        name=project_name,
         version=version,
         description="Helpers for transparently downloading datasets",
         author="Alex Rubinsteyn",
-        author_email="alex.rubinsteyn at mssm.edu",
-        url="https://github.com/openvax/datacache",
+        author_email="alex.rubinsteyn at unc.edu",
+        url="https://github.com/openvax/%s" % project_name,
         license="http://www.apache.org/licenses/LICENSE-2.0.html",
         classifiers=[
-            "Development Status :: 3 - Alpha",
+            "Development Status :: 4 - Beta",
             "Environment :: Console",
             "Operating System :: OS Independent",
             "Intended Audience :: Science/Research",
@@ -69,6 +60,7 @@ if __name__ == "__main__":
             "typechecks>=0.0.2",
             "mock",
         ],
-        long_description=readme_restructured,
-        packages=["datacache"],
+        long_description=readme_markdown,
+        long_description_content_type='text/markdown',
+        packages=[project_name],
     )


=====================================
test/test_cache_object.py
=====================================
@@ -1,7 +1,6 @@
 from os import remove
 from os.path import exists
 from mock import patch
-from nose.tools import eq_
 
 from datacache import Cache
 
@@ -9,6 +8,9 @@ CACHE_DIR = "datacache_test"
 TEST_URL = "http://www.google.com"
 TEST_FILENAME = "google"
 
+def eq_(x, y):
+    assert x == y
+
 def test_cache_object_path():
     cache = Cache(CACHE_DIR)
     assert cache.cache_directory_path.endswith(CACHE_DIR), \


=====================================
test/test_database_objects.py
=====================================
@@ -6,7 +6,8 @@ import tempfile
 
 import datacache
 
-from nose.tools import eq_
+def eq_(x, y):
+    assert x == y
 
 TABLE_NAME = "test"
 INT_COL_NAME = "int_col"


=====================================
test/test_database_types.py
=====================================
@@ -1,4 +1,3 @@
-from nose.tools import eq_
 import numpy as np
 from datacache.database_types import db_type
 
@@ -7,9 +6,9 @@ def test_db_types():
             int,
             np.int8, np.int16, np.int32, np.int64,
             np.uint8, np.uint16, np.uint32, np.uint64]:
-        eq_(db_type(int_type), "INT")
+        assert db_type(int_type) == "INT"
 
     for float_type in [float, np.float32, np.float64]:
-        eq_(db_type(float), "FLOAT")
+        assert db_type(float) == "FLOAT"
 
-    eq_(db_type(str), "TEXT")
+    assert db_type(str) == "TEXT"


=====================================
test/test_db_from_dataframes.py
=====================================
@@ -1,4 +1,3 @@
-from nose.tools import eq_
 import pandas as pd
 from tempfile import NamedTemporaryFile
 from datacache import db_from_dataframes, db_from_dataframe
@@ -6,6 +5,9 @@ from datacache import db_from_dataframes, db_from_dataframe
 dfA = pd.DataFrame({"numbers": [1, 2, 3], "strings": ["a", "b", "c"]})
 dfB = pd.DataFrame({"wuzzles": ["nuzzle", "ruzzle"]})
 
+def eq_(x, y):
+    assert x == y
+
 def test_database_from_dataframes():
     with NamedTemporaryFile(suffix="test.db") as f:
         db = db_from_dataframes(



View it on GitLab: https://salsa.debian.org/med-team/python-datacache/-/compare/4e5a8695789c8261e461fb7e6d775652e5db6c92...32bd7956745a9dd40933322403a55affcd7ea7cd

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-datacache/-/compare/4e5a8695789c8261e461fb7e6d775652e5db6c92...32bd7956745a9dd40933322403a55affcd7ea7cd
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20221225/f0133055/attachment-0001.htm>


More information about the debian-med-commit mailing list