Skip to content

Commit a06c5ec

Browse files
authored
Merge pull request #36 from cisagov/improvements/pull_in_upstream_updates
Pull in Updates from skeleton-generic
2 parents decd0f7 + 0478f94 commit a06c5ec

File tree

6 files changed

+49
-25
lines changed

6 files changed

+49
-25
lines changed

.bandit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ tests:
1111
# - B102
1212

1313
skips:
14-
- B101 # skip "assert used" check since assertions are required in pytests
14+
- B101 # skip "assert used" check since assertions are required in pytests

.github/workflows/build.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
lint:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v2
1818
- uses: actions/setup-python@v1
1919
with:
2020
python-version: 3.8
@@ -36,13 +36,13 @@ jobs:
3636
- name: Install dependencies
3737
run: |
3838
python -m pip install --upgrade pip
39-
pip install --upgrade -r requirements-test.txt
40-
- name: Run linters on all files
39+
pip install --upgrade --requirement requirements-test.txt
40+
- name: Run pre-commit on all files
4141
run: pre-commit run --all-files
4242
test:
4343
runs-on: ubuntu-latest
4444
steps:
45-
- uses: actions/checkout@v1
45+
- uses: actions/checkout@v2
4646
- uses: actions/setup-python@v1
4747
with:
4848
python-version: 3.8
@@ -58,7 +58,7 @@ jobs:
5858
- name: Install dependencies
5959
run: |
6060
python -m pip install --upgrade pip
61-
pip install --upgrade -r requirements-test.txt
61+
pip install --upgrade --requirement requirements-test.txt
6262
- name: Run tests
6363
env:
6464
RELEASE_TAG: ${{ github.event.release.tag_name }}
@@ -72,7 +72,7 @@ jobs:
7272
runs-on: ubuntu-latest
7373
needs: [lint, test]
7474
steps:
75-
- uses: actions/checkout@v1
75+
- uses: actions/checkout@v2
7676
- uses: actions/setup-python@v1
7777
with:
7878
python-version: 3.8
@@ -88,7 +88,7 @@ jobs:
8888
- name: Install dependencies
8989
run: |
9090
python -m pip install --upgrade pip wheel
91-
pip install --upgrade -r requirements.txt
91+
pip install --upgrade --requirement requirements.txt
9292
- name: Build artifacts
9393
run: python3 setup.py sdist bdist_wheel
9494
- name: Upload artifacts

.pre-commit-config.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ default_language_version:
55

66
repos:
77
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v2.4.0
8+
rev: v2.5.0
99
hooks:
1010
- id: check-executables-have-shebangs
1111
- id: check-json
@@ -27,13 +27,13 @@ repos:
2727
- id: requirements-txt-fixer
2828
- id: trailing-whitespace
2929
- repo: https://github.com/igorshubovych/markdownlint-cli
30-
rev: v0.19.0
30+
rev: v0.22.0
3131
hooks:
3232
- id: markdownlint
3333
args:
3434
- --config=.mdl_config.json
3535
- repo: https://github.com/adrienverge/yamllint
36-
rev: v1.18.0
36+
rev: v1.20.0
3737
hooks:
3838
- id: yamllint
3939
- repo: https://github.com/detailyang/pre-commit-shell
@@ -47,7 +47,7 @@ repos:
4747
additional_dependencies:
4848
- flake8-docstrings
4949
- repo: https://github.com/asottile/pyupgrade
50-
rev: v1.25.1
50+
rev: v1.26.2
5151
hooks:
5252
- id: pyupgrade
5353
# Run bandit on "tests" tree with a configuration
@@ -71,7 +71,7 @@ repos:
7171
hooks:
7272
- id: black
7373
- repo: https://github.com/asottile/seed-isort-config
74-
rev: v1.9.3
74+
rev: v1.9.4
7575
hooks:
7676
- id: seed-isort-config
7777
- repo: https://github.com/pre-commit/mirrors-isort
@@ -81,7 +81,7 @@ repos:
8181
hooks:
8282
- id: isort
8383
- repo: https://github.com/ansible/ansible-lint.git
84-
rev: v4.1.1a5
84+
rev: v4.2.0
8585
hooks:
8686
- id: ansible-lint
8787
# files: molecule/default/playbook.yml
@@ -91,7 +91,7 @@ repos:
9191
- id: terraform_fmt
9292
- id: terraform_validate_no_variables
9393
- repo: https://github.com/IamTheFij/docker-pre-commit
94-
rev: v1.0.0
94+
rev: v1.0.1
9595
hooks:
9696
- id: docker-compose-check
9797
- repo: https://github.com/prettier/prettier

CONTRIBUTING.md

+25-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,31 @@ eval "$(pyenv init -)"
5656
eval "$(pyenv virtualenv-init -)"
5757
```
5858

59-
For Linux (or on the Mac, if you don't want to use `brew`) you can use
59+
For Linux, Windows Subsystem for Linux (WSL), or on the Mac (if you
60+
don't want to use `brew`) you can use
6061
[pyenv/pyenv-installer](https://github.com/pyenv/pyenv-installer) to
61-
install the necessary tools. When you are finished you will need to
62-
add the same two lines above to your profile.
62+
install the necessary tools. Before running this ensure that you have
63+
installed the prerequisites for your platform according to the
64+
[`pyenv` wiki
65+
page](https://github.com/pyenv/pyenv/wiki/common-build-problems).
66+
67+
On WSL you should treat your platform as whatever Linux distribution
68+
you've chosen to install.
69+
70+
Once you have installed `pyenv` you will need to add the following
71+
lines to your `.bashrc`:
72+
73+
```bash
74+
export PATH="$PATH:$HOME/.pyenv/bin"
75+
eval "$(pyenv init -)"
76+
eval "$(pyenv virtualenv-init -)"
77+
```
78+
79+
If you are using a shell other than `bash` you should follow the
80+
instructions that the `pyenv-installer` script outputs.
81+
82+
You will need to reload your shell for these changes to take effect so
83+
you can begin to use `pyenv`.
6384

6485
For a list of Python versions that are already installed and ready to
6586
use with `pyenv`, use the command `pyenv versions`. To see a list of
@@ -81,7 +102,7 @@ commands:
81102
cd skeleton-python-library
82103
pyenv virtualenv <python_version_to_use> skeleton-python-library
83104
pyenv local skeleton-python-library
84-
pip install -r requirements-dev.txt
105+
pip install --requirement requirements-dev.txt
85106
```
86107

87108
#### Installing the pre-commit hook ####

requirements-dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
-r requirements-test.txt
1+
--requirement requirements-test.txt
22
ipython
33
semver

setup.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,14 @@ def package_vars(version_file):
7575
extras_require={
7676
"test": [
7777
"pre-commit",
78-
"coveralls",
79-
# coveralls does not currently support coverage 5.0
80-
# https://github.com/coveralls-clients/coveralls-python/issues/203
81-
# is the issue for this on the coveralls project
82-
"coverage < 5.0",
78+
# coveralls 1.11.0 added a service number for calls from
79+
# GitHub Actions. This caused a regression which resulted in a 422
80+
# response from the coveralls API with the message:
81+
# Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
82+
# 1.11.1 fixed this issue, but to ensure expected behavior we'll pin
83+
# to never grab the regression version.
84+
"coveralls != 1.11.0",
85+
"coverage",
8386
"pytest-cov",
8487
"pytest",
8588
]

0 commit comments

Comments
 (0)