-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2022-11-02 13:19] Fixed image issues created by package updates (#81)
CHANGES: - Version increment to 2.30.0 FIXES: - Fixed version fetching which broke image functionality - Fixed the main execution function which didn't properly work due to the 'app' object no longer being properly accessible. Signed-off-by: Raoul Linnenbank <[email protected]>
- Loading branch information
1 parent
5706092
commit 5ab0eb1
Showing
7 changed files
with
87 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "weather_provider_api" | ||
version = "2.29.0" | ||
version = "2.30.0" | ||
description = "Weather Provider Libraries and API" | ||
authors = ["Verbindingsteam", "Raoul Linnenbank <[email protected]>"] | ||
license = "MPL-2.0" | ||
|
@@ -29,6 +29,7 @@ gunicorn = "^20.1.0" | |
eccodes = "^1.5.0" | ||
ecmwflibs = "^0.4.17" | ||
cfgrib = "^0.9.10.2" | ||
tomli = "^2.0.1" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^7.1.3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ | |
import tempfile | ||
from importlib import metadata as importlib_metadata | ||
|
||
import tomli | ||
|
||
|
||
class BaseConfig(object): | ||
""" Base configuration class | ||
|
@@ -23,9 +25,20 @@ class BaseConfig(object): | |
"APP_MAINTAINER_EMAIL", "[email protected]" | ||
) | ||
SHOW_MAINTAINER = os.environ.get("SHOW_MAINTAINER", False) | ||
APP_VERSION = os.environ.get("APP_VERSION", importlib_metadata.version(__package__)) | ||
APP_V1_VERSION = os.environ.get("APP_V1_VERSION", "2.0.3") | ||
APP_V2_VERSION = os.environ.get("APP_V1_VERSION", "2.0.3") | ||
|
||
default_version = None | ||
try: | ||
default_version = importlib_metadata.version(__package__) | ||
except importlib_metadata.PackageNotFoundError: | ||
with open('/pyproject.toml', mode='rb') as pyproject_file: | ||
default_version = tomli.load(pyproject_file)['tool']['poetry']['version'] | ||
finally: | ||
if not default_version: | ||
default_version = 'Version Unidentified' | ||
APP_VERSION = os.environ.get("APP_VERSION", default_version) | ||
|
||
APP_V1_VERSION = os.environ.get("APP_V1_VERSION", f"{APP_VERSION} - v1 API (1.0.3)") | ||
APP_V2_VERSION = os.environ.get("APP_V1_VERSION", f"{APP_VERSION} - v2 API (2.0.3)") | ||
APP_VALID_DATE = os.environ.get("APP_VALID_DATE", "2024-12-31") | ||
NETWORK_INTERFACE = os.environ.get("NETWORK_INTERFACE", "127.0.0.1") | ||
NETWORK_PORT = os.environ.get("NETWORK_PORT", 8080) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters