Skip to content

Commit bb003ca

Browse files
committed
Merge branch 'master' into mm-verify-deployments
2 parents d987d1a + a3a0a00 commit bb003ca

File tree

21 files changed

+146
-158
lines changed

21 files changed

+146
-158
lines changed

.flake8

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,19 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
name: test (py${{ matrix.python-version }} ${{ matrix.os }})
2828
steps:
29-
- uses: actions/checkout@v2
30-
- run: git fetch --prune --unshallow
29+
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3134
- uses: actions/setup-python@v2
3235
with:
3336
python-version: ${{ matrix.python-version }}
34-
- run: pip install -r requirements.txt
37+
- run: pip install '.[test]'
3538
- run: pip freeze
3639
- run: make fmt
3740
- run: make lint
38-
- run: python setup.py --version
41+
- run: rsconnect version
3942
- run: make test-${{ matrix.python-version }}
4043
- if: github.event_name == 'pull_request' && matrix.python-version == '3.8'
4144
uses: orgoro/coverage@v3
@@ -47,28 +50,34 @@ jobs:
4750
runs-on: ubuntu-latest
4851
continue-on-error: true
4952
steps:
50-
- uses: actions/checkout@v2
51-
- run: git fetch --prune --unshallow
53+
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5258
- uses: actions/setup-python@v2
5359
with:
5460
python-version: 3.8.x
55-
- run: pip install --pre -r requirements.txt
61+
- run: pip install --pre '.[test]'
5662
- run: pip freeze
5763
- run: make fmt
5864
- run: make lint
59-
- run: python setup.py --version
65+
- run: rsconnect version
6066
- run: make test-3.8
6167

6268
distributions:
6369
needs: test
6470
runs-on: ubuntu-latest
6571
steps:
66-
- uses: actions/checkout@v2
67-
- run: git fetch --prune --unshallow
72+
- uses: actions/checkout@v4
73+
with:
74+
fetch-depth: 0
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6877
- uses: actions/setup-python@v2
6978
with:
7079
python-version: 3.8.x
71-
- run: pip install -r requirements.txt
80+
- run: pip install -e '.[test]'
7281
- run: pip freeze
7382
- run: make dist
7483
id: create_dist
@@ -117,12 +126,14 @@ jobs:
117126
needs: test
118127
runs-on: ubuntu-latest
119128
steps:
120-
- uses: actions/checkout@v2
121-
- run: git fetch --prune --unshallow
129+
- uses: actions/checkout@v4
130+
with:
131+
fetch-depth: 0
132+
env:
133+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122134
- uses: actions/setup-python@v2
123135
with:
124136
python-version: 3.8.x
125-
- run: pip install -r requirements.txt
126137
- run: pip freeze
127138
- run: make docs
128139
- uses: actions/upload-artifact@v2
@@ -163,15 +174,15 @@ jobs:
163174
name: "Integration tests against latest Connect"
164175
runs-on: ubuntu-latest
165176
steps:
166-
- uses: actions/checkout@v2
177+
- uses: actions/checkout@v4
167178
- uses: actions/setup-python@v2
168179
with:
169180
python-version: 3.8
170181
- name: Install dependencies
171182
run: |
172183
python -m pip install --upgrade pip
173-
python -m pip install -r requirements.txt
174184
python -m pip install -r vetiver-testing/vetiver-requirements.txt
185+
python -m pip install '.[test]'
175186
- name: Run RStudio Connect
176187
run: |
177188
docker-compose up --build -d
@@ -197,7 +208,9 @@ jobs:
197208
CONNECT_LICENSE: ${{ secrets.RSC_LICENSE }}
198209
ADMIN_API_KEY: ${{ secrets.ADMIN_API_KEY }}
199210
steps:
200-
- uses: actions/checkout@v2
211+
- uses: actions/checkout@v4
212+
with:
213+
fetch-depth: 0
201214
env:
202215
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
203216
- uses: extractions/setup-just@v1

.github/workflows/snyk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Install dependencies
3939
run: |
4040
python -m pip install --upgrade pip
41-
pip install -r requirements.txt
41+
pip install -e '.[test]'
4242
4343
- uses: snyk/actions/setup@master
4444

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/rsconnect-build-test
2323
/rsconnect/version.py
2424
/tests/testdata/**/rsconnect-python/
25+
env
2526
htmlcov
2627
test-home/
2728
venv

CONTRIBUTING.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ cd rsconnect-python
2222
python3 -m venv .venv
2323
# Activate the virtual environment
2424
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 ./
25+
# Install rsconnect-python with a symbolic link to the locations repository,
26+
# meaning any changes to code in there will automatically be reflected.
27+
# Also install dev/test dependencies.
28+
pip install -e '.[test]'
3029
```
3130

3231
## Workflow
@@ -46,8 +45,8 @@ make test
4645
make all-tests
4746
```
4847

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.
48+
As another example, the [`test` job in the default GitHub Actions workflow](.github/workflows/main.yml)
49+
uses some of these targets during the CI for building and testing.
5150

5251
## Proposing Change
5352

@@ -82,7 +81,7 @@ a release will be created and published to the repository
8281

8382
rsconnect-python exists on conda-forge as its own [feedstock](https://github.com/conda-forge/rsconnect-python-feedstock)
8483

85-
Updating the package requires a fork of the repository and a [push request](https://github.com/conda-forge/rsconnect-python-feedstock#updating-rsconnect-python-feedstock).
84+
Updating the package requires a fork of the repository and a [push request](https://github.com/conda-forge/rsconnect-python-feedstock#updating-rsconnect-python-feedstock).
8685

8786
- For new version/release, update the [meta.yaml](https://github.com/conda-forge/rsconnect-python-feedstock/blob/master/recipe/meta.yaml) file with the new version number, source url, and corresponding checksum.
8887

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ FROM ${BASE_IMAGE}
33

44
WORKDIR /rsconnect
55
COPY scripts/build-image build-image
6-
COPY requirements.txt requirements.txt
76
RUN bash build-image && rm -vf build-image

Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION := $(shell python setup.py --version)
1+
VERSION := $(shell python -m setuptools_scm)
22
HOSTNAME := $(shell hostname)
33
S3_PREFIX := s3://rstudio-connect-downloads/connect/rsconnect-python
44

@@ -67,13 +67,6 @@ fmt-%:
6767
@echo ERROR: This python version cannot run the fmting tools
6868
@exit 1
6969

70-
.PHONY: deps-prerelease
71-
deps-prerelease:
72-
pip install --pre -r requirements.txt
73-
74-
deps-%:
75-
$(RUNNER) 'pip install --pre -r requirements.txt'
76-
7770
lint-%:
7871
$(RUNNER) 'black --check --diff rsconnect/'
7972
$(RUNNER) 'flake8 rsconnect/'
@@ -112,10 +105,6 @@ test: test-3.8
112105
lint: RUNNER = bash -c
113106
lint: lint-3.8
114107

115-
.PHONY: deps
116-
deps: RUNNER = bash -c
117-
deps: deps-3.8
118-
119108
.PHONY: fmt
120109
fmt: RUNNER = bash -c
121110
fmt: fmt-3.8
@@ -133,12 +122,16 @@ version:
133122
# exported as a point of reference instead.
134123
.PHONY: dist
135124
dist:
136-
python setup.py bdist_wheel
125+
pip wheel --no-deps -w dist .
137126
twine check $(BDIST_WHEEL)
138127
rm -vf dist/*.egg
139128
@echo "::set-output name=whl::$(BDIST_WHEEL)"
140129
@echo "::set-output name=whl_basename::$(notdir $(BDIST_WHEEL))"
141130

131+
.PHONY: dist-install
132+
dist-install: dist
133+
pip install $(BDIST_WHEEL)
134+
142135
.PHONY: sync-to-s3
143136
sync-to-s3:
144137
aws s3 cp --acl bucket-owner-full-control \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You may also build and install a wheel directly from a repository clone:
4242
git clone https://github.com/rstudio/rsconnect-python.git
4343
cd rsconnect-python
4444
pip install pipenv
45-
make deps dist
45+
make dist
4646
pip install ./dist/rsconnect_python-*.whl
4747
```
4848

docs/docs/css/custom.css

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
}
88

99
.md-header {
10-
border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
10+
border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
1111
}
1212

1313
@media only screen and (max-width: 76.1875em){
@@ -30,7 +30,7 @@
3030
}
3131

3232
.md-tabs__item {
33-
height: 1.75rem !important;
33+
height: unset;
3434
}
3535

3636
/* Search bar
@@ -45,7 +45,7 @@
4545
font-weight: bold;
4646
}
4747

48-
/* Search bar - black palette
48+
/* Search bar - black palette
4949
*/
5050

5151
[data-md-color-primary=black] .md-search-result mark {
@@ -149,14 +149,19 @@
149149
color: #6F6B6B;
150150
font-weight: 400;
151151
font-size: 0.65rem;
152-
padding-top: 15px;
152+
clear: right;
153153
}
154154

155155
.md-footer-meta.md-typeset a {
156156
color: #6F6B6B !important;
157157
font-weight: 400;
158158
}
159159

160+
.md-footer-meta img {
161+
margin-top: 4px;
162+
height: 1em;
163+
}
164+
160165
/* footer - black palette
161166
*/
162167

@@ -222,6 +227,7 @@
222227
padding: 0;
223228
}
224229

230+
225231
h2.divider {
226232
text-align: center;
227233
max-width: 650px;
@@ -298,7 +304,7 @@ pre code::-webkit-scrollbar-thumb:hover, .codehilite pre::-webkit-scrollbar-thum
298304
opacity: 0;
299305
pointer-events: none;
300306
}
301-
307+
302308
// Back-to-top button on focus/hover
303309
&:focus,
304310
&:hover {
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)