Skip to content

Commit c0a00f7

Browse files
committed
Merge branch 'master' into bcwu-deployhtmlexclude
2 parents 02d846c + 15af5ed commit c0a00f7

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
9+
### Changed
10+
11+
Update pip_freeze to use `pip freeze` since Connect filters for valid package paths in the backend and it no longer depends on the undocumented behavior of `pip list --format=freeze`. This reverts the change made in 1.5.2.
12+
713
## [1.12.1] - 2022-11-07
814

915
### Changed

rsconnect/environment.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@
4343

4444

4545
def MakeEnvironment(
46-
conda=None, # type: Optional[str]
47-
contents="", # type: Optional[str]
48-
error=None, # type: Optional[str]
49-
filename="", # type: Optional[str]
50-
locale="", # type: Optional[str]
51-
package_manager="", # type: Optional[str]
52-
pip=None, # type: Optional[str]
53-
python=None, # type: Optional[str]
54-
source=None, # type: Optional[str]
46+
conda: Optional[str] = None,
47+
contents: Optional[str] = None,
48+
error: Optional[str] = None,
49+
filename: Optional[str] = None,
50+
locale: Optional[str] = None,
51+
package_manager: Optional[str] = None,
52+
pip: Optional[str] = None,
53+
python: Optional[str] = None,
54+
source: Optional[str] = None,
5555
):
5656
return Environment(conda, contents, error, filename, locale, package_manager, pip, python, source)
5757

@@ -218,7 +218,7 @@ def pip_freeze():
218218
"""
219219
try:
220220
proc = subprocess.Popen(
221-
[sys.executable, "-m", "pip", "list", "--format=freeze"],
221+
[sys.executable, "-m", "pip", "freeze"],
222222
stdout=subprocess.PIPE,
223223
stderr=subprocess.PIPE,
224224
universal_newlines=True,

rsconnect/main.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ def _test_rstudio_creds(server: api.RStudioServer):
292292
@cli.command(
293293
short_help="Create an initial admin user to bootstrap a Connect instance.",
294294
help="Creates an initial admin user to bootstrap a Connect instance. Returns the provisionend API key.",
295+
no_args_is_help=True,
295296
)
296297
@click.option(
297298
"--server",
@@ -376,6 +377,7 @@ def bootstrap(
376377
"Specifying an existing nickname will cause its stored information to be replaced by what is given "
377378
"on the command line."
378379
),
380+
no_args_is_help=True,
379381
)
380382
@click.option("--name", "-n", required=True, help="The nickname of the Posit Connect server to deploy to.")
381383
@click.option(
@@ -505,6 +507,7 @@ def list_servers(verbose):
505507
"API key is valid for authentication for that server. It may also be used to verify that the "
506508
"information stored as a nickname is still valid."
507509
),
510+
no_args_is_help=True,
508511
)
509512
@server_args
510513
@cli_exception_handler
@@ -547,6 +550,7 @@ def details(name, server, api_key, insecure, cacert, verbose):
547550
"Remove the information about a Posit Connect server by nickname or URL. "
548551
"One of --name or --server is required."
549552
),
553+
no_args_is_help=True,
550554
)
551555
@click.option("--name", "-n", help="The nickname of the Posit Connect server to remove.")
552556
@click.option("--server", "-s", help="The URL of the Posit Connect server to remove.")
@@ -602,6 +606,7 @@ def _get_names_to_check(file_or_directory):
602606
"information about it"
603607
"s deployments are saved on a per-server basis."
604608
),
609+
no_args_is_help=True,
605610
)
606611
@click.argument("file", type=click.Path(exists=True, dir_okay=True, file_okay=True))
607612
def info(file):
@@ -724,6 +729,7 @@ def _warn_on_ignored_requirements(directory, requirements_file_name):
724729
"page. If the notebook is deployed as a static HTML page (--static), it cannot be scheduled or "
725730
"rerun on the Connect server."
726731
),
732+
no_args_is_help=True,
727733
)
728734
@server_args
729735
@content_args
@@ -845,6 +851,7 @@ def deploy_notebook(
845851
'file. The specified file must either be named "manifest.json" or '
846852
'refer to a directory that contains a file named "manifest.json".'
847853
),
854+
no_args_is_help=True,
848855
)
849856
@server_args
850857
@content_args
@@ -899,6 +906,7 @@ def deploy_manifest(
899906
"\n\n"
900907
"FILE_OR_DIRECTORY is the path to a single-file Quarto document or the directory containing a Quarto project."
901908
),
909+
no_args_is_help=True,
902910
)
903911
@server_args
904912
@content_args
@@ -1021,6 +1029,7 @@ def deploy_quarto(
10211029
name="html",
10221030
short_help="Deploy html content to Posit Connect.",
10231031
help=("Deploy an html file, or directory of html files with entrypoint, to Posit Connect."),
1032+
no_args_is_help=True,
10241033
)
10251034
@server_args
10261035
@content_args
@@ -1093,12 +1102,14 @@ def generate_deploy_python(app_mode, alias, min_version):
10931102
@deploy.command(
10941103
name=alias,
10951104
short_help="Deploy a {desc} to Posit Connect [v{version}+], Posit Cloud, or shinyapps.io.".format(
1096-
desc=app_mode.desc(), version=min_version
1105+
desc=app_mode.desc(),
1106+
version=min_version,
10971107
),
10981108
help=(
10991109
"Deploy a {desc} module to Posit Connect, Posit Cloud, or shinyapps.io (if supported by the platform). "
11001110
'The "directory" argument must refer to an existing directory that contains the application code.'
11011111
).format(desc=app_mode.desc()),
1112+
no_args_is_help=True,
11021113
)
11031114
@server_args
11041115
@content_args
@@ -1225,6 +1236,7 @@ def deploy_app(
12251236
name="other-content",
12261237
short_help="Describe deploying other content to Posit Connect.",
12271238
help="Show help on how to deploy other content to Posit Connect.",
1239+
no_args_is_help=True,
12281240
)
12291241
def deploy_help():
12301242
text = (

0 commit comments

Comments
 (0)