Skip to content

Commit 2398f4f

Browse files
authored
Merge pull request #91 from rok4/develop
Release 2.2.0
2 parents 33cefd5 + 86fd97f commit 2398f4f

File tree

10 files changed

+1108
-23
lines changed

10 files changed

+1108
-23
lines changed

.github/labeler.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
ci-cd:
2-
- .github/**/*
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- .github/**
35

46
dependencies:
5-
- requirements.txt
6-
- requirements/*.txt
7+
- changed-files:
8+
- any-glob-to-any-file:
9+
- requirements.txt
10+
- requirements/*.txt
711

812
documentation:
9-
- docs/**/*
13+
- changed-files:
14+
- any-glob-to-any-file:
15+
- docs/**
1016

1117
enhancement:
12-
- src/**/*
18+
- changed-files:
19+
- any-glob-to-any-file:
20+
- src/**
1321

1422
quality:
15-
- tests/**/*
23+
- changed-files:
24+
- any-glob-to-any-file:
25+
- tests/**
1626

1727
tooling:
18-
- .gitignore
19-
- .pre-commit-config.yaml
20-
- setup.cfg
21-
- pyproject.toml
28+
- changed-files:
29+
- any-glob-to-any-file:
30+
- .gitignore
31+
- .pre-commit-config.yaml
32+
- setup.cfg
33+
- pyproject.toml

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ jobs:
185185

186186
steps:
187187
- name: Remove release and tag
188-
uses: dev-drprasad/delete-tag-and-release@v1.0.1
188+
uses: dev-drprasad/delete-tag-and-release@v1.1
189189
with:
190190
tag_name: ${{ github.ref_name }}
191191
delete_release: true

.github/workflows/pr-auto-labeler.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ name: "🏷 PR Labeler"
22
on:
33
- pull_request
44

5-
permissions:
6-
contents: read
7-
pull-requests: write
8-
95
jobs:
10-
triage:
6+
labeler:
7+
permissions:
8+
contents: read
9+
pull-requests: write
1110
runs-on: ubuntu-latest
1211
steps:
13-
- uses: actions/labeler@v5
14-
with:
15-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
12+
- uses: actions/labeler@v5

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exclude: ".venv|__pycache__|tests/dev/|tests/fixtures/"
22
fail_fast: false
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.5.0
5+
rev: v4.6.0
66
hooks:
77
- id: check-added-large-files
88
args: ["--maxkb=1024"]
@@ -22,13 +22,13 @@ repos:
2222
args: [--markdown-linebreak-ext=md]
2323

2424
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
rev: "v0.3.4"
25+
rev: "v0.5.0"
2626
hooks:
2727
- id: ruff
2828
args: ["--fix-only", "--target-version=py38"]
2929

3030
- repo: https://github.com/psf/black
31-
rev: 24.3.0
31+
rev: 24.4.2
3232
hooks:
3333
- id: black
3434
args: ["--target-version=py38"]
@@ -40,7 +40,7 @@ repos:
4040
args: ["--profile", "black", "--filter-files"]
4141

4242
- repo: https://github.com/asottile/pyupgrade
43-
rev: v3.15.2
43+
rev: v3.16.0
4444
hooks:
4545
- id: pyupgrade
4646
args:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.2.0
2+
3+
### [Added]
4+
5+
* Ajout de la librairie de gestion d'un style ROK4
6+
17
## 2.1.5
28

39
### [Changed]

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,33 @@ except Exception as exc:
2727
print(exc)
2828
```
2929

30+
Les variables d'environnement suivantes peuvent être nécessaires, par module :
31+
32+
* `storage` : plus de détails dans la documentation technique du module
33+
* `ROK4_READING_LRU_CACHE_SIZE` : Nombre d'élément dans le cache de lecture (0 pour ne pas avoir de limite)
34+
* `ROK4_READING_LRU_CACHE_TTL` : Durée de validité d'un élément du cache, en seconde (0 pour ne pas avoir de limite)
35+
* `ROK4_CEPH_CONFFILE` : Fichier de configuration du cluster Ceph
36+
* `ROK4_CEPH_USERNAME` : Compte d'accès au cluster Ceph
37+
* `ROK4_CEPH_CLUSTERNAME` : Nom du cluster Ceph
38+
* `ROK4_S3_KEY` : Clé(s) de(s) serveur(s) S3
39+
* `ROK4_S3_SECRETKEY` : Clé(s) secrète(s) de(s) serveur(s) S3
40+
* `ROK4_S3_URL` : URL de(s) serveur(s) S3
41+
* `ROK4_SSL_NO_VERIFY` : Désactivation de la vérification SSL pour les accès S3 (n'importe quelle valeur non vide)
42+
* `tile_matrix_set` :
43+
* `ROK4_TMS_DIRECTORY` : Dossier racine (fichier ou objet) des tile matrix sets
44+
* `style` :
45+
* `ROK4_STYLES_DIRECTORY` : Dossier racine (fichier ou objet) des styles
46+
47+
Readings uses a LRU cache system with a TTL. It's possible to configure it with environment variables :
48+
- ROK4_READING_LRU_CACHE_SIZE : Number of cached element. Default 64. Set 0 or a negative integer to configure a cache without bound. A power of two make cache more efficient.
49+
- ROK4_READING_LRU_CACHE_TTL : Validity duration of cached element, in seconds. Default 300. 0 or negative integer to get cache without expiration date.
50+
51+
To disable cache (always read data on storage), set ROK4_READING_LRU_CACHE_SIZE to 1 and ROK4_READING_LRU_CACHE_TTL to 1.
52+
53+
Using CEPH storage requires environment variables :
54+
55+
Using S3 storage requires environment variables :
56+
3057
Plus d'exemple dans la documentation développeur.
3158

3259

README.pypi.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,21 @@ except Exception as exc:
2424
print(exc)
2525
```
2626

27+
Following environment variables could be used, by module :
28+
29+
* `storage` : more details in the module developer documentation
30+
* `ROK4_READING_LRU_CACHE_SIZE` : Cache size (0 for no limit)
31+
* `ROK4_READING_LRU_CACHE_TTL` : Cache validity time (0 for no limit)
32+
* `ROK4_CEPH_CONFFILE` : Ceph configuration file
33+
* `ROK4_CEPH_USERNAME` : Ceph cluster user
34+
* `ROK4_CEPH_CLUSTERNAME` : Ceph cluster name
35+
* `ROK4_S3_KEY` : Key(s) for S3 server(s)
36+
* `ROK4_S3_SECRETKEY` : Secret key(s) for S3 server(s)
37+
* `ROK4_S3_URL` : URL(s) for S3 server(s)
38+
* `ROK4_SSL_NO_VERIFY` : Disable SSL conrols for S3 access (any non empty value)
39+
* `tile_matrix_set` :
40+
* `ROK4_TMS_DIRECTORY` : Root directory (file or object) for tile matrix sets
41+
* `style` :
42+
* `ROK4_STYLES_DIRECTORY` : Root directory (file or object) for styles
43+
2744
More examples in the developer documentation

src/rok4/storage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Provide functions to read or write data
22
33
Available storage types are :
4+
45
- S3 (path are preffixed with `s3://`)
56
- CEPH (path are prefixed with `ceph://`)
67
- FILE (path are prefixed with `file://`, but it is the default paths' interpretation)
@@ -10,17 +11,20 @@
1011
According to functions, all storage types are not necessarily available.
1112
1213
Readings uses a LRU cache system with a TTL. It's possible to configure it with environment variables :
14+
1315
- ROK4_READING_LRU_CACHE_SIZE : Number of cached element. Default 64. Set 0 or a negative integer to configure a cache without bound. A power of two make cache more efficient.
1416
- ROK4_READING_LRU_CACHE_TTL : Validity duration of cached element, in seconds. Default 300. 0 or negative integer to get cache without expiration date.
1517
1618
To disable cache (always read data on storage), set ROK4_READING_LRU_CACHE_SIZE to 1 and ROK4_READING_LRU_CACHE_TTL to 1.
1719
1820
Using CEPH storage requires environment variables :
21+
1922
- ROK4_CEPH_CONFFILE
2023
- ROK4_CEPH_USERNAME
2124
- ROK4_CEPH_CLUSTERNAME
2225
2326
Using S3 storage requires environment variables :
27+
2428
- ROK4_S3_KEY
2529
- ROK4_S3_SECRETKEY
2630
- ROK4_S3_URL

0 commit comments

Comments
 (0)