Skip to content

Commit

Permalink
ci: formatting (TDE-400) (#25)
Browse files Browse the repository at this point in the history
* ci: add formatting

* fix: auto formatted code

* fix: mypy

* fix: pylint

* fix: remove pretty format toml

this causes `docker build .` to fail

* refactor: change Credentials from a class to a namedtuple

* chore: add a comment concerning osgeo import

* refactor: add boto3 typing lib

* fix: imports

* fix: imports

* fix: set typing return for S3 Bucket

* fix: remove unused import and catch exception on sbuprocess failure with check=True

* fix: imports

* fix: imports

Co-authored-by: Paul Fouquet <[email protected]>
Co-authored-by: paulfouquet <[email protected]>
  • Loading branch information
3 people authored Jun 28, 2022
1 parent d276baa commit c3932e4
Show file tree
Hide file tree
Showing 12 changed files with 781 additions and 73 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
run: |
pip install poetry
- name: Fetch Tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* # see https://stackoverflow.com/a/60184319/9285308

- name: Build containers
run: |
docker build . --tag topo-imagery --label "github_run_id=${GITHUB_RUN_ID}"
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Format Files
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Use Python "3.8"
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install
run: |
pip install poetry
poetry install
- name: Format
run: |
poetry run pre-commit run --all-files
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ repos:
types: [python]
require_serial: true

- id: pretty-format-toml
name: Pretty format TOML
entry: pretty-format-toml
args: [--autofix]
language: system
stages: [commit]
types: [toml]

- id: pylint
name: pylint
entry: pylint
Expand Down
11 changes: 11 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[MASTER]
disable =
invalid-name,
missing-class-docstring,
missing-module-docstring,
missing-function-docstring,

[FORMAT]
max-line-length=127
[MISCELLANEOUS]
notes=XXX
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Topo Imagery


[![GitHub Actions Status](https://github.com/linz/topo-imagery/workflows/Build/badge.svg)](https://github.com/linz/topo-imagery/actions)
[![Coverage: 100% branches](https://img.shields.io/badge/Coverage-100%25%20branches-brightgreen.svg)](https://pytest.org/)
[![Kodiak](https://badgen.net/badge/Kodiak/enabled?labelColor=2e3a44&color=F39938)](https://kodiakhq.com/)
Expand All @@ -12,10 +11,10 @@
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Code Style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)


_A collection of scripts used to process imagery_

# Package

## [topo-imagery](https://github.com/linz/topo-imagery/tree/master/containers/gdal)

### Container Descrption
Expand Down
Loading

0 comments on commit c3932e4

Please sign in to comment.