From c5d162cfa24d44ee544b060552065528a47b710d Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Tue, 15 Apr 2025 13:20:10 -0500 Subject: [PATCH 1/2] fix up tests --- DESCRIPTION | 2 +- NAMESPACE | 3 - NEWS.md | 5 + R/item_create.R | 75 - R/item_update.R | 47 - R/item_upsert.R | 61 - R/sbtools-package.R | 1 - _pkgdown.yml | 3 - docs/404.html | 65 +- docs/DISCLAIMER.html | 52 +- docs/LICENSE.html | 52 +- docs/articles/index.html | 54 +- docs/articles/sbtools.html | 83 +- docs/authors.html | 71 +- docs/deps/bootstrap-5.3.1/bootstrap.min.css | 4 +- docs/deps/bootstrap-5.3.1/font.css | 124 - ...txg8zYS_SKggPN4iEgvnHyvveLxVs9pbCIPrc.woff | Bin 27828 -> 0 bytes ...txg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrc.woff | Bin 27492 -> 0 bytes .../1adeadb2fe618c5ed46221f15e12b9c8.woff | Bin 46088 -> 0 bytes .../fonts/4iCs6KVjbNBYlgo6ew.woff | Bin 134032 -> 0 bytes .../fonts/4iCs6KVjbNBYlgoKfw7w.woff | Bin 39832 -> 0 bytes .../fonts/4iCv6KVjbNBYlgoCxCvTtA.woff | Bin 117140 -> 0 bytes .../fonts/4iCv6KVjbNBYlgoCxCvjsGyL.woff | Bin 34452 -> 0 bytes .../6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDQ.woff | Bin 17760 -> 0 bytes .../6xK1dSBYKcSV-LCoeQqfX1RYOo3qPa7j.woff | Bin 49156 -> 0 bytes .../fonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3aPA.woff | Bin 74684 -> 0 bytes .../6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7j.woff | Bin 18420 -> 0 bytes .../6xKydSBYKcSV-LCoeQqfX1RYOo3i54rAkw.woff | Bin 74348 -> 0 bytes .../6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vAkw.woff | Bin 74332 -> 0 bytes .../6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdo.woff | Bin 18388 -> 0 bytes .../6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zAkw.woff | Bin 74148 -> 0 bytes .../6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdo.woff | Bin 18340 -> 0 bytes .../fonts/CSR54z1Qlv-GDxkbKVQ_dFsvWNRevw.woff | Bin 16724 -> 0 bytes .../fonts/CSR54z1Qlv-GDxkbKVQ_dFsvaNA.woff | Bin 29672 -> 0 bytes .../fonts/CSR64z1Qlv-GDxkbKVQ_TOQ.woff | Bin 75128 -> 0 bytes .../fonts/CSR64z1Qlv-GDxkbKVQ_fOAKSw.woff | Bin 16516 -> 0 bytes ...xRpg3hIP6sJ7fM7PqPMcMnZFqUwX28DBKXhM0.woff | Bin 55992 -> 0 bytes ...xRpg3hIP6sJ7fM7PqPMcMnZFqUwX28DMyQhM0.woff | Bin 56004 -> 0 bytes ...g3hIP6sJ7fM7PqlOPHYvDP_W9O7GQTTbI1rSg.woff | Bin 47720 -> 0 bytes ...g3hIP6sJ7fM7PqlOPHYvDP_W9O7GQTTsoprSg.woff | Bin 47924 -> 0 bytes ...HjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Ew9.woff | Bin 50580 -> 0 bytes ...HjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew9.woff | Bin 50580 -> 0 bytes ...HjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM70w9.woff | Bin 51108 -> 0 bytes .../fonts/KFOlCnqEu92Fr1MmEU9fBBc-.woff | Bin 20544 -> 0 bytes .../fonts/KFOlCnqEu92Fr1MmEU9vAA.woff | Bin 65756 -> 0 bytes .../fonts/KFOlCnqEu92Fr1MmSU5fBBc-.woff | Bin 20416 -> 0 bytes .../fonts/KFOlCnqEu92Fr1MmSU5vAA.woff | Bin 65164 -> 0 bytes .../fonts/KFOlCnqEu92Fr1MmWUlfBBc-.woff | Bin 20408 -> 0 bytes .../fonts/KFOlCnqEu92Fr1MmWUlvAA.woff | Bin 65556 -> 0 bytes .../fonts/KFOmCnqEu92Fr1Me5g.woff | Bin 65456 -> 0 bytes .../fonts/KFOmCnqEu92Fr1Mu4mxM.woff | Bin 20344 -> 0 bytes .../fonts/QGYpz_kZZAGCONcK2A4bGOj8mNhL.woff | Bin 89776 -> 0 bytes .../fonts/S6u8w4BMUTPHjxsAXC-s.woff | Bin 29864 -> 0 bytes .../fonts/S6u8w4BMUTPHjxswWA.woff | Bin 35436 -> 0 bytes .../fonts/S6u9w4BMUTPHh6UVSwiPHw.woff | Bin 28044 -> 0 bytes .../fonts/S6u9w4BMUTPHh6UVeww.woff | Bin 33296 -> 0 bytes .../fonts/S6u9w4BMUTPHh7USSwiPHw.woff | Bin 30016 -> 0 bytes .../fonts/S6u9w4BMUTPHh7USeww.woff | Bin 35168 -> 0 bytes .../fonts/S6uyw4BMUTPHjx4wWA.woff | Bin 28648 -> 0 bytes .../fonts/S6uyw4BMUTPHvxo.woff | Bin 34020 -> 0 bytes ...HuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYMZs.woff | Bin 138900 -> 0 bytes ...HuS_fvQtMwCp50KnMw2boKoduKmMEVuI6fMZs.woff | Bin 137508 -> 0 bytes ...HuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfMZs.woff | Bin 128192 -> 0 bytes .../XRXI3I6Li01BKofiOc5wtlZ2di8HDFwmRTA.woff | Bin 53216 -> 0 bytes .../XRXI3I6Li01BKofiOc5wtlZ2di8HDGUmRTA.woff | Bin 54196 -> 0 bytes .../XRXI3I6Li01BKofiOc5wtlZ2di8HDLshRTA.woff | Bin 53856 -> 0 bytes .../a98f7a7574819ba83bec6279a2cecd95.woff | Bin 45884 -> 0 bytes ...cVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk0ZjaVQ.woff | Bin 72136 -> 0 bytes ...SCEkx2cmqvXlWq8tWZ0Pw86hd0Rk5hkWVAexg.woff | Bin 23636 -> 0 bytes ...cVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk5hkaVQ.woff | Bin 74700 -> 0 bytes ...SCEkx2cmqvXlWq8tWZ0Pw86hd0Rk8ZkWVAexg.woff | Bin 23576 -> 0 bytes ...cVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk8ZkaVQ.woff | Bin 74564 -> 0 bytes ...cVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk_RkaVQ.woff | Bin 74940 -> 0 bytes ...cVXSCEkx2cmqvXlWq8tWZ0Pw86hd0RkxhjaVQ.woff | Bin 74644 -> 0 bytes ...SCEkx2cmqvXlWq8tWZ0Pw86hd0RkyFjWVAexg.woff | Bin 22964 -> 0 bytes ...cVXSCEkx2cmqvXlWq8tWZ0Pw86hd0RkyFjaVQ.woff | Bin 71660 -> 0 bytes ...X2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4gaVQ.woff | Bin 22332 -> 0 bytes ...vWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1y4k.woff | Bin 68664 -> 0 bytes ...vWbX2vVnXBbObj2OVZyOOSr4dVJWUgsgH1y4k.woff | Bin 70652 -> 0 bytes ...vWbX2vVnXBbObj2OVZyOOSr4dVJWUgshZ1y4k.woff | Bin 69392 -> 0 bytes ...X2vVnXBbObj2OVZyOOSr4dVJWUgsiH0B4gaVQ.woff | Bin 22940 -> 0 bytes ...vWbX2vVnXBbObj2OVZyOOSr4dVJWUgsiH0C4k.woff | Bin 70524 -> 0 bytes ...X2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVQ.woff | Bin 22908 -> 0 bytes ...vWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4k.woff | Bin 70792 -> 0 bytes ...vWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjr0C4k.woff | Bin 71144 -> 0 bytes .../fonts/q5uGsou0JOdh94bfvQlr.woff | Bin 31584 -> 0 bytes .../bootstrap-toc-1.0.1/bootstrap-toc.min.js | 5 + .../deps/clipboard.js-2.0.11/clipboard.min.js | 7 + docs/deps/data-deps.txt | 9 + docs/deps/font-awesome-6.5.2/css/all.css | 8028 +++++++++++++++++ docs/deps/font-awesome-6.5.2/css/all.min.css | 9 + docs/deps/font-awesome-6.5.2/css/v4-shims.css | 2194 +++++ .../font-awesome-6.5.2/css/v4-shims.min.css | 6 + .../webfonts/fa-brands-400.ttf | Bin 0 -> 209128 bytes .../webfonts/fa-brands-400.woff2 | Bin 0 -> 117852 bytes .../webfonts/fa-regular-400.ttf | Bin 0 -> 67860 bytes .../webfonts/fa-regular-400.woff2 | Bin 0 -> 25392 bytes .../webfonts/fa-solid-900.ttf | Bin 0 -> 420332 bytes .../webfonts/fa-solid-900.woff2 | Bin 0 -> 156400 bytes .../webfonts/fa-v4compatibility.ttf | Bin 0 -> 10832 bytes .../webfonts/fa-v4compatibility.woff2 | Bin 0 -> 4792 bytes docs/deps/headroom-0.11.0/headroom.min.js | 7 + .../headroom-0.11.0/jQuery.headroom.min.js | 7 + .../search-1.0.0/autocomplete.jquery.min.js | 7 + docs/deps/search-1.0.0/fuse.min.js | 9 + docs/deps/search-1.0.0/mark.min.js | 7 + docs/index.html | 78 +- docs/katex-auto.js | 14 + docs/lightswitch.js | 85 + docs/news/index.html | 77 +- docs/pkgdown.js | 16 +- docs/pkgdown.yml | 7 +- docs/reference/authenticate_sb.html | 64 +- docs/reference/current_session.html | 58 +- docs/reference/folder_create.html | 90 +- docs/reference/identifier_exists.html | 82 +- docs/reference/index.html | 345 +- .../initialize_sciencebase_session.html | 90 +- docs/reference/is_logged_in.html | 64 +- docs/reference/item_append_files.html | 80 +- docs/reference/item_create.html | 82 +- docs/reference/item_exists.html | 72 +- docs/reference/item_file_download.html | 82 +- docs/reference/item_get.html | 98 +- docs/reference/item_get_fields.html | 68 +- docs/reference/item_get_parent.html | 97 +- docs/reference/item_list_children.html | 74 +- docs/reference/item_list_files.html | 94 +- docs/reference/item_move.html | 72 +- docs/reference/item_publish_cloud.html | 74 +- docs/reference/item_rename_files.html | 68 +- docs/reference/item_replace_files.html | 92 +- docs/reference/item_rm.html | 80 +- docs/reference/item_rm_files.html | 78 +- docs/reference/item_rm_recursive.html | 72 +- docs/reference/item_update.html | 78 +- docs/reference/item_update_identifier.html | 76 +- docs/reference/item_upload_cloud.html | 74 +- docs/reference/item_upload_create.html | 82 +- docs/reference/item_upsert.html | 76 +- docs/reference/items_create.html | 148 - docs/reference/items_rm.html | 117 - docs/reference/items_update.html | 120 - docs/reference/items_upsert.html | 129 - docs/reference/query_item_identifier.html | 74 +- docs/reference/query_item_in_folder.html | 72 +- docs/reference/query_items.html | 82 +- docs/reference/query_sb.html | 110 +- docs/reference/query_sb_datatype.html | 196 +- docs/reference/query_sb_date.html | 76 +- docs/reference/query_sb_doi.html | 72 +- docs/reference/query_sb_spatial.html | 108 +- docs/reference/query_sb_text.html | 212 +- docs/reference/readPassword.html | 52 +- docs/reference/sb_datatypes.html | 66 +- docs/reference/sb_ping.html | 62 +- docs/reference/sbitem.html | 142 +- docs/reference/sbtools-package.html | 88 +- docs/reference/sbtools_GET.html | 66 +- docs/reference/sbtools_POST.html | 69 +- docs/reference/sbtools_PUT.html | 68 +- docs/reference/session_age.html | 62 +- docs/reference/session_details.html | 62 +- docs/reference/session_expired.html | 52 +- docs/reference/session_renew.html | 78 +- docs/reference/session_validate.html | 58 +- docs/reference/set_endpoint.html | 64 +- docs/reference/user_id.html | 66 +- docs/search.json | 2 +- docs/sitemap.xml | 260 +- man/items_create.Rd | 62 - man/items_update.Rd | 36 - man/items_upsert.Rd | 44 - man/sbtools-package.Rd | 1 - sbtools.Rproj | 1 + tests/testthat/test-REST-helpers.R | 8 +- tests/testthat/test-REST.R | 7 +- tests/testthat/test-auth-item.R | 2 + tests/testthat/test-auth-item2.R | 31 +- 179 files changed, 12613 insertions(+), 4148 deletions(-) delete mode 100644 docs/deps/bootstrap-5.3.1/font.css delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVs9pbCIPrc.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/1Ptxg8zYS_SKggPN4iEgvnHyvveLxVvaorCIPrc.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/1adeadb2fe618c5ed46221f15e12b9c8.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/4iCs6KVjbNBYlgo6ew.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/4iCs6KVjbNBYlgoKfw7w.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/4iCv6KVjbNBYlgoCxCvTtA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/4iCv6KVjbNBYlgoCxCvjsGyL.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPZ7nsDQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xK1dSBYKcSV-LCoeQqfX1RYOo3qPa7j.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3aPA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7j.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rAkw.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vAkw.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ig4vwlxdo.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zAkw.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdo.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/CSR54z1Qlv-GDxkbKVQ_dFsvWNRevw.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/CSR54z1Qlv-GDxkbKVQ_dFsvaNA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/CSR64z1Qlv-GDxkbKVQ_TOQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/CSR64z1Qlv-GDxkbKVQ_fOAKSw.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/HI_diYsKILxRpg3hIP6sJ7fM7PqPMcMnZFqUwX28DBKXhM0.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/HI_diYsKILxRpg3hIP6sJ7fM7PqPMcMnZFqUwX28DMyQhM0.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/HI_jiYsKILxRpg3hIP6sJ7fM7PqlOPHYvDP_W9O7GQTTbI1rSg.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/HI_jiYsKILxRpg3hIP6sJ7fM7PqlOPHYvDP_W9O7GQTTsoprSg.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtZ6Ew9.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Ew9.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM70w9.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/KFOlCnqEu92Fr1MmEU9fBBc-.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/KFOlCnqEu92Fr1MmEU9vAA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/KFOlCnqEu92Fr1MmSU5fBBc-.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/KFOlCnqEu92Fr1MmSU5vAA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/KFOlCnqEu92Fr1MmWUlfBBc-.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/KFOlCnqEu92Fr1MmWUlvAA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/KFOmCnqEu92Fr1Me5g.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/KFOmCnqEu92Fr1Mu4mxM.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/QGYpz_kZZAGCONcK2A4bGOj8mNhL.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/S6u8w4BMUTPHjxsAXC-s.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/S6u8w4BMUTPHjxswWA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/S6u9w4BMUTPHh6UVSwiPHw.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/S6u9w4BMUTPHh6UVeww.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/S6u9w4BMUTPHh7USSwiPHw.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/S6u9w4BMUTPHh7USeww.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/S6uyw4BMUTPHjx4wWA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/S6uyw4BMUTPHvxo.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYMZs.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuI6fMZs.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfMZs.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/XRXI3I6Li01BKofiOc5wtlZ2di8HDFwmRTA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/XRXI3I6Li01BKofiOc5wtlZ2di8HDGUmRTA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/XRXI3I6Li01BKofiOc5wtlZ2di8HDLshRTA.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/a98f7a7574819ba83bec6279a2cecd95.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk0ZjaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk5hkWVAexg.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk5hkaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk8ZkWVAexg.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk8ZkaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0Rk_RkaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0RkxhjaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0RkyFjWVAexg.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memQYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWq8tWZ0Pw86hd0RkyFjaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1x4gaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsg-1y4k.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsgH1y4k.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgshZ1y4k.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsiH0B4gaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsiH0C4k.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0B4gaVQ.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjZ0C4k.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/memSYaGs126MiZpBA-UvWbX2vVnXBbObj2OVZyOOSr4dVJWUgsjr0C4k.woff delete mode 100644 docs/deps/bootstrap-5.3.1/fonts/q5uGsou0JOdh94bfvQlr.woff create mode 100644 docs/deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js create mode 100644 docs/deps/clipboard.js-2.0.11/clipboard.min.js create mode 100644 docs/deps/font-awesome-6.5.2/css/all.css create mode 100644 docs/deps/font-awesome-6.5.2/css/all.min.css create mode 100644 docs/deps/font-awesome-6.5.2/css/v4-shims.css create mode 100644 docs/deps/font-awesome-6.5.2/css/v4-shims.min.css create mode 100644 docs/deps/font-awesome-6.5.2/webfonts/fa-brands-400.ttf create mode 100644 docs/deps/font-awesome-6.5.2/webfonts/fa-brands-400.woff2 create mode 100644 docs/deps/font-awesome-6.5.2/webfonts/fa-regular-400.ttf create mode 100644 docs/deps/font-awesome-6.5.2/webfonts/fa-regular-400.woff2 create mode 100644 docs/deps/font-awesome-6.5.2/webfonts/fa-solid-900.ttf create mode 100644 docs/deps/font-awesome-6.5.2/webfonts/fa-solid-900.woff2 create mode 100644 docs/deps/font-awesome-6.5.2/webfonts/fa-v4compatibility.ttf create mode 100644 docs/deps/font-awesome-6.5.2/webfonts/fa-v4compatibility.woff2 create mode 100644 docs/deps/headroom-0.11.0/headroom.min.js create mode 100644 docs/deps/headroom-0.11.0/jQuery.headroom.min.js create mode 100644 docs/deps/search-1.0.0/autocomplete.jquery.min.js create mode 100644 docs/deps/search-1.0.0/fuse.min.js create mode 100644 docs/deps/search-1.0.0/mark.min.js create mode 100644 docs/katex-auto.js create mode 100644 docs/lightswitch.js delete mode 100644 docs/reference/items_create.html delete mode 100644 docs/reference/items_rm.html delete mode 100644 docs/reference/items_update.html delete mode 100644 docs/reference/items_upsert.html delete mode 100644 man/items_create.Rd delete mode 100644 man/items_update.Rd delete mode 100644 man/items_upsert.Rd diff --git a/DESCRIPTION b/DESCRIPTION index f73e700..3493a6f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -35,7 +35,7 @@ Suggests: License: CC0 URL: https://github.com/DOI-USGS/sbtools, https://doi-usgs.github.io/sbtools/ BugReports: https://github.com/DOI-USGS/sbtools/issues -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.2 VignetteBuilder: knitr Config/testthat/parallel: true Config/testthat/edition: 3 diff --git a/NAMESPACE b/NAMESPACE index 999fafa..9eac835 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -34,9 +34,6 @@ export(item_update_identifier) export(item_upload_cloud) export(item_upload_create) export(item_upsert) -export(items_create) -export(items_update) -export(items_upsert) export(query_item_identifier) export(query_item_in_folder) export(query_items) diff --git a/NEWS.md b/NEWS.md index 8985f3a..829d636 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# version 1.4.0 + +- removed `items_create()`, `items_upsert()`, and `items_update()` as they are no longer supported by sciencebase. +- Fixed bugs related to sciencebase updates. + # version 1.3.2 - `item_rm_files()` now uses cloud end point. #315 diff --git a/R/item_create.R b/R/item_create.R index c81ad4e..5810940 100644 --- a/R/item_create.R +++ b/R/item_create.R @@ -33,81 +33,6 @@ item_create = function(parent_id = user_id(), title, ..., info){ return(as.sbitem(content(r))) } -#' @title Create many new SB items -#' -#' @export -#' @param parent_id An \code{\link{sbitem}} object or character ScienceBase ID -#' corresponding to the parent item (folder). This must be of length 1 or more. -#' If length 1, then we recycle it for every item. -#' @param title Two or more titles for the new SB items -#' @param info (optional) list of metadata info for the new items. for each -#' item include a named list of variables -#' @param ... Additional parameters are passed on to \code{\link[httr]{GET}}, \code{\link[httr]{POST}}, -#' \code{\link[httr]{HEAD}}, \code{\link[httr]{PUT}}. -#' @return One or more objects of class \code{sbitem} in a list -#' @details The length of the \code{title} and \code{info} values must be the same -#' length - however, the \code{parent_id} can be of length 1 or equal to the length -#' of each of \code{title} and \code{info} parameters -#' -#' @description -#' A method to create multiple ScienceBase items with a single call and a single HTTP service -#' request. Can be useful for improving performance of creating a large number of items at once. -#' -#' @examples \dontrun{ -#' # helper function to make a random name -#' aname <- function() paste0(sample(letters, size = 5, replace = TRUE), collapse = "") -#' -#' # Create some items - by default we use your user ID -#' items_create(title = c(aname(), aname())) -#' -#' # add additional items in the info parameter - by default we use your user ID -#' items_create(title = c(aname(), aname()), -#' info = list( -#' list(contacts = list(list(name = "Suzy"))), -#' list(contacts = list(list(name = "Brandy"))) -#' ) -#' ) -#' -#' # another example with more information - by default we use your user ID -#' items_create(title = c(aname(), aname()), -#' info = list( -#' list(contacts = list(list(name = "Suzy"))), -#' list(contacts = list(list(name = "Brandy"))) -#' ) -#' ) -#' -#' # Pass an object of class sbitem -#' (x <- folder_create(user_id(), aname())) -#' items_create(x, title = c(aname(), aname())) -#' } -items_create <- function(parent_id = user_id(), title, ..., info = NULL) { - - if (!length(parent_id) > 0) stop("parent_id must be of length > 0", call. = FALSE) - if (length(parent_id) > 1) { - if (length(parent_id) != length(title)) { - stop("If parent_id length > 1, it must be of same length as title and info", call. = FALSE) - } - } - - item <- lapply(parent_id, as.sbitem) - item <- if (length(item) == 1) rep(item[[1]]$id, length(title)) else item[[1]]$id - body <- unname( - Map(function(x, y) { - list('parentId' = x, 'title' = y) - }, item, title - ) - ) - - if (!is.null(info)) { - body <- Map(function(a, b) c(a, b), body, info) - } - - res <- sbtools_POST(url = pkg.env$url_items, ..., - body = toJSON(body, auto_unbox = TRUE)) - - lapply(content(res), as.sbitem) -} - #' @title Create a folder #' @template item_with_parent #' @param name (character) the folder name diff --git a/R/item_update.R b/R/item_update.R index a1ed050..ef6eb76 100644 --- a/R/item_update.R +++ b/R/item_update.R @@ -34,53 +34,6 @@ item_update = function(sb_id, info, ...){ return(as.sbitem(content(r))) } -#' @title Update many SB items with new metadata -#' -#' @export -#' @param sb_id An \code{\link{sbitem}} object or a character ScienceBase ID -#' corresponding to the item -#' @param info list of metadata info (key-value pairs) to change on the item -#' @param ... Additional parameters are passed on to \code{\link[httr]{PUT}} -#' -#' @description -#' A method to update multiple ScienceBase items with a single call and a single HTTP service -#' request. Can be useful for improving performance of updating a large number of items at once. -#' -#' @return One or more objects of class \code{sbitem} in a list -#' @details If length of \code{sb_id} > 1, then length of \code{info} input must be the same -#' @examples \dontrun{ -#' # helper function to make a random name -#' aname <- function() paste0(sample(letters, size = 5, replace = TRUE), collapse = "") -#' -#' res <- items_create(user_id(), title = c(aname(), aname())) -#' out <- items_update(res, info = list( list(title = aname()), list(title = aname()) ) ) -#' vapply(out, "[[", "", "title") -#' } -items_update <- function(sb_id, info, ...){ - - if (length(sb_id) == 1) sb_id <- list(sb_id) - item <- vapply(sb_id, function(z) as.sbitem(z)$id, "") - invisible(lapply(info, is_info_list)) - - body <- unname( - Map(function(x, y) { - c(list('id' = x, null = "null"), y) - }, item, info - ) - ) - - res <- sbtools_PUT(url = pkg.env$url_items, - body = toJSON(body, auto_unbox = TRUE), - ..., accept_json()) - - # catch 405, which is, I think, expired login - if ('errors' %in% names(content(res))) { - stop(content(res)$errors$message, call. = FALSE) - } - - lapply(content(res), as.sbitem) -} - is_info_list <- function(x) { if (!is.list(x)) { stop('Info must be a list of name-value pairs that can be serialized into JSON', call. = FALSE) diff --git a/R/item_upsert.R b/R/item_upsert.R index 25b30ad..f194e77 100644 --- a/R/item_upsert.R +++ b/R/item_upsert.R @@ -41,64 +41,3 @@ item_upsert <- function(parent_id = user_id(), title = NULL, ..., as.sbitem(content(res)) } - -#' @title Upsert many SB items -#' -#' @description Either creates or updates (if items already exist) -#' -#' @export -#' @template item_with_parent -#' @param title The title of the new SB item -#' @param info (optional) list of metadata info for the new item -#' @return An object of class \code{sbitem} -#' @examples \dontrun{ -#' # helper function to make a random name -#' aname <- function() paste0(sample(letters, size = 5, replace = TRUE), collapse = "") -#' -#' # Create some item - by default we use your user ID -#' z1 <- item_create(title = aname()) -#' z2 <- item_create(title = aname()) -#' -#' # Upsert items -#' (x <- items_upsert(list(z1, z2), title = c(aname(), aname()))) -#' -#' # Call item_upsert again, updates this time -#' items_upsert(x, info = list( -#' contacts = list(list(name = "Suzy")) -#' ) -#' ) -#' } -items_upsert <- function(parent_id = user_id(), title = NULL, ..., - info = NULL){ - - if (!length(parent_id) > 0) stop("parent_id must be of length > 0", call. = FALSE) - if (length(parent_id) > 1) { - if (length(parent_id) != length(title)) { - stop("If parent_id length > 1, it must be of same length as title and info", call. = FALSE) - } - } - - item <- lapply(parent_id, as.sbitem) - ids <- if (length(item) < 2) rep(item$id, 2) else vapply(item, "[[", "", "id") - if (is.null(title)) { - message("title is NULL - re-using titles from input SB items") - title <- vapply(item, "[[", "", "title") - } - - body <- unname( - Map(function(x, y) { - list('parentId' = x, 'title' = y) - }, ids, title - ) - ) - - if (!is.null(info)) { - body <- Map(function(a, b) c(a, b), body, info) - } - - res <- sbtools_POST(url = paste0(pkg.env$url_items, "upsert"), - ..., body = toJSON(body, auto_unbox = TRUE)) - - lapply(content(res), as.sbitem) -} - diff --git a/R/sbtools-package.R b/R/sbtools-package.R index 9229532..7d46662 100644 --- a/R/sbtools-package.R +++ b/R/sbtools-package.R @@ -33,6 +33,5 @@ #' #' @name sbtools-package #' @aliases sbtools -#' @docType package #' @keywords package NULL diff --git a/_pkgdown.yml b/_pkgdown.yml index 0084815..8c8660e 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -21,9 +21,6 @@ reference: - '`sbitem`' - '`folder_create`' - '`identifier_exists`' - - '`items_create`' - - '`items_update`' - - '`items_upsert`' - '`item_append_files`' - '`item_create`' - '`item_exists`' diff --git a/docs/404.html b/docs/404.html index 4453005..981ddce 100644 --- a/docs/404.html +++ b/docs/404.html @@ -8,62 +8,47 @@ Page not found (404) • sbtools - - - - + + + Skip to contents - -