Voici la documentation : https://geoplateforme.pages.gpf-tech.ign.fr/documentation

Skip to content
Validations sur la source (12)
......@@ -14,7 +14,7 @@ include:
- project: geoplateforme/templates
ref: main
file:
- "/ci/docker-v4.yml"
- "/ci/docker-v5.yml"
- "/ci/dependency-track.yml"
- "/ci/pre-commit-v1.yml"
- "/ci/sonarqube.yml"
......@@ -22,14 +22,14 @@ include:
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
DOCKERHUB_PROXY: "690uto8c.gra7.container-registry.ovh.net/gpf-dockerhub"
IMAGE_REGISTRY: "690uto8c.gra7.container-registry.ovh.net/gpf-dockerhub"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PIP_DISABLE_PIP_VERSION_CHECK: 1
PIP_EXTRA_INDEX_URL: https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_API_V4_URL}/groups/55/-/packages/pypi/
PIP_PROGRESS_BAR: "off"
PIP_RETRIES: 0
PROJECT_FOLDER: "gpf_check_md5"
PYTHON_MIN_VERSION: "3.10"
PYTHON_VERSION_MIN: "3.10"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
......@@ -41,12 +41,13 @@ cache:
files:
- requirements/*.txt
paths:
- .cache/pip
- ${PIP_CACHE_DIR}
- ${PRE_COMMIT_HOME}
# -- LINT JOBS -------------------------------------------------------------------------
flake8:
stage: lint
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_MIN_VERSION}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
only:
changes:
- "**/*.py"
......@@ -63,7 +64,7 @@ sast:
# -- TEST JOBS --------------------------------------------------------------------------
test:
stage: test
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_MIN_VERSION}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
before_script:
- python3 -m pip install -U -r requirements.txt
- python3 -m pip install -U -r requirements/testing.txt
......@@ -84,24 +85,24 @@ test:
# -- BUILD JOBS -------------------------------------------------------------------------
build:pip-wheel:
stage: build
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_MIN_VERSION}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
only:
refs:
- main
- tags
before_script:
- python -m pip install -U -r requirements.txt
- python -m pip install -e .
- python -m pip install -U build
script:
- python setup.py sdist bdist_wheel
- python -m build --no-isolation --sdist --wheel --outdir dist/ .
artifacts:
paths:
- .pypirc # required by job gitlab:pypi
- dist/*
build:documentation:licenses:
build:documentation:credits:
stage: build
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_MIN_VERSION}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
only:
refs:
- main
......@@ -109,30 +110,36 @@ build:documentation:licenses:
before_script:
- python -m pip install -U pip setuptools wheel
- python -m pip install -U "pip-licenses>=3.5,<5"
- python -m pip install -U "pipdeptree>=2.7,<3"
- python -m pip install -U -r requirements.txt
- python -m pip install -e .
script:
- pip-licenses --format=markdown --from mixed --with-authors --with-description --with-urls --output-file=docs/misc/licenses.md
- echo -e "\`\`\`{mermaid}" > docs/misc/dependencies.md
- pipdeptree --exclude pip,pipdeptree,pip-licenses,prettytable,setuptools,wcwidth,wheel --mermaid >> docs/misc/dependencies.md
- echo -e "\`\`\`" >> docs/misc/dependencies.md
- pip-licenses --format=markdown --with-authors --with-description --with-urls --output-file=docs/misc/licenses.md --ignore-packages pip,pipdeptree,prettytable,setuptools,wcwidth,wheel
artifacts:
name: documentation
expose_as: "License page"
name: doc_autogenerated
expose_as: Credits
paths:
- docs/misc/dependencies.md
- docs/misc/licenses.md
when: always
build:documentation:
stage: build
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_MIN_VERSION}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
only:
refs:
- main
- tags
needs:
- job: build:documentation:licenses
- job: build:documentation:credits
artifacts: true
before_script:
- python -m pip install -U -r requirements.txt
- python -m pip install -e .
- python -m pip install -U -r requirements/documentation.txt
- python3 -m pip install -U -r requirements.txt
- python3 -m pip install -U -r requirements/documentation.txt
- python3 -m pip install -e .
script:
- sphinx-build -b html -d docs/_build/cache -j auto -q docs build/docs
artifacts:
......@@ -145,7 +152,7 @@ build:documentation:
# -- DEPLOYMENT JOBS -------------------------------------------------------------------
gitlab:pypi:
stage: deploy
image: ${DOCKERHUB_PROXY}/library/python:${PYTHON_MIN_VERSION}-slim-bullseye
image: ${IMAGE_REGISTRY}/library/python:${PYTHON_VERSION_MIN}-slim-bullseye
variables:
GIT_STRATEGY: none
TWINE_PASSWORD: "${CI_JOB_TOKEN}"
......@@ -168,7 +175,7 @@ release:prepare:
stage: deploy
allow_failure: true
image:
name: ${DOCKERHUB_PROXY}/alpine/git:latest
name: ${IMAGE_REGISTRY}/alpine/git:latest
entrypoint: [""]
script:
- echo -e '## Changelog\n' >> RELEASE_DESCRIPTION.md
......
......@@ -16,6 +16,10 @@ Unreleased
-->
## 2.4.0 - 2023-07-06
- Mainly tooling upgrade
## 2.3.0 - 2023-06-27
- increase verbosity for end-users
......
FROM python:3.11-slim
FROM 690uto8c.gra7.container-registry.ovh.net/gpf-dockerhub/library/python:3.11-slim
# Write .pyc files only once. See: https://stackoverflow.com/a/60797635/2556577
ENV PYTHONDONTWRITEBYTECODE 1
......
......@@ -48,6 +48,7 @@ extensions = [
"myst_parser",
"sphinx_argparse_cli",
"sphinx_copybutton",
"sphinxcontrib.mermaid",
"sphinxext.opengraph",
]
......@@ -136,7 +137,17 @@ intersphinx_mapping = {
# -- Extension configuration -------------------------------------------------
autodoc_default_options = {
"special-members": "__init__",
}
# mermaid
mermaid_params = [
"--theme",
"forest",
"--backgroundColor",
"transparent",
]
# MyST Parser
myst_enable_extensions = [
......
......@@ -4,6 +4,16 @@
## Dependencies
> Generated with [pipdeptree](https://pypi.org/project/pipdeptree/)
```{include} dependencies.md
```
----
## Licenses
> Generated with [pip-licenses](https://pypi.org/project/pip-licenses/)
```{include} licenses.md
......
......@@ -23,7 +23,7 @@ __copyright__ = f"2022 - {date.today().year}, {__author__}"
__email__ = "info@oslandia.com"
__executable_name__ = "gpf-md5-checker"
__package_name__ = "gpf_md5_checker"
__keywords__ = ["cli, check, IGN, Géoplateforme, md5"]
__keywords__ = ["cli", "check", "IGN", "Géoplateforme", "md5"]
__license__ = "MIT"
__summary__ = (
"Vérifie l'intégrité des données publiées dans la Géoplateforme de "
......@@ -40,7 +40,7 @@ __uri_repository__ = (
__uri_tracker__ = f"{__uri_repository__}issues/"
__uri__ = __uri_repository__
__version__ = "2.3.0"
__version__ = "2.4.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
......
......@@ -11,6 +11,7 @@ from pathlib import Path
from gpf_entrepot_toolbelt.orchestrator.check_livraison import check_livraison_structure
from gpf_entrepot_toolbelt.orchestrator.models import GpfOrchestratorParameters
from gpf_entrepot_toolbelt.orchestrator.status import Status
from gpf_entrepot_toolbelt.utils.cli_arguments_types import arg_type_path_folder
from gpf_entrepot_toolbelt.utils.exit_program import fail_and_exit
from gpf_entrepot_toolbelt.utils.gpf_logger import gpf_logger_script
......@@ -25,7 +26,6 @@ from gpf_check_md5.__about__ import (
__uri_homepage__,
__version__,
)
from gpf_check_md5.constants import arg_type_path_folder
from gpf_check_md5.md5sum import run
# ############################################################################
......
#! python3 # noqa: E265
"""Static objects and variables."""
# standard lib
from argparse import ArgumentTypeError
from pathlib import Path
# 3rd party
from gpf_entrepot_toolbelt.utils.check_path import check_path
def arg_type_path_folder(input_path: Path | str) -> Path:
"""Check an argparse argument type, expecting a valid folder path.
Args:
input_path (Union[Path, str]): path to check as string or pathlib.Path
Raises:
ArgumentTypeError: if the input path is not a valid type or not a folder or
doesn't exist.
Returns:
Union[Path, ArgumentTypeError]: _description_
"""
if not check_path(
input_path=input_path,
must_exists=True,
must_be_a_folder=True,
must_be_readable=True,
must_be_writable=True,
raise_error=False,
):
raise ArgumentTypeError(
f"{input_path} is not a valid folder path. Check the logs."
)
return Path(input_path)
......@@ -139,13 +139,6 @@ def run(
chunk_size (int, optional): Size of the chunk-data in octets to load in memory. \
Defaults to 8192.
Raises:
ValueError: _description_
TypeError: _description_
ValueError: _description_
FileExistsError: _description_
exc: _description_
Returns:
Status: SUCCESS \
- FAILURE: at least one md5 error calculation \
......
# change index-url for next lines
--extra-index-url https://gitlab.gpf-tech.ign.fr/api/v4/groups/55/-/packages/pypi/simple
gpf-entrepot-toolbelt==0.19.*
gpf-entrepot-toolbelt>=0.19.5,<0.20.0
# Documentation
# -------------
furo==2022.*
myst-parser[linkify]>=0.14,<0.19
pip-licenses>=3.5,<3.6
sphinx-argparse-cli>=1,<2
sphinx-autobuild==2021.3.14
furo==2023.*
myst-parser[linkify]>=1
sphinx-argparse-cli>=1
sphinx-autobuild>=2021
sphinx-copybutton<1
sphinxext-opengraph>=0.4,<1
sphinxcontrib-mermaid>=0.8
sphinxext-opengraph>=0.4
......@@ -3,7 +3,7 @@
universal = 0
[metadata]
description-file = README.md
description_file = README.md
# -- Documentation -----------------------------------
[build_sphinx]
......