Skip to content

Commit 4fdf811

Browse files
authored
Merge branch '0.5.0' into bug/tile
2 parents 9b77e69 + 0dc498b commit 4fdf811

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+685
-477
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release Python package
2+
3+
on:
4+
workflow_run:
5+
workflows: [tests]
6+
branches: [main]
7+
types: [completed]
8+
9+
jobs:
10+
release:
11+
needs: test
12+
runs-on: ubuntu-latest
13+
name: Release package to PyPi
14+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
15+
steps:
16+
- uses: actions/checkout@master
17+
- name: Set up Python 3.8
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.8
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install tox tox-gh-actions
25+
- name: Build and release 📦 to PyPI
26+
with:
27+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
29+
run: |
30+
tox -e release
31+

.github/workflows/tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
- push
55

66
jobs:
7-
build:
7+
test:
88
runs-on: ubuntu-latest
99
name: Docker | GDAL=${{ matrix.gdal-version }} | python=${{ matrix.python-version }}
10-
container: osgeo/gdal:ubuntu-full-${{ matrix.gdal-version }}
10+
container: osgeo/gdal:ubuntu-small-${{ matrix.gdal-version }}
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
python-version: ["3.8", "3.9"]
14+
python-version: ["3.8", "3.9", "3.10"]
1515
gdal-version: ["3.4.0", "3.3.3"]
1616
include:
1717
- python-version: "3.8"
@@ -38,10 +38,16 @@ jobs:
3838
python${{ matrix.python-version }}-dev \
3939
python${{ matrix.python-version }}-venv \
4040
python3-pip \
41-
g++
41+
g++ \
42+
libgl1
4243
- name: Install dependencies
4344
run: |
4445
python -m pip install --upgrade pip
45-
python -m pip install tox tox-gh-actions
46+
python -m pip install tox
47+
- name: Lint with tox
48+
run: tox -e lint
49+
- name: Format with tox
50+
run: tox -e format
4651
- name: Test with tox
47-
run: tox
52+
run: tox -e test
53+

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/pycqa/isort
3+
rev: 5.10.1
4+
hooks:
5+
- id: isort
6+
- repo: https://github.com/ambv/black
7+
rev: 22.1.0
8+
hooks:
9+
- id: black
10+
language_version: python3.9
11+
- repo: https://gitlab.com/pycqa/flake8
12+
rev: 3.9.2
13+
hooks:
14+
- id: flake8

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import sys
1515

1616
sys.path.insert(0, os.path.abspath(".."))
17+
import numpy as np # noqa: F401
1718
import sphinx_bootstrap_theme
18-
import numpy as np
1919

2020
# -- Project information -----------------------------------------------------
2121

@@ -25,7 +25,7 @@
2525
license = "MIT"
2626
import time
2727

28-
copyright = u"2018-{}, CosmiQ Works: an IQT Lab".format(time.strftime("%Y"))
28+
copyright = "2018-{}, CosmiQ Works: an IQT Lab".format(time.strftime("%Y"))
2929

3030
# The full version, including alpha/beta/rc tags
3131
release = "0.0.1"

requirements-test.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ pytest
2222
tox
2323
isort
2424
flake8
25+
pre-commit

setup.cfg

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[flake8]
2+
extend-ignore =
3+
E203, # whitespace before ':'
4+
E501, # line too long
5+
C901, # is too complex
6+
E402, # module level import not at top of file (for docs)
7+
E741, # ambiguous variable name
8+
9+
exclude =
10+
.git,
11+
__pycache__,
12+
docs/source/conf.py,
13+
old,
14+
build,
15+
dist,
16+
.tox
17+
max-line-length = 88
18+
max-complexity = 10
19+
count=true
20+
21+
[isort]
22+
profile = black
23+
24+
[black]
25+
line-length = 88
26+
target-version = ['py37', 'py38', 'py39', 'py310']
27+
experimental_string_processing = true

setup.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import os
2-
import sys
3-
import subprocess
41
import logging
5-
from setuptools import setup, find_packages
2+
import os
63
import re
4+
import subprocess
5+
import sys
6+
7+
from setuptools import find_packages, setup
78

89

910
def get_version():
@@ -51,6 +52,7 @@ def check_output(cmd):
5152
"pyproj>=2.1",
5253
"PyYAML>=5.4",
5354
"rasterio>=1.0.23",
55+
"rio-cogeo>=3.0.2",
5456
"requests==2.22.0",
5557
"rtree>=0.9.3",
5658
"scikit-image>=0.16.2",
@@ -78,7 +80,7 @@ def check_output(cmd):
7880
"Programming Language :: Python :: 3.10",
7981
"Topic :: Scientific/Engineering :: GIS",
8082
],
81-
author=u"Ryan Avery",
83+
author="Ryan Avery",
8284
author_email="[email protected]",
8385
url="https://github.com/CosmiQ/solaris",
8486
license="MIT",

solaris/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from . import data, utils, vector, tile
22

33
# data, eval, preproc, raster, tile, have gdal in them need to replace with rasterio
4-
__version__ = "0.0.1"
4+
__version__ = "0.5.0"

solaris/eval/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from . import base, iou, pixel, vector
1+
from . import base, iou, pixel, vector # noqa: F401

solaris/eval/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ def eval_iou_spacenet_csv(
111111
scoring_dict_list = []
112112
self.ground_truth_GDF[iou_field] = 0.0
113113
iou_index = self.ground_truth_GDF.columns.get_loc(iou_field)
114-
id_cols = 2
115-
ground_truth_ids = self.ground_truth_GDF.iloc[:, :id_cols]
116114

117115
for imageID in tqdm(imageIDList):
118116
self.ground_truth_GDF_Edit = self.ground_truth_GDF[

0 commit comments

Comments
 (0)