Skip to content

Commit c62e6d7

Browse files
committed
Merge branch 'master' into zack-jwt-env-var-changelog
2 parents 2880d87 + 4bdb37c commit c62e6d7

File tree

4 files changed

+38
-19
lines changed

4 files changed

+38
-19
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@ 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]
7+
## [1.13.0] - 2022-12-02
88

9+
### Added
910
- When running rsconnect bootstrap, you can now specify the jwt secret using the CONNECT_BOOTSTRAP_SECRETKEY environment variable.
1011

12+
### Changed
13+
- 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.
14+
15+
- Renamed the deploy_html `excludes` flag to `exclude` for consistency with other deploy commands.
16+
1117
## [1.12.1] - 2022-11-07
1218

1319
### Changed

rsconnect/bundle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ def write_manifest(
190190
nb_name: str,
191191
environment: Environment,
192192
output_dir: str,
193-
hide_all_input: bool,
194-
hide_tagged_input: bool,
193+
hide_all_input: bool = False,
194+
hide_tagged_input: bool = False,
195195
image: str = None,
196196
) -> typing.Tuple[list, list]:
197197
"""Create a manifest for source publishing the specified notebook.

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: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,9 @@ def cli(future):
245245
certificate file to use for TLS. The last two items are only relevant if the
246246
URL specifies the "https" protocol.
247247
248-
For RStudio Cloud and shinyapps.io, the information needed to connect includes
249-
the account, auth token, auth secret, and server ('rstudio.cloud' or 'shinyapps.io').
248+
For RStudio Cloud, the information needed to connect includes the auth token, auth
249+
secret, and server ('rstudio.cloud'). For shinyapps.io, the auth token, auth secret,
250+
server ('shinyapps.io'), and account are needed.
250251
"""
251252
global future_enabled
252253
future_enabled = future
@@ -292,6 +293,7 @@ def _test_rstudio_creds(server: api.RStudioServer):
292293
@cli.command(
293294
short_help="Create an initial admin user to bootstrap a Connect instance.",
294295
help="Creates an initial admin user to bootstrap a Connect instance. Returns the provisionend API key.",
296+
no_args_is_help=True,
295297
)
296298
@click.option(
297299
"--server",
@@ -376,6 +378,7 @@ def bootstrap(
376378
"Specifying an existing nickname will cause its stored information to be replaced by what is given "
377379
"on the command line."
378380
),
381+
no_args_is_help=True,
379382
)
380383
@click.option("--name", "-n", required=True, help="The nickname of the Posit Connect server to deploy to.")
381384
@click.option(
@@ -505,6 +508,7 @@ def list_servers(verbose):
505508
"API key is valid for authentication for that server. It may also be used to verify that the "
506509
"information stored as a nickname is still valid."
507510
),
511+
no_args_is_help=True,
508512
)
509513
@server_args
510514
@cli_exception_handler
@@ -547,6 +551,7 @@ def details(name, server, api_key, insecure, cacert, verbose):
547551
"Remove the information about a Posit Connect server by nickname or URL. "
548552
"One of --name or --server is required."
549553
),
554+
no_args_is_help=True,
550555
)
551556
@click.option("--name", "-n", help="The nickname of the Posit Connect server to remove.")
552557
@click.option("--server", "-s", help="The URL of the Posit Connect server to remove.")
@@ -602,6 +607,7 @@ def _get_names_to_check(file_or_directory):
602607
"information about it"
603608
"s deployments are saved on a per-server basis."
604609
),
610+
no_args_is_help=True,
605611
)
606612
@click.argument("file", type=click.Path(exists=True, dir_okay=True, file_okay=True))
607613
def info(file):
@@ -724,6 +730,7 @@ def _warn_on_ignored_requirements(directory, requirements_file_name):
724730
"page. If the notebook is deployed as a static HTML page (--static), it cannot be scheduled or "
725731
"rerun on the Connect server."
726732
),
733+
no_args_is_help=True,
727734
)
728735
@server_args
729736
@content_args
@@ -845,6 +852,7 @@ def deploy_notebook(
845852
'file. The specified file must either be named "manifest.json" or '
846853
'refer to a directory that contains a file named "manifest.json".'
847854
),
855+
no_args_is_help=True,
848856
)
849857
@server_args
850858
@content_args
@@ -899,6 +907,7 @@ def deploy_manifest(
899907
"\n\n"
900908
"FILE_OR_DIRECTORY is the path to a single-file Quarto document or the directory containing a Quarto project."
901909
),
910+
no_args_is_help=True,
902911
)
903912
@server_args
904913
@content_args
@@ -1021,6 +1030,7 @@ def deploy_quarto(
10211030
name="html",
10221031
short_help="Deploy html content to Posit Connect.",
10231032
help=("Deploy an html file, or directory of html files with entrypoint, to Posit Connect."),
1033+
no_args_is_help=True,
10241034
)
10251035
@server_args
10261036
@content_args
@@ -1030,7 +1040,7 @@ def deploy_quarto(
10301040
help=("The name of the html file that is the landing page."),
10311041
)
10321042
@click.option(
1033-
"--excludes",
1043+
"--exclude",
10341044
"-x",
10351045
multiple=True,
10361046
help=(
@@ -1051,7 +1061,7 @@ def deploy_html(
10511061
path: str = None,
10521062
entrypoint: str = None,
10531063
extra_files=None,
1054-
excludes=None,
1064+
exclude=None,
10551065
title: str = None,
10561066
env_vars: typing.Dict[str, str] = None,
10571067
verbose: bool = False,
@@ -1079,7 +1089,7 @@ def deploy_html(
10791089
path,
10801090
entrypoint,
10811091
extra_files,
1082-
excludes,
1092+
exclude,
10831093
)
10841094
.deploy_bundle()
10851095
.save_deployed_info()
@@ -1092,12 +1102,14 @@ def generate_deploy_python(app_mode, alias, min_version):
10921102
@deploy.command(
10931103
name=alias,
10941104
short_help="Deploy a {desc} to Posit Connect [v{version}+], Posit Cloud, or shinyapps.io.".format(
1095-
desc=app_mode.desc(), version=min_version
1105+
desc=app_mode.desc(),
1106+
version=min_version,
10961107
),
10971108
help=(
10981109
"Deploy a {desc} module to Posit Connect, Posit Cloud, or shinyapps.io (if supported by the platform). "
10991110
'The "directory" argument must refer to an existing directory that contains the application code.'
11001111
).format(desc=app_mode.desc()),
1112+
no_args_is_help=True,
11011113
)
11021114
@server_args
11031115
@content_args
@@ -1224,6 +1236,7 @@ def deploy_app(
12241236
name="other-content",
12251237
short_help="Describe deploying other content to Posit Connect.",
12261238
help="Show help on how to deploy other content to Posit Connect.",
1239+
no_args_is_help=True,
12271240
)
12281241
def deploy_help():
12291242
text = (

0 commit comments

Comments
 (0)