Skip to content

Commit

Permalink
Bugfix #475 main_v3.0 - make default configs available in package (#477)
Browse files Browse the repository at this point in the history
* fix version number for rc1

* get version number from verison file

* per #475, add default config files to python package

* prevent GPU failure running in containers by running kaleido with single process option
  • Loading branch information
georgemccabe authored Nov 20, 2024
1 parent d41facd commit e058faa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
os.pardir)))
print(sys.path)

from metplotpy import __version__ as version

# -- Project information -----------------------------------------------------

project = 'METplotpy'
copyright = '2024, NSF NCAR'
author = 'UCAR/NSF NCAR, NOAA, CSU/CIRA, and CU/CIRES'
author_list = 'Fisher, H., D. Adriaansen, C. Kalb, D. Fillmore, T. Jensen, L. Goodrich, M. Win-Gildenmeister and T. Burek'
version = 'v3.1.0-beta1-dev'

verinfo = version
release = f'{version}'
release_year = '2024'
Expand Down
2 changes: 1 addition & 1 deletion metplotpy/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.0.0-beta6-dev"
__version__ = "3.0.0-rc1"
5 changes: 4 additions & 1 deletion metplotpy/plots/base_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@
import yaml
from typing import Union

import plotly.io as pio

import metplotpy.plots.util
from .config import Config
from metplotpy.plots.context_filter import ContextFilter


# set kaleido to use single process to prevent GPU errors in containers
pio.kaleido.scope.chromium_args += ("--single-process",)

class BasePlot:
"""A class that provides methods for building Plotly plot's common features
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ version = {attr = "metplotpy.__version__"}
[tool.setuptools.packages]
find = {include = ["metplotpy*"]}

[tool.setuptools.package-data]
metplotpy = [
"plots/config/**",
]

[tool.pytest.ini_options]
testpaths = ["test"]

Expand Down

0 comments on commit e058faa

Please sign in to comment.