Skip to content

Commit f34d340

Browse files
fix: python CI (upgrade black to 22.3.0) and node CI (pin node.js to 16.14.0) (#393)
* fix: python CI (upgrade black to 22.3.0) Also added instructions for setting up a local python environment psf/black#2964 (comment) * fix: node.js ci 16.x (pin node.js version to 16.14.0) node 16.14.2 ships with a buggy version of npm Revert when this is resolved: nodejs/node#42397
1 parent 496ffac commit f34d340

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.github/workflows/nodejs.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
node-version: [12.x, 14.x, 16.x]
14+
# node 16.14.2 ships with a buggy version of npm 🤷‍♂️
15+
# https://github.com/nodejs/node/issues/42397
16+
# TODO revert this back to 16.x when node pushes a new version
17+
node-version: [12.x, 14.x, 16.14.0]
1518

1619
steps:
1720
- uses: actions/checkout@v3

packages/python/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,24 @@ MetricsApiConfig(
179179
| buffer_length | **default: 10** Sets the number of API calls that should be recieved before the requests are sent to ReadMe. |
180180
| allowed_http_hosts | A list of HTTP hosts which should be logged to ReadMe. If this is present, a request will only be sent to ReadMe if its Host header matches one of the allowed hosts. |
181181
| timeout | Timeout (in seconds) for calls back to the ReadMe Metrics API. Default 3 seconds. |
182+
183+
## Development
184+
185+
### Install dependencies:
186+
187+
```sh
188+
# https://pypi.org/project/pipx/
189+
brew install pipx
190+
191+
# https://virtualenv.pypa.io/en/latest/installation.html#via-pipx
192+
pipx install virtualenv
193+
# Create a virtual environment for dependencies to be installed into
194+
virtualenv venv
195+
196+
# Go inside of the virtual environment
197+
# https://www.freecodecamp.org/news/how-to-manage-python-dependencies-using-virtual-environments/
198+
source ./venv/bin/activate
199+
200+
# Then finally install dependencies
201+
pip install -r requirements.txt
202+
```

packages/python/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
black==20.8b1
1+
black==22.3.0
22
Django==3.2.12
33
Flask==2.0.1
44
pytest-mock==3.6.1

0 commit comments

Comments
 (0)