Name | datalad-publicneuro JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A DataLad extension that simplifies access to PublicnEUro datasets |
upload_time | 2025-07-24 09:49:49 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
publicneuro
datalad
git
git-annex
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# DataLad PublicnEUro extension
This repository contains a datalad extension that simplifies data download
from PublicnEUro collections.
# Installation
Install the extension via pip (a virtual environment is recommended):
```bash
> pip install datalad-publicneuro
```
# Usage
The extension provides the new git annex special remote `uncurl-publicneuro`. To use it, activate the special remote in your DataLad dataset:
```bash
git annex initremote uncurl-publicneuro type=external externaltype=uncurl-publicneuro encryption=none
```
The `uncurl-publicneuro` special remote handles URLs with the following structure (where `<dataset-id>` is the PublicnEUro ID of the dataset, e.g., `PN000001`, and `path` is the absolute path of a file within the dataset, e.g., `/README.txt`):
```
publicneuro+https://<dataset-id><path>
```
The following command adds a reference to a file in a PublicnEUro dataset and downloads the file content (here the file `/README.txt` of dataset `PN000001` is added with the local name `README.txt`):
```bash
> git annex addurl --file README.txt publicneuro+https://PN000001/README.txt
```
The command will prompt for credentials if no credentials are available yet.
After successful authentication, the file will be downloaded and added to the annex.
Valid credentials will be stored in DataLad's credential store and automatically used for subsequent `addurl`-commands.
## Credentials on Windows
The DataLad credential system prompts for credentials that are not yet known.
On Windows the special remote might freeze, when prompting for credentials.
There are two ways to avoid this:
1. Use `datalad credentials set` to set the credentials for the authentication realm before adding or "getting" publicneuro URLs.
The authentication realm for the PublicnEUro dataset `<dataset-id>` is `https://datacatalog.publicneuro.eu/<dataset-id>`.
For example, the authentication realm for the dataset `PN000001` is `https://datacatalog.publicneuro.eu/PN000001`.
2. Use the environment variables `PUBLICNEURO_USER_<dataset-id>` and `PUBLICNEURO_PASSWORD_<dataset-id>` to set the credentials.
For example, for the dataset `PN000001`, you can set the environment variables `PUBLICNEURO_USER_PN000001` and `PUBLICNEURO_PASSWORD_PN000001`.
If both environment variables are set, the special remote will use them instead of DataLad's credential system and will not prompt for credentials.
# Contributing
PRs and issues are very welcome! Please open an issue or a pull request if you find a bug or have a feature request.
Raw data
{
"_id": null,
"home_page": null,
"name": "datalad-publicneuro",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "PublicnEUro, datalad, git, git-annex",
"author": null,
"author_email": "The DataLad Team and Contributors <team@datalad.org>",
"download_url": null,
"platform": null,
"description": "# DataLad PublicnEUro extension\n\nThis repository contains a datalad extension that simplifies data download\nfrom PublicnEUro collections.\n\n\n# Installation\n\nInstall the extension via pip (a virtual environment is recommended):\n\n```bash\n> pip install datalad-publicneuro\n```\n\n# Usage\nThe extension provides the new git annex special remote `uncurl-publicneuro`. To use it, activate the special remote in your DataLad dataset:\n\n```bash\ngit annex initremote uncurl-publicneuro type=external externaltype=uncurl-publicneuro encryption=none\n```\n\nThe `uncurl-publicneuro` special remote handles URLs with the following structure (where `<dataset-id>` is the PublicnEUro ID of the dataset, e.g., `PN000001`, and `path` is the absolute path of a file within the dataset, e.g., `/README.txt`):\n\n```\npublicneuro+https://<dataset-id><path>\n```\n\nThe following command adds a reference to a file in a PublicnEUro dataset and downloads the file content (here the file `/README.txt` of dataset `PN000001` is added with the local name `README.txt`):\n\n```bash\n> git annex addurl --file README.txt publicneuro+https://PN000001/README.txt\n```\n\nThe command will prompt for credentials if no credentials are available yet.\nAfter successful authentication, the file will be downloaded and added to the annex.\nValid credentials will be stored in DataLad's credential store and automatically used for subsequent `addurl`-commands.\n\n## Credentials on Windows\n\nThe DataLad credential system prompts for credentials that are not yet known.\nOn Windows the special remote might freeze, when prompting for credentials.\nThere are two ways to avoid this:\n\n1. Use `datalad credentials set` to set the credentials for the authentication realm before adding or \"getting\" publicneuro URLs.\n The authentication realm for the PublicnEUro dataset `<dataset-id>` is `https://datacatalog.publicneuro.eu/<dataset-id>`.\n For example, the authentication realm for the dataset `PN000001` is `https://datacatalog.publicneuro.eu/PN000001`.\n\n2. Use the environment variables `PUBLICNEURO_USER_<dataset-id>` and `PUBLICNEURO_PASSWORD_<dataset-id>` to set the credentials.\n For example, for the dataset `PN000001`, you can set the environment variables `PUBLICNEURO_USER_PN000001` and `PUBLICNEURO_PASSWORD_PN000001`.\n If both environment variables are set, the special remote will use them instead of DataLad's credential system and will not prompt for credentials.\n\n\n# Contributing\n\nPRs and issues are very welcome! Please open an issue or a pull request if you find a bug or have a feature request.\n",
"bugtrack_url": null,
"license": null,
"summary": "A DataLad extension that simplifies access to PublicnEUro datasets",
"version": "0.1.0",
"project_urls": {
"Changelog": "https://github.com/datalad/datalad-publicneuro/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/datalad/datalad-publicneuro#readme",
"Homepage": "https://github.com/datalad/datalad-publicneuro",
"Issues": "https://github.com/datalad/datalad-publicneuro/issues",
"Source": "https://github.com/datalad/datalad-publicneuro"
},
"split_keywords": [
"publicneuro",
" datalad",
" git",
" git-annex"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e93148d2fce88f672bea93d2538ad2390807df55582af6ae981b6ededd2b3bbb",
"md5": "926b89cb3cab28d441bbf5ca6c6561eb",
"sha256": "5fe8ee3c782d76ca4af4255aa926e9d922d6ec5579be3e06c9ca8a318d101be9"
},
"downloads": -1,
"filename": "datalad_publicneuro-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "926b89cb3cab28d441bbf5ca6c6561eb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 10977,
"upload_time": "2025-07-24T09:49:49",
"upload_time_iso_8601": "2025-07-24T09:49:49.707381Z",
"url": "https://files.pythonhosted.org/packages/e9/31/48d2fce88f672bea93d2538ad2390807df55582af6ae981b6ededd2b3bbb/datalad_publicneuro-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-24 09:49:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "datalad",
"github_project": "datalad-publicneuro",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"appveyor": true,
"lcname": "datalad-publicneuro"
}