{"id":22302594,"url":"https://github.com/dataoneorg/figshare-import","last_synced_at":"2025-06-13T04:07:20.278Z","repository":{"id":244260648,"uuid":"814398515","full_name":"DataONEorg/figshare-import","owner":"DataONEorg","description":"Import and convert Figshare data and records to a DataONE repository","archived":false,"fork":false,"pushed_at":"2024-08-16T22:18:07.000Z","size":260,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-07T16:52:33.549Z","etag":null,"topics":["eml-metadata","figshare"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataONEorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-13T00:00:56.000Z","updated_at":"2024-08-16T22:18:11.000Z","dependencies_parsed_at":"2024-06-18T18:57:24.969Z","dependency_job_id":"2faea13a-fa96-4b13-9786-90da1b6431ae","html_url":"https://github.com/DataONEorg/figshare-import","commit_stats":null,"previous_names":["dataoneorg/figshare-import"],"tags_count":0,"template":false,"template_full_name":"DataONEorg/repo-template","purl":"pkg:github/DataONEorg/figshare-import","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Ffigshare-import","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Ffigshare-import/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Ffigshare-import/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Ffigshare-import/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataONEorg","download_url":"https://codeload.github.com/DataONEorg/figshare-import/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Ffigshare-import/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259578216,"owners_count":22879215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eml-metadata","figshare"],"created_at":"2024-12-03T18:39:59.137Z","updated_at":"2025-06-13T04:07:20.240Z","avatar_url":"https://github.com/DataONEorg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## figshare-import\n*Import and convert Figshare data and records to a DataONE repository*\n\n- **Authors**: Nesbitt, Ian ([http://orcid.org/0000-0001-5828-6070](http://orcid.org/0000-0001-5828-6070))\n- **License**: [Apache 2](http://opensource.org/licenses/Apache-2.0)\n- [Package source code on GitHub](https://github.com/DataONEorg/figshare-import)\n- [**Submit Bugs and feature requests**](https://github.com/DataONEorg/figshare-import/issues)\n- Contact us: support@dataone.org\n- [DataONE discussions](https://github.com/DataONEorg/dataone/discussions)\n\nThis software is meant to provide transport of data and translation of metadata from Figshare's json format to DataONE. It uses a custom translation method to convert to Ecological Metadata Language (EML) and upload data, metadata and resource maps to a DataONE Metacat instance. This workflow may be run during repository setup to move a large corpus from Figshare into a new DataONE repository.\n\nDataONE in general, and figshare-import in particular, are open source, community projects.  We [welcome contributions](./CONTRIBUTING.md) in many forms, including code, graphics, documentation, bug reports, testing, etc.  Use the [DataONE discussions](https://github.com/DataONEorg/dataone/discussions) to discuss these contributions with us.\n\n\n## Documentation\n\nDocumentation is a work in progress. All functions have reStructuredText docstrings and fairly well commented. In the future, a documentation site will be built into the repository.\n\n## Quickstart\n\n1. Set the config values in `~/.config/figshare-import/config.json`. Be mindful to run test operations only on staging servers prior to operating in a production environment:\n    ```json\n    {\n        \"rightsholder_orcid\": \"http://orcid.org/0000-0001-5828-6070\",\n        \"write_groups\": [\"CN=Test_Group,DC=dataone,DC=org\"],\n        \"changePermission_groups\": [\"CN=Test_Group,DC=dataone,DC=org\"],\n        \"nodeid\": \"urn:node:mnTestKNB\",\n        \"mnurl\": \"https://dev.nceas.ucsb.edu/knb/d1/mn/\",\n        \"cnurl\": \"https://cn-stage.test.dataone.org/cn\",\n        \"metadata_json\": \"~/figshare-import/article-details-test.json\",\n        \"data_root\": \"/mnt/ceph/repos/si/figshare/FIG-12/\"\n    }\n    ```\n2. Copy your DataONE authentication token to `~/.config/figshare-import/.d1_token`.\n3. Ensure the `article-details.json` file is in place and noted in the `\"metadata_json\"` field of the config file.\n4. Run the download script `./figshare_import/run_figshare_download.py`. This may take a while depending on how much content you are downloading from Figshare.\n5. Run the upload script `./figshare_import/run_data_upload.py`. This may also take a while. Operations will be significantly quicker when run within the same network as the Member Node you are uploading to.\n\n## Trouble shooting\n\n- Ensure all config values are correct. Triple-check them.\n- Ensure your DataONE authentication token is valid and current, and that you have at least write permission on the member node. DataONE tokens expire after 24 hours. Long-lived tokens can be obtained from DataONE support in appropriate cases.\n- Ensure Figshare content is public. Script will need to be modified to pass Figshare authentication credentials if you intend to download private datasets.\n- [File an issue](https://github.com/DataONEorg/figshare-import/issues). Be sure to describe your problem in detail, and post the content of your configuration file. **DO NOT** post your authentication token.\n\n## Usage Examples\n\nIn the terminal:\n\n```bash\n$ figsharedownload\n$ figshareimport\n```\n\nIn Python:\n\n```py\n\u003e\u003e\u003e from figshare_import.run_figshare_download import run_figshare_download\n\u003e\u003e\u003e from figshare_import.run_data_upload import run_data_upload\n\u003e\u003e\u003e run_figshare_download()\n\u003e\u003e\u003e run_data_upload()\n```\n\n## Development and testing\n\nThis is a python package built using the [Python Poetry](https://python-poetry.org) build tool.\n\nTo install locally, create a virtual environment for python 3.9+, \ninstall poetry, and then install or build the package with `poetry install` or `poetry build`, respectively.\n\nTo run unit tests, navigate to the root directory and run `python -m unittest test.py`.\nTests have not yet been fully implemented for this software.\n\n## License\n```\nCopyright [2024] [Regents of the University of California]\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n## Acknowledgements\nWork on this package was supported by:\n\n- DataONE Network\n\nAdditional support was provided for collaboration by the National Center for Ecological Analysis and Synthesis, a Center funded by the University of California, Santa Barbara, and the State of California.\n\n[![DataONE_footer](https://user-images.githubusercontent.com/6643222/162324180-b5cf0f5f-ae7a-4ca6-87c3-9733a2590634.png)](https://dataone.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataoneorg%2Ffigshare-import","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdataoneorg%2Ffigshare-import","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataoneorg%2Ffigshare-import/lists"}