Skip to content

Commit

Permalink
Merge pull request #10 from rok4/develop
Browse files Browse the repository at this point in the history
Release 4.2.0
  • Loading branch information
Dolite committed Mar 21, 2024
2 parents fb18030 + 62c9d77 commit aeea5fb
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 126 deletions.
81 changes: 27 additions & 54 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ jobs:

steps:
- name: Checkout project
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install system dependencies
run: |
Expand Down Expand Up @@ -79,66 +81,37 @@ jobs:
cd build
make doc
cd ..
cp -r README.md CHANGELOG.md docs/images dist/
- name: Upload documentation
if: "matrix.os == 'ubuntu-20.04'"
uses: actions/upload-artifact@v3
cp docs/mkdocs.yml target/mkdocs.yml
cp -r docs/overrides target/
cp -r docs/images target/docs/
cp docs/documentation.md target/docs/documentation.md
cp docs/README.hdr.md target/docs/README.md
cp docs/CHANGELOG.hdr.md target/docs/CHANGELOG.md
cp docs/CONTRIBUTING.hdr.md target/docs/CONTRIBUTING.md
sed "s#x.y.z#${{ github.ref_name }}#g" README.md >>target/docs/README.md
sed -i "s#](./docs/images/#](./images/#g" target/docs/README.md
cat CHANGELOG.md >>target/docs/CHANGELOG.md
cat CONTRIBUTING.md >>target/docs/CONTRIBUTING.md
- name: Setup python
uses: actions/setup-python@v4
with:
name: dist-py3
path: dist/
if-no-files-found: error
retention-days: 1

commit_documentation:
name: Add documentation into gh-pages branch
needs: build_and_test
if: "always()&&(needs.create_release.outputs.job_status=='success')&&(needs.build_and_test.outputs.job_status=='success')"
runs-on: ubuntu-latest
python-version: "3.10"
cache: 'pip'

steps:

- name: Checkout project on gh-pages
uses: actions/checkout@v3
with:
ref: 'gh-pages'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Mkdocs
run: pip install -r docs/requirements.txt

- uses: actions/download-artifact@v3
with:
name: dist-py3
path: artifact/

- name: Copy version elements to final location
run: |
mkdir -p docs/versions/${{ github.ref_name }}/docs
cp -r artifact/html docs/versions/${{ github.ref_name }}/
cp -r artifact/images docs/versions/${{ github.ref_name }}/docs/
- name: Add pages from templates
run: |
sed "s#__version__#${{ github.ref_name }}#" templates/mkdocs.template.yml >mkdocs.yml
sed "s#__version__#${{ github.ref_name }}#" templates/documentation.template.md >docs/versions/${{ github.ref_name }}/documentation.md
sed "s#__version__#${{ github.ref_name }}#" templates/index-version.template.md >docs/versions/${{ github.ref_name }}/index.md
cat artifact/README.md >>docs/versions/${{ github.ref_name }}/index.md
sed -i "s#x.y.z#${{ github.ref_name }}#g" docs/versions/${{ github.ref_name }}/index.md
cp templates/index-versions.template.md docs/versions/index.md
sed "s/^## \(.*\)$/## \1 \n\n[➔ Lien vers la documentation](\1\/index.md) /" artifact/CHANGELOG.md >>docs/versions/index.md
sed "s#__version__#${{ github.ref_name }}#" templates/latest.template.html >docs/versions/latest/index.html
rm -r artifact
- name: Publish on gh-pages branch
- name: Publish documentation
if: "matrix.os == 'ubuntu-20.04'"
run: |
git config user.name github-actions
git config user.email [email protected]
git add -v docs/versions/${{ github.ref_name }}/ docs/versions/latest/ docs/index.md docs/versions/index.md
git commit -m "Add documentation for version ${{ github.ref_name }}"
git push
cd target/
mike deploy --push --update-aliases --branch gh-pages -t "Version ${{ github.ref_name }}" ${{ github.ref_name }} latest
mike set-default --push --branch gh-pages ${{ github.ref_name }}
delete_version:
name: Remove release and tag if error occured
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/build-docs.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/pr-auto-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "🏷 PR Labeler"
on:
- pull_request_target
- pull_request

permissions:
contents: read
Expand All @@ -10,6 +10,6 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
build
dist
dist
target
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 4.2.0

### [Added]

* Stockage objet (S3, Swift et Ceph)
* Possibilité de définir un nombre de tentatives pour les lectures (1 par défaut) : variable d'environnement `ROK4_OBJECT_READ_ATTEMPTS`
* Possibilité de définir un nombre de tentatives pour les écritures (1 par défaut) : variable d'environnement `ROK4_OBJECT_WRITE_ATTEMPTS`
* Possibilité de définir un temps d'attente, en secondes, entre les tentatives (5 par défaut) : variable d'environnement `ROK4_OBJECT_ATTEMPTS_WAIT`

## 4.1.5

### [Fixed]
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ endforeach()
if(DOC_ENABLED)

set(DOXYGEN_DOXYFILE_ENCODING UTF-8)
set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dist)
set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/target/docs)
set(DOXYGEN_OUTPUT_LANGUAGE french)
set(DOXYGEN_INPUT_ENCODING UTF-8)
set(DOXYGEN_IMAGE_PATH docs/images)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ curl -o styles.deb https://github.com/rok4/styles/releases/download/x.y.z/rok4-s
apt install ./styles.deb
```


## Utiliser les outils

Voici la légende utilisée pour identifié le format des images dans les documentations par commande :
Expand All @@ -47,6 +46,10 @@ Voici la légende utilisée pour identifié le format des images dans les docume

Leur définition est contrôlée à l'usage.

* Pour le stockage objet
- `ROK4_OBJECT_READ_ATTEMPTS` : nombre de tentatives pour les lectures
- `ROK4_OBJECT_WRITE_ATTEMPTS` : nombre de tentatives pour les écritures
- `ROK4_OBJECT_ATTEMPTS_WAIT` : temps d'attente en secondes entre les tentatives
* Pour le stockage S3
- `ROK4_S3_URL`
- `ROK4_S3_KEY`
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.hdr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
hide:
- navigation
---
4 changes: 4 additions & 0 deletions docs/CONTRIBUTING.hdr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
hide:
- navigation
---
4 changes: 4 additions & 0 deletions docs/README.hdr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
hide:
- navigation
---
9 changes: 9 additions & 0 deletions docs/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
hide:
- navigation
- toc
---

# Documentation technique

<iframe src="../html/index.html"></iframe>
27 changes: 27 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
site_name: "Projet ROK4 - Outils de génération de dalles raster et vecteur"
site_url: https://rok4.github.io/generation

nav:
- Accueil: README.md
- Documentation technique: documentation.md
- Historique des versions: CHANGELOG.md
- Contribuer: CONTRIBUTING.md

theme:
logo: https://rok4.github.io/assets/images/rok4-carre.png
favicon: https://rok4.github.io/assets/images/rok4-carre.png
name: material
features:
- navigation.tabs
- navigation.tabs.sticky
language: fr
custom_dir: overrides

extra_css:
- https://rok4.github.io/assets/css/commun.css

extra:
homepage: https://rok4.github.io
version:
provider: mike
default: latest
8 changes: 8 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% extends "base.html" %}

{% block outdated %}
🚨 Vous êtes sur la documentation d'une ancienne version. 🚨
<a href="{{ '../' ~ base_url }}">
<strong>Cliquez ici pour aller sur la dernière version.</strong>
</a>
{% endblock %}
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdocs
mkdocs-material
mike
3 changes: 3 additions & 0 deletions src/mergeNtiff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,9 @@ int main(int argc, char** argv) {
delete pMaskOut;
ProjPool::cleanProjPool();
proj_cleanup();
StoragePool::cleanStoragePool();
CurlPool::cleanCurlPool();
curl_global_cleanup();

return 0;
}

0 comments on commit aeea5fb

Please sign in to comment.