Skip to content

Commit 36932ac

Browse files
authored
Merge pull request #27 from rok4/feature/gdal_virtual_file_system
Ajout d'un gestionnaire de chemin GDAL
2 parents 96b3324 + b56e594 commit 36932ac

File tree

6 files changed

+150
-80
lines changed

6 files changed

+150
-80
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,36 +73,36 @@ jobs:
7373
echo "/usr/lib/python3/dist-packages/" >.venv/lib/python${{ matrix.python-version }}/site-packages/system.pth
7474
7575
- name: Run unit tests
76-
if: "(${{ matrix.os }}=='ubuntu-20.04')&&(${{ matrix.python-version }}=='3.8')"
76+
if: "matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'"
7777
run: |
7878
source .venv/bin/activate
7979
pip install -e .[test]
8080
coverage run -m pytest
8181
coverage report -m
8282
8383
- name: Build unit tests report
84-
if: "(${{ matrix.os }}=='ubuntu-20.04')&&(${{ matrix.python-version }}=='3.8')"
84+
if: "matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'"
8585
run: |
8686
source .venv/bin/activate
8787
coverage html -d dist/tests/
8888
rm dist/tests/.gitignore
8989
9090
- name: Build package
91-
if: "(${{ matrix.os }}=='ubuntu-20.04')&&(${{ matrix.python-version }}=='3.8')"
91+
if: "matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'"
9292
run: |
9393
source .venv/bin/activate
9494
python3 -m build
9595
9696
- name: Build documentation
97-
if: "(${{ matrix.os }}=='ubuntu-20.04')&&(${{ matrix.python-version }}=='3.8')"
97+
if: "matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'"
9898
run: |
9999
source .venv/bin/activate
100100
pip install -e .[doc]
101101
pdoc3 --html --output-dir dist/ rok4
102102
cp README.md CHANGELOG.md dist/
103103
104104
- name: Upload packages, tests results and documentation
105-
if: "(${{ matrix.os }}=='ubuntu-20.04')&&(${{ matrix.python-version }}=='3.8')"
105+
if: "matrix.os == 'ubuntu-20.04' && matrix.python-version == '3.8'"
106106
uses: actions/upload-artifact@v3
107107
with:
108108
name: dist-py3
@@ -189,6 +189,7 @@ jobs:
189189
cat artifact/CHANGELOG.md >>docs/versions/${{ github.ref_name }}/CHANGELOG.md
190190
sed "s#__version__#${{ github.ref_name }}#" templates/README.template.md >docs/versions/${{ github.ref_name }}/README.md
191191
cat artifact/README.md >>docs/versions/${{ github.ref_name }}/README.md
192+
sed -i "s#x.y.z#${{ github.ref_name }}#g" docs/versions/${{ github.ref_name }}/README.md
192193
sed "s#__version__#${{ github.ref_name }}#" templates/index.template.md >docs/index.md
193194
echo "# Versions" >docs/versions.md
194195
echo "" >>docs/versions.md

CHANGELOG.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
## Summary
22

3-
Fonction de lecture d'une tuile vecteur décodée.
3+
Lecture par système de fichier virtuel avec GDAL
44

55
## Changelog
66

77
### [Added]
88

9-
* Pyramid
10-
* Décodage d'une tuile vecteur avec `get_tile_data_vector` (le pendant vecteur de `get_tile_data_raster`) : le résultat est un "dictionnaire GeoJSON", et les coordonnées sont en relatif à la tuile (souvent entre 0 et 4096)
11-
* Utils
12-
* Ajout d'un cache pour la création de spatial reference (via la fonction `srs_to_spatialreference`)
9+
* Storage
10+
* Fonction `get_osgeo_path` permettant de configurer le bon sytème de fichier virtuel en fonction du chemin fourni, et retourne celui à utiliser dans le Open de gdal ou ogr
1311

1412
### [Changed]
1513

1614
* Storage
17-
* La lecture d'un fichier ou objet qui n'existe pas émet toujours une exception `FileNotFoundError`
18-
* Pyramid
19-
* Si la tuile que l'on veut lire est dans une dalle qui n'existe pas, on retourne `None`
15+
* la récupération d'un client S3 (`__get_s3_client`) permet de récupérer le client, l'hôte, les clés d'accès et secrète, ainsi que le nom du bucket sans l'éventuel hôte du cluster
16+
17+
### [Fixed]
18+
19+
* Storage
20+
* Lecture binaire S3 : mauvaise configuration du nom du bucket et de l'objet et mauvaise lecture partielle
21+
22+
### [Removed]
2023

24+
* Exceptions
25+
* `NotImplementedError` est une exceptions native
2126
<!--
2227
### [Added]
2328

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ Installations système requises :
1616
* debian : `apt install python3-rados python3-gdal`
1717

1818
Depuis [PyPI](https://pypi.org/project/rok4/) : `pip install rok4`
19+
1920
Depuis [GitHub](https://github.com/rok4/core-python/releases/) : `pip install https://github.com/rok4/core-python/releases/download/x.y.z/rok4-x.y.z-py3-none-any.whl`
2021

22+
L'environnement d'exécution doit avoir accès aux librairies système. Dans le cas d'une utilisation au sein d'un environnement python, précisez bien à la création `python3 -m venv --system-site-packages .venv`.
23+
2124
## Utiliser la librairie
2225

2326
```python

src/rok4/Exceptions.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,3 @@ def __init__(self, expected_format, content, issue):
3737
self.content = content
3838
self.issue = issue
3939
super().__init__(f"Expected format {expected_format} to read '{content}' : {issue}")
40-
41-
class NotImplementedError(Exception):
42-
"""
43-
Exception raised when a feature could be provided but is not implemented yet
44-
"""
45-
46-
def __init__(self, issue):
47-
super().__init__(issue)

0 commit comments

Comments
 (0)