Coverage for enpt_enmapboxapp/version.py: 88%
8 statements
« prev ^ index » next coverage.py v7.4.1, created at 2024-03-05 19:40 +0000
« prev ^ index » next coverage.py v7.4.1, created at 2024-03-05 19:40 +0000
1# -*- coding: utf-8 -*-
3# enpt_enmapboxapp, A QGIS EnMAPBox plugin providing a GUI for the EnMAP processing tools (EnPT)
4#
5# Copyright (C) 2018-2024 Daniel Scheffler (GFZ Potsdam, daniel.scheffler@gfz-potsdam.de)
6#
7# This software was developed within the context of the EnMAP project supported
8# by the DLR Space Administration with funds of the German Federal Ministry of
9# Economic Affairs and Energy (on the basis of a decision by the German Bundestag:
10# 50 EE 1529) and contributions from DLR, GFZ and OHB System AG.
11#
12# This program is free software: you can redistribute it and/or modify it under
13# the terms of the GNU Lesser General Public License as published by the Free
14# Software Foundation, either version 3 of the License, or (at your option) any
15# later version.
16#
17# This program is distributed in the hope that it will be useful, but WITHOUT
18# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
20# details.
21#
22# You should have received a copy of the GNU Lesser General Public License along
23# with this program. If not, see <https://www.gnu.org/licenses/>.
25__version__ = '0.8.6'
26__versionalias__ = '20240305.01'
27__author__ = 'Daniel Scheffler'
29_minimal_enpt_version = '0.20.1'
32def check_minimal_enpt_version(enpt_version: str):
33 from packaging.version import parse as _parse_version
34 if _parse_version(enpt_version) < _parse_version(_minimal_enpt_version):
35 raise EnvironmentError(f"The installed version of EnPT (v{enpt_version}) is too old. "
36 f"At least version {_minimal_enpt_version} is required.")