Skip to content

Commit

Permalink
Merge pull request #135 from SbastianGarzon/release_0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nuest authored May 14, 2021
2 parents 5433223 + 34e4564 commit 7edce80
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 23 deletions.
14 changes: 10 additions & 4 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ authors:
affiliation: Opening Reproducible Research, University of Münster, Münster, Germany
email: [email protected]
website: https://nuest.staff.ifgi.de/
- family-names: Garzón
given-names: Sebastian
orcid: https://orcid.org/0000-0002-8335-9312
affiliation: Opening Reproducible Research, University of Münster, Münster, Germany
email: [email protected]

- family-names: Qamaz
given-names: Yousef
title: "geoextent"
version: 0.3.0
version: 0.7.1
doi: 10.5281/zenodo.3925693
date-released: 2020-07-01
date-released: 2020-05-11
license: MIT
url: https://o2r.info/geoextent/
commit: baf299f304d7ad16533fbb3d74e8ffc0b63cadfa
commit: #todo
abstract: "Python library for extracting geospatial extent of files and directories with multiple data formats. This project is developed as part of the DFG-funded research project Opening Reproducible Research (o2r, https://o2r.info)."
repository-artifact: https://pypi.org/project/geoextent/0.3.0/
repository-code: https://github.com/o2r-project/geoextent/releases/tag/v0.3.0
identifiers:
- type: "swh"
value: "swh:1:rev:6aca93956d5cd6742318fd3ab27bb176b5f8c24b"
value: "swh:1:rev:#todo"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ See [CONTRIBUTING.md](https://github.com/o2r-project/geoextent/blob/master/CONTR

## How to cite

> Nüst, Daniel and Qamaz, Yousef. (2020, July 1). o2r-project/geoextent (Version v0.3.0). Zenodo. https://doi.org/10.5281/zenodo.3925693
> Nüst, Daniel; Garzón, Sebastian and Qamaz, Yousef. (2021, May 11). o2r-project/geoextent (Version v0.7.1). Zenodo. https://doi.org/10.5281/zenodo.3925693
See also the `CITATION.cff` and `codemeta.json` files in this repository, which can possibly be imported in the reference manager of your choice.

Expand Down
17 changes: 14 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"contIntegration": "https://travis-ci.org/github/o2r-project/geoextent",
"dateCreated": "2019-08-16",
"datePublished": "2020-03-25",
"dateModified": "2020-07-01",
"downloadUrl": "https://pypi.org/project/geoextent/0.3.0/",
"dateModified": "2020-05-11",
"downloadUrl": "https://pypi.org/project/geoextent/0.7.1/",
"issueTracker": "https://github.com/o2r-project/geoextent/issues",
"name": "geoextent",
"version": "0.3.0",
"version": "0.7.1",
"identifier": "https://doi.org/10.5281/zenodo.3925693",
"description": "Python library for extracting geospatial extent of files and directories with multiple data formats. This project is developed as part of the DFG-funded research project Opening Reproducible Research (o2r, https://o2r.info).",
"applicationCategory": "Geoinformatics",
Expand Down Expand Up @@ -47,6 +47,17 @@
"name": "Opening Reproducible Research, University of Münster, Münster, Germany"
}
},
{
"@type": "Person",
"@id": "https://orcid.org/0000-0002-8335-9312",
"givenName": "Sebastian",
"familyName": "Garzón",
"email": "[email protected]",
"affiliation": {
"@type": "Organization",
"name": "Opening Reproducible Research, University of Münster, Münster, Germany"
}
},
{
"@type": "Person",
"givenName": "Yousef",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ How to cite

::

Nüst, Daniel and Qamaz, Yousef. (2020, July 1). o2r-project/geoextent (Version v0.3.0). Zenodo. https://doi.org/10.5281/zenodo.3925693
Nüst, Daniel; Garzón, Sebastian and Qamaz, Yousef. (2021, May 11). o2r-project/geoextent (Version v0.7.1). Zenodo. https://doi.org/10.5281/zenodo.3925693

------

Expand Down
2 changes: 1 addition & 1 deletion geoextent/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = "geoextent"

__version__ = '0.7.0'
__version__ = '0.7.1'
2 changes: 1 addition & 1 deletion geoextent/lib/helpfunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ def transform_bbox(x):
ring = ogr.Geometry(ogr.wkbLinearRing)
ring.AddPoint(x[0], x[1])
ring.AddPoint(x[2], x[1])
ring.AddPoint(x[0], x[3])
ring.AddPoint(x[2], x[3])
ring.AddPoint(x[0], x[3])
ring.CloseRings()
# Create polygon
poly = ogr.Geometry(ogr.wkbPolygon)
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
'pygeoj',
'pyshp',
'pygdal',
'python-dateutil'
'python-dateutil',
'pandas',
'requests',
'numpy',
'traitlets',
'wheel'
],
entry_points={
"console_scripts": [
Expand Down
30 changes: 19 additions & 11 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys
import pytest
import tempfile

import geoextent
from help_functions_test import create_zip, parse_coordinates, tolerance
from osgeo import gdal

Expand Down Expand Up @@ -375,7 +375,7 @@ def test_zenodo_valid_but_removed_repository(script_runner):
assert "does not exist" in ret.stderr


def test_zenodo_invalid_DOI_but_removed_repository(script_runner):
def test_zenodo_invalid_doi_but_removed_repository(script_runner):
ret = script_runner.run('geoextent', '-b', '-t', 'https://doi.org/10.5281/zenodo.not.exist')
assert not ret.success
assert "Geoextent can not handle this repository identifier" in ret.stderr
Expand All @@ -394,14 +394,22 @@ def test_zenodo_valid_but_not_open_access(script_runner):


def test_export_relative_path(script_runner):
with tempfile.TemporaryDirectory() as tmp:
relative = "geoextent_output.gpkg"
script_runner.run('geoextent', '-b', '-t', '--output', relative, 'tests/testdata/folders/folder_two_files')
datasource = ogr.Open(relative)
layer = datasource.GetLayer(0)
ext = layer.GetExtent()
bbox = [ext[0], ext[2], ext[1], ext[3]]
os.remove(relative)
relative = "geoextent_output.gpkg"
geo_version = geoextent.__version__
script_runner.run('geoextent', '-b', '-t', '--output', relative, 'tests/testdata/folders/folder_two_files')
datasource = ogr.Open(relative)
layer = datasource.GetLayer(0)

for feature in layer:
if feature.GetField("handler") == "geoextent:" + geo_version:
bbox_geom = feature.geometry()

ext = bbox_geom.GetEnvelope()
is_valid = bbox_geom.IsValid()
bbox = [ext[0], ext[2], ext[1], ext[3]]
os.remove(relative)

assert is_valid, 'Check that the figure is valid ()'
assert bbox == pytest.approx([2.052333, 41.317038, 7.647256, 51.974624], abs=tolerance)


Expand All @@ -419,7 +427,7 @@ def test_zenodo_valid_doi_repository_wrong_geopackage_extension(script_runner):
with pytest.warns(ResourceWarning):
with tempfile.NamedTemporaryFile(suffix=".abc") as tmp:
ret = script_runner.run('geoextent', '-b', '-t', '--output', tmp.name,
'https://doi.org/10.5281/zenodo.820562'
'https://doi.org/10.5281/zenodo.820562'
)
assert ret.success, "process should return success"

Expand Down

0 comments on commit 7edce80

Please sign in to comment.