Skip to content

Commit 0ace847

Browse files
authored
Merge pull request #245 from rstudio/sagerb-add-ability-to-specify-target-image
Add image to manifests and CLIs
2 parents a3e2e62 + 3348021 commit 0ace847

File tree

12 files changed

+1034
-493
lines changed

12 files changed

+1034
-493
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ exclude = .git,.venv,.venv2,.venv3,__pycache__,.cache
1515
extend_ignore = E203,E231,E302
1616

1717
# vim:filetype=dosini
18+
19+
per-file-ignores =
20+
tests/test_metadata.py: E501

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717
2021.08.0 or later. Use `rsconnect deploy quarto` to deploy, or `rsconnect
1818
write-manifest quarto` to create a manifest file.
1919

20+
- An `image` command line option has been added to the `write-manifest` and
21+
`deploy` commands to specify the target image to be used on the RStudio Connect
22+
server during content execution. This is only supported for the `api`, `bokeh`, `dash`,
23+
`fastapi`, `notebook`, `quarto` and `streamlit` sub-commands. It is only
24+
applicable if the RStudio Connect server is configured to use off-host execution.
25+
26+
2027
## [1.7.1] - 2022-02-15
2128

2229
### Added

CONTRIBUTING.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,51 @@
33
This project aims to uphold Python [community norms](https://www.python.org/psf/conduct/) and make use of [recommended
44
tooling](https://packaging.python.org/guides/tool-recommendations/).
55

6+
To get started, you'll want to:
7+
- clone the repo into a project directory
8+
- setup a virtual 3.5+ python environment in the project directory
9+
- activate that virtual environment
10+
- install the dependencies
11+
- validate your build environment with some sample commands
12+
13+
While there are several different tools and techniques you can use to accomplish the
14+
steps listed above, the following is an example which uses `venv`.
15+
16+
```bash
17+
# Clone the repo
18+
cd ~/dev
19+
git clone https://github.com/rstudio/rsconnect-python.git
20+
cd rsconnect-python
21+
# Setup a virtual python environment
22+
python3 -m venv .venv
23+
# Activate the virtual environment
24+
source .venv/bin/activate
25+
# install our requirements into the virtual environment
26+
pip install -r requirements.txt
27+
# install rsconnect-python with a symbolic link to the locations repository,
28+
# meaning any changes to code in there will automatically be reflected
29+
pip install -e ./
30+
```
31+
632
## Workflow
733

8-
The [`test` job in the default GitHub Actions workflow](.github/workflows/main.yml) reflects a typical set of steps for
9-
building and testing.
34+
With your venv setup and active, as described previously, running rsconnect-python using your codebase is as simple as running the `rsconnect` command from the terminal.
35+
36+
Typical makefile targets are:
37+
38+
```bash
39+
# verify code formats are correct
40+
make fmt
41+
# lint the codebase
42+
make lint
43+
# run the tests (w/ python 3.8)
44+
make test
45+
# run the tests with all versions of python
46+
make all-tests
47+
```
48+
49+
As another example, the [`test` job in the default GitHub Actions workflow](.github/workflows/main.yml)
50+
uses some of these targets during the CI for building and testing.
1051

1152
## Proposing Change
1253

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ deps-%:
8080
lint-%:
8181
$(RUNNER) 'black --check --diff rsconnect/'
8282
$(RUNNER) 'flake8 rsconnect/'
83+
$(RUNNER) 'flake8 tests/'
8384
$(RUNNER) 'mypy -p rsconnect'
8485

8586
.PHONY: lint-3.5

0 commit comments

Comments
 (0)