RAD-tools splits into WULFRIC Read more here

Source code for radtools.decorate.stats

# RAD-tools - Sandbox (mainly condense matter plotting).
# Copyright (C) 2022-2024  Andrey Rybakov
#
# e-mail: anry@uv.es, web: rad-tools.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

from calendar import month_name
from datetime import datetime

from radtools import __doclink__, __git_hash__, __release_date__, __version__
from radtools._license import LICENSE

__all__ = ["logo", "stamp_line", "license"]






[docs] def stamp_line(date_time=True, version=True, githash=False, doclink=False): """ Return one-line information about the package. Parameters ---------- date_time : bool, default True Whether to include the release date or not. version : bool, default True Whether to include the version number or not. githash : bool, default False Whether to include the git hash or not. doclink : bool, default False Whether to include the documentation link or not. Returns ------- info : str Information about the package. """ line = [] if date_time: cd = datetime.now() line.append( f"on {cd.day} {month_name[cd.month]} {cd.year}" + f" at {cd.hour}:{cd.minute}:{cd.second} " ) line.append("by rad-tools ") if version: line.append(f"{__version__} ") if githash: line.append(f"(githash {__git_hash__}) ") if doclink: line.append(f"Documentation: {__doclink__}") return "".join(line)
[docs] def license(): """ Return the license of the package. Returns ------- license : str License of the package. """ return LICENSE