|
| 1 | +# Comparing `tmp/vre_repository_connector-0.2.1.tar.gz` & `tmp/vre_repository_connector-0.2.2.tar.gz` |
| 2 | + |
| 3 | +## filetype from file(1) |
| 4 | + |
| 5 | +```diff |
| 6 | +@@ -1 +1 @@ |
| 7 | +-gzip compressed data, was "vre_repository_connector-0.2.1.tar", max compression |
| 8 | ++gzip compressed data, was "vre_repository_connector-0.2.2.tar", max compression |
| 9 | +``` |
| 10 | + |
| 11 | +## Comparing `vre_repository_connector-0.2.1.tar` & `vre_repository_connector-0.2.2.tar` |
| 12 | + |
| 13 | +### file list |
| 14 | + |
| 15 | +```diff |
| 16 | +@@ -1,11 +1,11 @@ |
| 17 | +--rw-r--r-- 0 0 0 1064 2024-05-31 13:15:46.462204 vre_repository_connector-0.2.1/LICENSE |
| 18 | +--rw-r--r-- 0 0 0 1314 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.1/README.md |
| 19 | +--rw-r--r-- 0 0 0 745 2024-05-31 23:33:06.703910 vre_repository_connector-0.2.1/pyproject.toml |
| 20 | +--rw-r--r-- 0 0 0 266 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.1/vre_repository_connector/__init__.py |
| 21 | +--rw-r--r-- 0 0 0 164 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.1/vre_repository_connector/api/__init__.py |
| 22 | +--rw-r--r-- 0 0 0 2928 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.1/vre_repository_connector/api/base.py |
| 23 | +--rw-r--r-- 0 0 0 10211 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.1/vre_repository_connector/api/dbrepo.py |
| 24 | +--rw-r--r-- 0 0 0 6886 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.1/vre_repository_connector/api/inveniordm.py |
| 25 | +--rw-r--r-- 0 0 0 4885 2024-05-31 23:33:06.703910 vre_repository_connector-0.2.1/vre_repository_connector/auto.py |
| 26 | +--rw-r--r-- 0 0 0 182 2024-05-31 13:15:46.462204 vre_repository_connector-0.2.1/vre_repository_connector/utils.py |
| 27 | +--rw-r--r-- 0 0 0 2122 1970-01-01 00:00:00.000000 vre_repository_connector-0.2.1/PKG-INFO |
| 28 | ++-rw-r--r-- 0 0 0 1064 2024-05-31 13:15:46.462204 vre_repository_connector-0.2.2/LICENSE |
| 29 | ++-rw-r--r-- 0 0 0 1314 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.2/README.md |
| 30 | ++-rw-r--r-- 0 0 0 745 2024-06-01 17:25:44.417153 vre_repository_connector-0.2.2/pyproject.toml |
| 31 | ++-rw-r--r-- 0 0 0 298 2024-06-01 17:25:44.417153 vre_repository_connector-0.2.2/vre_repository_connector/__init__.py |
| 32 | ++-rw-r--r-- 0 0 0 164 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.2/vre_repository_connector/api/__init__.py |
| 33 | ++-rw-r--r-- 0 0 0 2928 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.2/vre_repository_connector/api/base.py |
| 34 | ++-rw-r--r-- 0 0 0 10211 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.2/vre_repository_connector/api/dbrepo.py |
| 35 | ++-rw-r--r-- 0 0 0 6886 2024-05-31 23:18:03.497382 vre_repository_connector-0.2.2/vre_repository_connector/api/inveniordm.py |
| 36 | ++-rw-r--r-- 0 0 0 5517 2024-06-01 17:25:44.417153 vre_repository_connector-0.2.2/vre_repository_connector/auto.py |
| 37 | ++-rw-r--r-- 0 0 0 182 2024-05-31 13:15:46.462204 vre_repository_connector-0.2.2/vre_repository_connector/utils.py |
| 38 | ++-rw-r--r-- 0 0 0 2122 1970-01-01 00:00:00.000000 vre_repository_connector-0.2.2/PKG-INFO |
| 39 | +``` |
| 40 | + |
| 41 | +### Comparing `vre_repository_connector-0.2.1/LICENSE` & `vre_repository_connector-0.2.2/LICENSE` |
| 42 | + |
| 43 | + * *Files identical despite different names* |
| 44 | + |
| 45 | +### Comparing `vre_repository_connector-0.2.1/README.md` & `vre_repository_connector-0.2.2/README.md` |
| 46 | + |
| 47 | + * *Files identical despite different names* |
| 48 | + |
| 49 | +### Comparing `vre_repository_connector-0.2.1/pyproject.toml` & `vre_repository_connector-0.2.2/pyproject.toml` |
| 50 | + |
| 51 | + * *Files 0% similar despite different names* |
| 52 | + |
| 53 | +```diff |
| 54 | +@@ -1,10 +1,10 @@ |
| 55 | + [tool.poetry] |
| 56 | + name = "VRE-Repository-Connector" |
| 57 | +-version = "0.2.1" |
| 58 | ++version = "0.2.2" |
| 59 | + description = "Library for connecting the virtual research environment of TU Wien with its research data repositories" |
| 60 | + authors = ["Maximilian Moser < [email protected]>", "Sotirios Tsepelakis < [email protected]>", "Martin Weise < [email protected]>"] |
| 61 | + license = "MIT" |
| 62 | + readme = "README.md" |
| 63 | + repository = "https://gitlab.tuwien.ac.at/fairdata/vre-repository-connector" |
| 64 | + |
| 65 | + [tool.poetry.dependencies] |
| 66 | +``` |
| 67 | + |
| 68 | +### Comparing `vre_repository_connector-0.2.1/vre_repository_connector/api/base.py` & `vre_repository_connector-0.2.2/vre_repository_connector/api/base.py` |
| 69 | + |
| 70 | + * *Files identical despite different names* |
| 71 | + |
| 72 | +### Comparing `vre_repository_connector-0.2.1/vre_repository_connector/api/dbrepo.py` & `vre_repository_connector-0.2.2/vre_repository_connector/api/dbrepo.py` |
| 73 | + |
| 74 | + * *Files identical despite different names* |
| 75 | + |
| 76 | +### Comparing `vre_repository_connector-0.2.1/vre_repository_connector/api/inveniordm.py` & `vre_repository_connector-0.2.2/vre_repository_connector/api/inveniordm.py` |
| 77 | + |
| 78 | + * *Files identical despite different names* |
| 79 | + |
| 80 | +### Comparing `vre_repository_connector-0.2.1/vre_repository_connector/auto.py` & `vre_repository_connector-0.2.2/vre_repository_connector/auto.py` |
| 81 | + |
| 82 | + * *Files 7% similar despite different names* |
| 83 | + |
| 84 | +```diff |
| 85 | +@@ -107,37 +107,57 @@ |
| 86 | + url: str, all: bool = False, interactive: bool = True |
| 87 | + ) -> List[str] | str | None: |
| 88 | + """Download file automatically based on the URL.""" |
| 89 | + if (service := suggest_repository(url)) is None: |
| 90 | + return None |
| 91 | + |
| 92 | + # fish out the container & file from the URL |
| 93 | +- cid, fid, fids = *service.url_to_parts(url), [] |
| 94 | ++ cid, fid, fids = (*service.url_to_parts(url), []) |
| 95 | + if cid is None and fid is None: |
| 96 | + cid, fid = service.url_to_parts(_follow_redirects(url)) |
| 97 | + |
| 98 | + # if we couldn't determine a file from the URL... |
| 99 | + if fid is None: |
| 100 | +- if all: |
| 101 | ++ avail_files = list(service.list_files(cid)) |
| 102 | ++ if len(avail_files) == 1: |
| 103 | ++ fid = avail_files[0] |
| 104 | ++ |
| 105 | ++ elif all: |
| 106 | + # we either take all of them |
| 107 | +- fids = list(service.list_files(cid)) |
| 108 | ++ fids = avail_files |
| 109 | ++ |
| 110 | + elif interactive: |
| 111 | +- # or we ask the user (TODO) |
| 112 | +- pass |
| 113 | ++ # or we ask the user |
| 114 | ++ selection = 0 |
| 115 | ++ for idx, file_ in enumerate(avail_files): |
| 116 | ++ print(f"{idx+1}) {file_}") |
| 117 | ++ |
| 118 | ++ while not (0 < selection <= len(avail_files)): |
| 119 | ++ try: |
| 120 | ++ selection = int(input(f"Select [1-{len(avail_files)}]: ")) |
| 121 | ++ except ValueError: |
| 122 | ++ selection = 0 |
| 123 | ++ |
| 124 | ++ fid = avail_files[selection - 1] |
| 125 | + else: |
| 126 | + # or we give up |
| 127 | + return None |
| 128 | + |
| 129 | + try: |
| 130 | + return _download(service, cid, fid or fids, interactive) |
| 131 | + |
| 132 | + finally: |
| 133 | + service.clear_auth() |
| 134 | + |
| 135 | + |
| 136 | ++def download_all(url: str) -> List[str] | str | None: |
| 137 | ++ """Download all files from a URL.""" |
| 138 | ++ return download(url, all=True, interactive=False) |
| 139 | ++ |
| 140 | ++ |
| 141 | + def upload( |
| 142 | + file_path: str, url: Optional[str] = None |
| 143 | + ) -> Tuple[Optional[str], Optional[str], Optional[str]]: |
| 144 | + """Upload the file to an auto-selected repository. |
| 145 | + |
| 146 | + Return a triple with the repository's URL, the container ID and the file ID. |
| 147 | + """ |
| 148 | +``` |
| 149 | + |
| 150 | +### Comparing `vre_repository_connector-0.2.1/PKG-INFO` & `vre_repository_connector-0.2.2/PKG-INFO` |
| 151 | + |
| 152 | + * *Files 1% similar despite different names* |
| 153 | + |
| 154 | +```diff |
| 155 | +@@ -1,10 +1,10 @@ |
| 156 | + Metadata-Version: 2.1 |
| 157 | + Name: VRE-Repository-Connector |
| 158 | +-Version: 0.2.1 |
| 159 | ++Version: 0.2.2 |
| 160 | + Summary: Library for connecting the virtual research environment of TU Wien with its research data repositories |
| 161 | + Home-page: https://gitlab.tuwien.ac.at/fairdata/vre-repository-connector |
| 162 | + License: MIT |
| 163 | + Author: Maximilian Moser |
| 164 | + |
| 165 | + Requires-Python: >=3.11 |
| 166 | + Classifier: License :: OSI Approved :: MIT License |
| 167 | +``` |
| 168 | + |
0 commit comments