caltechdata-api 1.7.0__tar.gz → 1.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/PKG-INFO +2 -3
  2. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/README.md +1 -2
  3. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/caltechdata_edit.py +11 -0
  4. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/cli.py +1 -1
  5. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api.egg-info/PKG-INFO +2 -3
  6. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/LICENSE +0 -0
  7. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/__init__.py +0 -0
  8. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/caltechdata_write.py +0 -0
  9. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/customize_schema.py +0 -0
  10. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/download_file.py +0 -0
  11. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/get_files.py +0 -0
  12. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/get_metadata.py +0 -0
  13. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/md_to_json.py +0 -0
  14. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api/utils.py +0 -0
  15. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api.egg-info/SOURCES.txt +0 -0
  16. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api.egg-info/dependency_links.txt +0 -0
  17. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api.egg-info/entry_points.txt +0 -0
  18. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api.egg-info/requires.txt +0 -0
  19. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/caltechdata_api.egg-info/top_level.txt +0 -0
  20. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/setup.cfg +0 -0
  21. {caltechdata_api-1.7.0 → caltechdata_api-1.7.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: caltechdata_api
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: Python wrapper for CaltechDATA API.
5
5
  Home-page: https://github.com/caltechlibrary/caltechdata_api
6
6
  Author: Thomas E Morrell, Bhattarai Rohan , Won Elizabeth
@@ -33,8 +33,7 @@ The `caltechdata_api` Python library provides a convenient interface for interac
33
33
 
34
34
  ## Requirements
35
35
 
36
- - Python 3 (Anaconda is recommended)
37
- - `requests` library
36
+ - Python 3.6+
38
37
 
39
38
  ## Installation
40
39
 
@@ -13,8 +13,7 @@ The `caltechdata_api` Python library provides a convenient interface for interac
13
13
 
14
14
  ## Requirements
15
15
 
16
- - Python 3 (Anaconda is recommended)
17
- - `requests` library
16
+ - Python 3.6+
18
17
 
19
18
  ## Installation
20
19
 
@@ -211,6 +211,17 @@ def caltechdata_edit(
211
211
  "provider": "datacite",
212
212
  "client": "datacite",
213
213
  }
214
+ # If we are making a new version, we only want to look for custom DOIs
215
+ if version == True and "identifiers" in metadata:
216
+ for identifier in metadata["identifiers"]:
217
+ if identifier["identifierType"] == "DOI":
218
+ doi = identifier["identifier"]
219
+ prefix = doi.split("/")[0]
220
+ if prefix != repo_prefix:
221
+ pids["doi"] = {
222
+ "identifier": doi,
223
+ "provider": "external",
224
+ }
214
225
 
215
226
  # If no metadata is provided, use existing. Otherwise customize provided
216
227
  # metadata
@@ -254,7 +254,7 @@ def get_names(orcid):
254
254
 
255
255
  def write_s3cmd_config(access_key, secret_key, endpoint):
256
256
  configf = os.path.join(home_directory, ".s3cfg")
257
- if not os.path.exists(key_file):
257
+ if not os.path.exists(configf):
258
258
  with open(configf, "w") as file:
259
259
  file.write(
260
260
  f"""[default]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: caltechdata-api
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: Python wrapper for CaltechDATA API.
5
5
  Home-page: https://github.com/caltechlibrary/caltechdata_api
6
6
  Author: Thomas E Morrell, Bhattarai Rohan , Won Elizabeth
@@ -33,8 +33,7 @@ The `caltechdata_api` Python library provides a convenient interface for interac
33
33
 
34
34
  ## Requirements
35
35
 
36
- - Python 3 (Anaconda is recommended)
37
- - `requests` library
36
+ - Python 3.6+
38
37
 
39
38
  ## Installation
40
39
 
File without changes