Commit d45398cb authored by Vuillaume's avatar Vuillaume Committed by Enrique Garcia
Browse files

more complete printed info

parent 4027fbf8
......@@ -249,8 +249,7 @@ class ZenodoAPI:
if self.exist_zenodo_metadata_file:
print("\n * Using the .zenodo.json file to simulate a new upload to Zenodo... \n")
print("\n ! Creating a .zenodo.json file from your codemeta.json file...\n"
" Please add, commit and push this file to your project repository.")
print("\n ! Creating a .zenodo.json file from your codemeta.json file... \n")
self.path_zenodo_metadata_file = self.path_codemeta_file.parent / '.zenodo.json'
......@@ -260,17 +259,17 @@ class ZenodoAPI:
print("Testing communication with Zenodo...")
test_connection = self.fetch_user_entries()
if test_connection.status_code == 200:
print("OK !")
print("Test connection status OK !")
print("ERROR while testing connection status\n", test_connection.json())
# 2 - Test new entry
print("Testing the creation of a dummy entry to (sandbox)Zenodo...")
new_entry = self.create_new_entry()
if new_entry.status_code == 201:
print("OK !")
print("Test new entry status OK !")
print("ERROR while testing the creation of new entry\n", new_entry.json())
# 3 - Test upload metadata
print("Testing the ingestion of the Zenodo metadata...")
......@@ -283,17 +282,17 @@ class ZenodoAPI:
if update_metadata.status_code == 200:
print("OK !")
print("Update metadata status OK !")
print("ERROR while testing update of metadata\n", update_metadata.json())
# 4 - Test delete entry
print("Testing the deletion of the dummy entry...")
delete_test_entry = self.erase_entry(test_entry_id)
if delete_test_entry.status_code == 204:
print("OK !")
print("Delete test entry status OK !")
print("ERROR while deleting test entry\n", delete_test_entry.json())
print("\n\tYAY ! Successful testing of the connection to Zenodo ! \n\n"
"You should not face any trouble when uploading a project to Zenodo through the "
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment