-
Notifications
You must be signed in to change notification settings - Fork 0
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 DESCRIPTION file #231
add DESCRIPTION file #231
Conversation
Hmmm NB but this makes me a bit nervous. Are you planning to convert this into an R package? Relates to RMI/practices#2 |
This is towards the suggestion by @AlexAxthelm (can't remember exactly where) to use some standard R package structure even in our "workflow" repos when they contain R code |
Hmmm... well I would much prefer if we postpone this until after tomorrow's Dev Hangouts, where we can brainstorm and hash out this Part of the reason we made the split in the first place was that Are we cool to pause this and discuss it next DevHangouts? See proposed next steps here: RMI/practices#2 (comment) |
Then, once we're all on the same page, we can proceed? |
sure, but see for example https://github.com/RMI-PACTA/workflow.pacta for this setup in use |
I saw it there as well, and it made me nervous there as well XD |
Oddly, |
I'm not against it honestly! Just lots of signs pointing towards "we should discuss and document the differences between Who knows, maybe we just decide that everything we code must be an R package and leave it at that ¯_(ツ)_/¯ |
opened an issue with {renv} |
wow, and it's resolved already! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on our parallel discussion:
(which was more or less "we sort of know what pacta.*
is but not really what workflow.*
is)
I approve this. I don't think it makes sense to be restrictive on a workflow.*
since we can't even define it :-D
So, adding a DESCRIPTION file here breaks our Dockerfile because it uses So to recap... my preferred solution would be:
|
Could we not just scrap using # Copy DESCRIPTION
COPY DESCRIPTION /workflow.transition.monitor/DESCRIPTION
# install R package dependencies
RUN Rscript -e "pak::local_install_deps(root = '/workflow.transition.monitor');" |
Or sorry, am I misunderstanding, and you would prefer to not do it that way, and to instead use I'm just a little confused haha |
NB: this is pretty much exactly what's happening with the newer Docker images i'm maintaining |
Yeah I believe that's the easiest way |
Interesting... I tried with |
Also note that |
At least in the current setup here,
So if |
add-DESCRIPTION > pak::local_deps()
Error:
! ! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* local::.:
* Can't install dependency pacta.executive.summary
* Can't install dependency pacta.portfolio.allocate
* Can't install dependency pacta.portfolio.audit
* Can't install dependency pacta.portfolio.import
* Can't install dependency pacta.portfolio.report
* Can't install dependency pacta.portfolio.utils
* pacta.executive.summary: Can't find package called pacta.executive.summary, pacta.portfolio.allocate, pacta.portfolio.audit, pacta.portfolio.import, pacta.portfolio.report, pacta.portfolio.utils.
* pacta.portfolio.allocate: Can't find package called pacta.executive.summary, pacta.portfolio.allocate, pacta.portfolio.audit, pacta.portfolio.import, pacta.portfolio.report, pacta.portfolio.utils.
* pacta.portfolio.audit: Can't find package called pacta.executive.summary, pacta.portfolio.allocate, pacta.portfolio.audit, pacta.portfolio.import, pacta.portfolio.report, pacta.portfolio.utils.
* pacta.portfolio.import: Can't find package called pacta.executive.summary, pacta.portfolio.allocate, pacta.portfolio.audit, pacta.portfolio.import, pacta.portfolio.report, pacta.portfolio.utils.
* pacta.portfolio.report: Can't find package called pacta.executive.summary, pacta.portfolio.allocate, pacta.portfolio.audit, pacta.portfolio.import, pacta.portfolio.report, pacta.portfolio.utils.
* pacta.portfolio.utils: Can't find package called pacta.executive.summary, pacta.portfolio.allocate, pacta.portfolio.audit, pacta.portfolio.import, pacta.portfolio.report, pacta.portfolio.utils.
Run `rlang::last_trace()` to see where the error occurred. |
ah, maybe I need to add the Remotes to DESCRIPTION first... |
aargh! Docker build still fails. I think I've seen this kind of thing before... |
Docker image from this PR (d3b7773) created
|
@jdhoffa and @AlexAxthelm I got this to work (finally), at least the Docker image build successfully, so could you take another close look at the diff please? After all that, I feel like I need to test the Docker image too, which I'll do offline tomorrow. |
Do note that if you do this, |
Yeah... in the Dockerfile is the only place |
I'm not sure how |
Remotes: | ||
RMI-PACTA/pacta.executive.summary, | ||
RMI-PACTA/pacta.portfolio.allocate, | ||
RMI-PACTA/pacta.portfolio.audit, | ||
RMI-PACTA/pacta.portfolio.import, | ||
RMI-PACTA/pacta.portfolio.report, | ||
RMI-PACTA/pacta.portfolio.utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB (more of a question really, and not something we should solve in this PR): but I wonder if it would be possible/ interesting/ useful to just add or specify our R-universe instance as a package repository? so install from CRAN or RMI R-Universe. that way we don't need to jump through weird Remotes loops, the Dockerfile just knows that anything in our R-universe is valid to install. (obviously we would still need to sort out how to specify what version to install, but I think that is doable)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is another cool possibility with r-universe (adding r-universe as one of your CRAN mirrors), but... I'm not sure if/how it works specifying a pkg in DESCRIPTION (probably still have to use Remotes:
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, really? I would guess that if functions as a CRAN mirror, then install.packages()
would know to look there, meaning packages installed via DESCRIPTION
would automatically be found without Remotes
...
(I would guess that, I have no idea if that's the case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue created here: RMI-PACTA/rmi-pacta.r-universe.dev#3
workflow_pkgs <- pak::local_deps(root = '$WORKFLOW_DIR')[['ref']]; \ | ||
workflow_pkgs <- grep('^RMI-PACTA[/]|^local::.$', workflow_pkgs, value = TRUE, invert = TRUE); \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks awesome! Exactly what I had in mind :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having to add ^local::.$
to prevent it from trying to install the "local package" is a bit weird, but yeah, otherwise works pretty good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's part of what my initial hesitancy was with adding a DESCRIPTION
file to the workflow.*
repo in the first place.
You are essentially stating "this is an R package", so of course most tools will think of it now as a package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pak
starts the dependency tree at the root package (every package is dependent on itself, it seems).
This PR does all the appropriate things related to adding a license to the repo, including: - adding a LICENSE file - adding a LICENSE.md file - properly specifying the license in the DESCRIPTION file depends on #231
@jdhoffa I finally found the suggestion I was referring to: RMI-PACTA/workflow.data.preparation#77 |
No description provided.