{ "cells": [ { "cell_type": "markdown", "id": "4581b3c7", "metadata": {}, "source": [ "# Check wolfhece version package" ] }, { "cell_type": "code", "execution_count": 1, "id": "61d7b875", "metadata": {}, "outputs": [], "source": [ "import wolfhece" ] }, { "cell_type": "markdown", "id": "a62d5ce5", "metadata": {}, "source": [ "## Current version" ] }, { "cell_type": "code", "execution_count": 2, "id": "feeb867a", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2.2.64\n" ] } ], "source": [ "print(wolfhece.__version__)" ] }, { "cell_type": "markdown", "id": "65de4bf4", "metadata": {}, "source": [ "## Version available on Pypi" ] }, { "cell_type": "code", "execution_count": 3, "id": "e3535e68", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wolfhece.can_upgrade_wolfhece()" ] }, { "cell_type": "code", "execution_count": 4, "id": "f9738c5e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'2.2.65'" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wolfhece.check_available_version_on_pypi()" ] }, { "cell_type": "markdown", "id": "61526ab4", "metadata": {}, "source": [ "## Test if the current version is sufficient" ] }, { "cell_type": "code", "execution_count": 5, "id": "0c1ba5de", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "INFO:root:Version de wolfhece : 2.2.20 ou supérieure est installée.\n" ] } ], "source": [ "wolfhece.check_version(min_version= '2.2.20')" ] }, { "cell_type": "code", "execution_count": 6, "id": "0422e955", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wolfhece.is_enough(min_version= '2.2.20')" ] }, { "cell_type": "markdown", "id": "9112c4b6", "metadata": {}, "source": [ "## Change the logging level (default is INFO)" ] }, { "cell_type": "code", "execution_count": 8, "id": "3cc48133", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "CRITICAL:root:This is a CRITICAL message\n" ] } ], "source": [ "# wolfhece.set_logging_level('DEBUG')\n", "# wolfhece.set_logging_level('INFO')\n", "# wolfhece.set_logging_level('WARNING')\n", "# wolfhece.set_logging_level('ERROR')\n", "wolfhece.set_logging_level('CRITICAL')" ] } ], "metadata": { "kernelspec": { "display_name": "python311", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.9" } }, "nbformat": 4, "nbformat_minor": 5 }