Skip to content

Commit 008fc4c

Browse files
committed
Update template and do vast type hinting and linting fixes
1 parent fa3cf35 commit 008fc4c

40 files changed

+2176
-3171
lines changed

.cruft.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "git@github.com:UrbanMachine/cookiecutter-python-template.git",
3-
"commit": "70cadbc801169e644deda8214639128d9959584e",
3+
"commit": "63905dc6f0a7d8bbf926da47b0e59b400cf81eac",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {

.github/check_lint

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# This script runs the full check suite, without any automatic fixes
3+
set -euxo pipefail
4+
5+
poetry run ruff check --no-fix
6+
poetry run ruff format --check
7+
poetry run mypy --ignore-missing-imports roboregress/ tests/
8+
poetry run darglint \
9+
--strictness short \
10+
--docstring-style sphinx \
11+
--ignore-regex '^test_.*'
12+
poetry run cruft check
13+
echo "Lint successful!"

.github/check_lint.sh

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

.github/format

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
# This script runs only autofixable formatters
3+
set -euxo pipefail
4+
5+
poetry run ruff format
6+
poetry run ruff check --fix

.github/format.sh

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

.github/lint

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
# This script fixes what can be automatically fixed, then runs the full check suite
3+
set -euxo pipefail
4+
5+
.github/format
6+
.github/check_lint

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88
strategy:
99
matrix:
10-
python-version: [3.8]
10+
python-version: ['3.10']
1111

1212
steps:
1313
- uses: actions/checkout@v2
@@ -36,4 +36,4 @@ jobs:
3636
ssh-private-key: ${{ secrets.SSH_KEY }}
3737

3838
- name: Lint
39-
run: .github/check_lint.sh
39+
run: .github/check_lint

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: [3.8, 3.9]
11+
python-version: ['3.10', '3.11']
1212
os: [ubuntu-latest, ubuntu-20.04]
1313

1414
steps:
@@ -26,7 +26,7 @@ jobs:
2626
${{ matrix.os }}-${{ matrix.python-version }}-
2727
2828
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v1
29+
uses: actions/setup-python@v4
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232

@@ -41,7 +41,7 @@ jobs:
4141
poetry run pytest tests/ -s --cov=roboregress/ --cov-report=term-missing ${@-}
4242
poetry run coverage xml
4343
- name: Report Coverage
44-
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'
44+
if: matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.10'
4545
uses: codecov/codecov-action@v2.1.0
4646
with:
4747
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ pytest .
2828

2929
### Formatting Code
3030
```shell
31-
bash .github/format.sh
31+
bash .github/format
3232
```
3333

3434
### Linting
3535
```shell
36-
bash .github/check_lint.sh
36+
bash .github/check_lint
3737
```
38-
3938
## Running the Sim
4039
After running `poetry install`, the script can be run via:
4140

docs/contributing/1.-contributing-guide.md

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

docs/contributing/2.-coding-standard.md

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

0 commit comments

Comments
 (0)