Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ exclude = .git,.venv,.venv2,.venv3,__pycache__,.cache
extend_ignore = E203,E231,E302

# vim:filetype=dosini

per-file-ignores =
tests/test_metadata.py: E501
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2021.08.0 or later. Use `rsconnect deploy quarto` to deploy, or `rsconnect
write-manifest quarto` to create a manifest file.

- An `image` command line option has been added to the `write-manifest` and
`deploy` commands to specify the target image to be used on the RStudio Connect
server during content execution. This is only supported for the `api`, `bokeh`, `dash`,
`fastapi`, `notebook`, `quarto` and `streamlit` sub-commands. It is only
applicable if the RStudio Connect server is configured to use off-host execution.


## [1.7.1] - 2022-02-15

### Added
Expand Down
45 changes: 43 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,51 @@
This project aims to uphold Python [community norms](https://www.python.org/psf/conduct/) and make use of [recommended
tooling](https://packaging.python.org/guides/tool-recommendations/).

To get started, you'll want to:
- clone the repo into a project directory
- setup a virtual 3.5+ python environment in the project directory
- activate that virtual environment
- install the dependencies
- validate your build environment with some sample commands

While there are several different tools and techniques you can use to accomplish the
steps listed above, the following is an example which uses `venv`.

```bash
# Clone the repo
cd ~/dev
git clone https://github.com/rstudio/rsconnect-python.git
cd rsconnect-python
# Setup a virtual python environment
python3 -m venv .venv
# Activate the virtual environment
source .venv/bin/activate
# install our requirements into the virtual environment
pip install -r requirements.txt
# install rsconnect-python with a symbolic link to the locations repository,
# meaning any changes to code in there will automatically be reflected
pip install -e ./
```

## Workflow

The [`test` job in the default GitHub Actions workflow](.github/workflows/main.yml) reflects a typical set of steps for
building and testing.
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.

Typical makefile targets are:

```bash
# verify code formats are correct
make fmt
# lint the codebase
make lint
# run the tests (w/ python 3.8)
make test
# run the tests with all versions of python
make all-tests
```

As another example, the [`test` job in the default GitHub Actions workflow](.github/workflows/main.yml)
uses some of these targets during the CI for building and testing.

## Proposing Change

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ deps-%:
lint-%:
$(RUNNER) 'black --check --diff rsconnect/'
$(RUNNER) 'flake8 rsconnect/'
$(RUNNER) 'flake8 tests/'
$(RUNNER) 'mypy -p rsconnect'

.PHONY: lint-3.5
Expand Down
Loading