Skip to content

Commit

Permalink
update to 0.12.7 fix matplotlib fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanzhaozzzz committed Jun 20, 2024
1 parent f9f6567 commit 20a1d8c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bioat"
version = "0.12.6"
version = "0.12.7"
description = "Bioinformatic toolkit with python"
license = "MIT"
authors = ["Herman Zhao <[email protected]>"]
Expand Down
11 changes: 9 additions & 2 deletions src/bioat/lib/libplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from matplotlib.font_manager import FontManager
from matplotlib.patches import Rectangle

from bioat.lib.libpath import HOME
from bioat.logger import get_logger

# from matplotlib_inline import backend_inline
Expand Down Expand Up @@ -100,8 +101,14 @@ def init_matplotlib(log_level='INFO'):
func_name="init_matplotlib",
)
logger.info('Initializing matplotlib')
# _copy_fonts(log_level) # todo, I dont know who is better to copy fonts or add fonts
_add_fonts(log_level)
try:
os.remove(os.path.join(HOME, ".cache", "matplotlib", "fontlist-v330.json"))
_add_fonts(log_level)
_copy_fonts(
log_level
) # todo, I dont know who is better to copy fonts or add fonts
except:
pass
logger.debug('ref: https://matplotlib.org/stable/api/style_api.html')
logger.info("set: plt.style.use('ggplot') # use ggplot style")
plt.style.use('ggplot')
Expand Down
2 changes: 1 addition & 1 deletion src/bioat/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
project_toml: str = os.path.join(bioat.__path__[0], "version.py")
sec = os.path.getmtime(project_toml)
__upgrade_date__ = datetime.date.fromtimestamp(sec)
__version__ = "0.12.6"
__version__ = "0.12.7"

__author__ = "Huanan Herman ZHAO @ Tsinghua University"
__email__ = "hermanzhaozzzz AT gmail.com"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bioat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def test_version_info():
assert bioat.__version__ == "0.12.6"
assert bioat.__version__ == "0.12.7"
assert bioat.__author__ == "Huanan Herman ZHAO @ Tsinghua University"
assert bioat.__doc_format__ == "sphinx"
# !same with vscode setting
Expand Down

0 comments on commit 20a1d8c

Please sign in to comment.