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

Add plugin-level file exclusion filter? #11

Open
zstumgoren opened this issue Mar 13, 2017 · 8 comments
Open

Add plugin-level file exclusion filter? #11

zstumgoren opened this issue Mar 13, 2017 · 8 comments
Milestone

Comments

@zstumgoren
Copy link
Contributor

Should we add support for plugin-level file excludes? These would be passed through using the --exclude flag (#6) for the underlying aws s3 sync command.

Mac OS's tendency to litter directories with the .DS_Store file is the immediate motivation for this, although it could be useful in other scenarios.

@michelleminkoff
Copy link
Member

I really like this idea -- the .DS_Store always really annoys me, but it strikes me there might be other large files we don't want to move up and down -- could see large raw video being data at some point and mucking up the upload/download. But the .DS_Store problem in particular is ugh.

@michelleminkoff
Copy link
Member

Follow-up use case I just noticed -- excluding the files that start with ~ that Excel generates while files are being used. I notice if I push while any spreadsheets are open (which is common workflow for me), these temp files are uploaded.)

@larryfenn
Copy link
Contributor

larryfenn commented Mar 16, 2017

In the same vein:

  • Emacs autosave: #filename#
  • Emacs file lock symlinks: .#filename
  • Emacs autobackup: filename~
  • Dropbox: .dropbox

@larryfenn
Copy link
Contributor

@zstumgoren
Copy link
Contributor Author

Based on some off-line discussions, we seem to have agreement on the following implementation:

  • Update datakit-data to automatically exclude any patterns specified in a project-level .dkitignore file. This would pass the flags to the underlying aws s3 sync utility's --exclude filter.
  • Update our team-specific project templates (e.g. cookiecutter-r-project to include a .dkitignore file

We didn't discuss, but could also provide a flag to data:init that would supply a default .dkitignore with some generally useful patterns (e.g. .DS_Store, vim and emacs files, etc.). This way non-AP users of the software who may not be using cookiecutter and/or datakit-project plugin would have an easy way to bootstrap the file.

/cc @michelleminkoff @larryfenn @tthibo @myersjustinc going to remove Question label on this issue and include as deliverable for version 0.2.0

@myersjustinc
Copy link

Does the dkit phrase appear anywhere else in Datakit or its config files? Seems like .datakitignore (or even .datakit-ignore) would be more consistent. Sure, it's a bit of a mouthful, but it's a hidden file—so you'd really only have to deal with it once per project, if even that often. (More likely, you'd only deal with it if you were developing project templates.)

@zstumgoren
Copy link
Contributor Author

zstumgoren commented Mar 20, 2017

dkit is used in top-level package namespace, but .datakit-ignore works fine.

@zstumgoren
Copy link
Contributor Author

@myersjustinc Woops. actually forgot that we're not using dkit in package name anymore. either way, let's go with full name in dotfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants