Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Standardize single doc deployment#698

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hadley merged 12 commits intomainfromstandardizeSingleDocDeployment
Feb 24, 2023
Merged

Conversation

@hadley
Copy link
Member

Extract outstandardizeSingleDocDeployment() and use it indeployDoc() anddeployApp().

I've also documented this feature ofdeployApp(), which lead to some other minor doc changes since other function inherited fromdeployApp(). This does raise a question of whether these functions should also support anappDir that's actually a path to a document.

R/deployApp.R Outdated
if (dirExists(appDir)) {
# ok
}elseif (file.exists(appDir)&& isStaticFile(appDir)) {
doc<- standardizeSingleDocDeployment(appDir)
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

One thing that's slightly unappealing about this approach is that we use a different approach to determiningappFiles depending on whether you dodeployApp("foo.Rmd") ordeployApp(appPrimaryDoc = "foo.Rmd"). An alternative approach would be to add anappPrimaryDoc argument toappStandardizeFiles() and callrmarkdown::find_external_dependencies() there whenappPrimaryDoc is supplied.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Another approach, since this never appears to have been documented, would be to deprecate this useappDir and tell folks to calldeployDoc() instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting. I forgot about this difference.

# Uses the default appDir=getwd() and enumerates all files in the directory for bundlingdeployApp(appPrimaryDoc="foo.Rmd")# Uses the foo.Rmd to identify the dependencies of the document; only those are bundleddeployDoc("foo.Rmd")

The existingdeployApp("foo.Rmd") feels like a convenience, but we should nudge folks towards usingdeployDoc should they provide a file.

Added in:#16, and before the notion of a "primary doc".

I'm uneasy about the automatic use ofrmarkdown::find_external_dependencies. On the one hand, it does feel like it will produce the set of files that most folks want to include -- directory explosion is often too greedy. On the other hand, its use would add to the "magic" that happens in the "lower-level"deployApp. Its inclusion could suddenly force more folks to compute their ownappFiles.

Copy link
Contributor

Choose a reason for hiding this comment

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

Deprecating thedeployApp -> deployDoc -> deployApp workflow feels like the right path.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yeah, I think the fundamentally different mechanism of file discovery suggests that this is adeployDoc() feature, and we should deprecate this old path.

R/deployApp.R Outdated
if (dirExists(appDir)) {
# ok
}elseif (file.exists(appDir)&& isStaticFile(appDir)) {
doc<- standardizeSingleDocDeployment(appDir)
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting. I forgot about this difference.

# Uses the default appDir=getwd() and enumerates all files in the directory for bundlingdeployApp(appPrimaryDoc="foo.Rmd")# Uses the foo.Rmd to identify the dependencies of the document; only those are bundleddeployDoc("foo.Rmd")

The existingdeployApp("foo.Rmd") feels like a convenience, but we should nudge folks towards usingdeployDoc should they provide a file.

Added in:#16, and before the notion of a "primary doc".

I'm uneasy about the automatic use ofrmarkdown::find_external_dependencies. On the one hand, it does feel like it will produce the set of files that most folks want to include -- directory explosion is often too greedy. On the other hand, its use would add to the "magic" that happens in the "lower-level"deployApp. Its inclusion could suddenly force more folks to compute their ownappFiles.

R/deployApp.R Outdated
if (dirExists(appDir)) {
# ok
}elseif (file.exists(appDir)&& isStaticFile(appDir)) {
doc<- standardizeSingleDocDeployment(appDir)
Copy link
Contributor

Choose a reason for hiding this comment

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

Deprecating thedeployApp -> deployDoc -> deployApp workflow feels like the right path.

@hadleyhadley merged commitbb2faf2 intomainFeb 24, 2023
@hadleyhadley deleted the standardizeSingleDocDeployment branchFebruary 24, 2023 17:03
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@aronatkinsaronatkinsaronatkins approved these changes

@toph-allentoph-allenAwaiting requested review from toph-allen

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@hadley@aronatkins

[8]ページ先頭

©2009-2025 Movatter.jp