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

git ignore .Rbuildignore #117

Merged
merged 1 commit into from
Feb 10, 2024
Merged

git ignore .Rbuildignore #117

merged 1 commit into from
Feb 10, 2024

Conversation

cjyetman
Copy link
Member

No description provided.

@cjyetman cjyetman merged commit 0dc1012 into main Feb 10, 2024
2 checks passed
@cjyetman cjyetman deleted the cjyetman-patch-2 branch February 10, 2024 10:18
@AlexAxthelm
Copy link
Collaborator

After the fact, but why are we ignoring this file?

@cjyetman
Copy link
Member Author

After the fact, but why are we ignoring this file?

so that it doesn't get accidentally pushed or suggest when making a commit... much like the .env and the .DS_Store files already in there

@jdhoffa
Copy link
Member

jdhoffa commented Feb 12, 2024

Yeah wait actually I agree with @AlexAxthelm , I don't think this file should be ignored... I reviewed this too hastily...

See: https://github.com/RMI-PACTA/r2dii.data/blob/main/.Rbuildignore

It gives critical info to someone trying to build the package. If we ignore it, then when someone tries to build the package from source, it will try to bundle in run_data_preparation.R etc.

@cjyetman
Copy link
Member Author

cjyetman commented Feb 12, 2024

This repo is not a R package, it's a workflow. Because I added the DESCRIPTION file, RStudio starts doing some annoying automatic stuff, like adding build options to the .Rproj file (which I just succumbed to so it would stop bothering me in #93). It also adds a .Rbuildignore file whenever you open the project, so this will prevent that or at least stop it from being annoying.

But seriously, are these the type of things worth debating?

@AlexAxthelm
Copy link
Collaborator

But seriously, are these the type of things worth debating?

For this one, since it's not actually an R package, probably not. but in general, the .Xignore files, such as .Rbuildignore and .dockerignore can have huge impacts on build processes. (I'm annoyed that they're dotfiles).

As a quick example, .dockerignore excludes files from the docker build context, which means that when you have a line like this (currently on main):

if you don't have a .dockerignore defined, everything in the build context gets pulled into the image, which means that if you happen to have a copy of the rawdata inputs and outputs in the same directory, those get added. As does the .git directory, meaning that ever time you commit, you're invalidating the cache (and these problems multiply each other).

@cjyetman cjyetman mentioned this pull request Feb 12, 2024
@cjyetman
Copy link
Member Author

But seriously, are these the type of things worth debating?

For this one, since it's not actually an R package, probably not. but in general, the .Xignore files, such as .Rbuildignore and .dockerignore can have huge impacts on build processes. (I'm annoyed that they're dotfiles).

As a quick example, .dockerignore excludes files from the docker build context, which means that when you have a line like this (currently on main):

if you don't have a .dockerignore defined, everything in the build context gets pulled into the image, which means that if you happen to have a copy of the rawdata inputs and outputs in the same directory, those get added. As does the .git directory, meaning that ever time you commit, you're invalidating the cache (and these problems multiply each other).

I would very much support adding a .dockerignore file. I will open an issue and tag you in it, because honestly I don't know too much about it. The .Rbuildignore file I think is rather inconsequential in this repo.

cjyetman added a commit to RMI-PACTA/workflow.transition.monitor that referenced this pull request Feb 23, 2024
As with RMI-PACTA/workflow.data.preparation#93
and RMI-PACTA/workflow.data.preparation#117,
having a `DESCRIPTION` file in the repo causes RStudio to add/modify
`.Rbuildignore` and `workflow.transition.monitor.Rproj`. This PR
appeases RStudio so we don't fight against it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants