Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Datalad-free alternative for TemplateFlow #7

Merged
merged 6 commits into from
Mar 4, 2019

Conversation

oesteban
Copy link
Member

@oesteban oesteban commented Mar 4, 2019

This PR provides an alternative for systems without datalad to pull data from TemplateFlow, using lazy loading.

A new skeleton file containing metadata and empty-files replacing datalad symlinks is now found at
templateflow/conf/templateflow-skel.zip. If the repository has not been initiated and datalad is not installed, then this skeleton is unzipped.

When the user requests a file via pybids, the file size is checked. If it is zero (i.e., not a symlink and no content), the file is pulled from an S3 bucket (lazy loading).

The S3 bucket is easily updated with git annex export.

With every build the skeleton file is updated (based off the datalad repository pulled down in a previous step of the build) and added as an artifact to the CircleCI build.
If the commit is a tag commit, then the skeleton file is updated before releasing in the deploy_pypi build.

This PR provides an alternative for systems without datalad to pull
data from TemplateFlow.

A new skeleton file containing metadata and empty-files replacing
datalad symlinks is now found at
``templateflow/conf/templateflow-skel.zip``. If the repository has not
been initiated and datalad is not installed, then this skeleton is
unzipped.

When the user requests a file via pybids, the file size is checked. If
it is zero (i.e., not a symlink and no content), the file is pulled from
an S3 bucket.

The S3 bucket is easily updated with ``git annex export``.

With every build the skeleton file is updated (based off the datalad
repository pulled down in a previous step of the build) and added as
an artifact to the CircleCI build.
If the commit is a tag commit, then the skeleton file is updated
before releasing in the ``deploy_pypi`` build.

Closes #5.
@oesteban oesteban added the enhancement New feature or request label Mar 4, 2019
Copy link
Contributor

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine overall. Minor comments.

templateflow/api.py Show resolved Hide resolved
.circleci/config.yml Show resolved Hide resolved
@oesteban
Copy link
Member Author

oesteban commented Mar 4, 2019

I'll go ahead and check whether the deployment build also works as expected.

@oesteban oesteban merged commit 3ae2bdb into master Mar 4, 2019
@oesteban oesteban deleted the enh/datalad-alternative branch March 4, 2019 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants