{ "cells": [ { "cell_type": "markdown", "id": "bec25f1a", "metadata": {}, "source": [ "# Update the Text-Fabric package (generic)" ] }, { "cell_type": "markdown", "id": "fa7f85d5", "metadata": { "tags": [] }, "source": [ "## Table of content (TOC)\n", "* 1 - Introduction\n", "* 2 - Managing the installed Text-Fabric versions\n", " * 2.1 - Obtain details on the available Text-Fabric version\n", " * 2.2 - Obtain the current installed Text-Fabric version\n", " * 2.3 - Upgrade to the latest Text-Fabric version\n", " * 2.4 - Update to a specific Text-Fabric version\n", "* 3 - Notebook version" ] }, { "cell_type": "markdown", "id": "c2c48614-5571-47f8-b70c-28f1ea58f97b", "metadata": { "tags": [] }, "source": [ "# 1 - Introduction \n", "##### [Back to TOC](#TOC)\n", "\n", "To ensure optimal performance and access to the latest features, it's important to regularly update your Python environment, including the Text-Fabric package. This Jupyter Notebook offers step-by-step instructions to check the current version of Text-Fabric and update it to the latest release or a specific version, as needed. \n", "\n", "The format of these commands can be used in any cell within a Jupyter Notebook. When running the commands in a shell, you can omit the trailing exclamation mark (!)." ] }, { "cell_type": "markdown", "id": "5952f103-49a4-4628-8816-a3c911769002", "metadata": {}, "source": [ "# 2 - Managing the installed Text-Fabric versions\n", "##### [Back to TOC](#TOC)\n", "\n", "The following activities are described in this section of the Notebook:\n", "* Obtain details on the available Text-Fabric version\n", "* Obtain the current installed Text-Fabric version\n", "* Upgrade to the latest Text-Fabric version\n", "* Update to a specific Text-Fabric version" ] }, { "cell_type": "markdown", "id": "5a76809c-93da-483d-b7c8-45fdaab3a2de", "metadata": {}, "source": [ "## 2.1 - Obtain details on the available Text-Fabric version\n", "\n", "An overview of the available Text-Fabric version can be obtained from the page with recent [Text-Fabric release notes](https://annotation.github.io/text-fabric/tf/about/releases.html)." ] }, { "cell_type": "markdown", "id": "65c63175-3e02-41ee-b140-432606b6d95c", "metadata": {}, "source": [ "## 2.2 - Obtain the current installed Text-Fabric version\n", "\n", "The following will list the text-fabric package along with its version:\n", "\n", "```python\n", "# Check the current version of Text-Fabric\n", "!pip show text-fabric\n", "```\n", "When executing this in a Jupyter Notebook cell it will output something like:\n", "\n", "
\n", "Name: text-fabric\n", "Version: 12.5.3\n", "Summary: Processor and browser for annotated text corpora\n", "Home-page: https://github.com/annotation/text-fabric\n", "Author: Dirk Roorda\n", "Author-email: dirk.roorda@di.huc.knaw.nl\n", "License: \n", "Location: C:\\Users\\tonyj\\anaconda3\\envs\\Text-Fabric\\Lib\\site-packages\n", "Requires: flask, ipython, markdown, pyyaml, requests, wheel\n", "Required-by:\n", "\n", "\n", "Note that in the Notebook viewer the exclamation mark is enclosed in a red box which helps users to see that this line is a shell command and not standard Python code." ] }, { "cell_type": "markdown", "id": "33b2a94e-3e7d-4bb7-9c47-40de5edc86f3", "metadata": {}, "source": [ "## 2.3 - Upgrade to the latest Text-Fabric version\n", "\n", "To upgrade to the latest release of Text-Fabric the following command can be used:\n", "\n", "```python\n", "# Update Text-Fabric to the latest version\n", "!pip install --upgrade text-fabric\n", "```\n", "\n", "When executing this in a Jupyter Notebook cell the following output is shown (which is abbreviated here):\n", "\n", "
\n", "Requirement already satisfied: text-fabric in c:\\users\\tonyj\\anaconda3\\envs\\text-fabric\\lib\\site-packages (12.5.1)\n", "Collecting text-fabric\n", " Using cached text_fabric-12.5.3-py3-none-any.whl.metadata (1.9 kB)\n", "Requirement already satisfied: wheel in c:\\users\\tonyj\\anaconda3\\envs\\text-fabric\\lib\\site-packages (from text-fabric) (0.41.2)\n", "...\n", "Requirement already satisfied: six in c:\\users\\tonyj\\anaconda3\\envs\\text-fabric\\lib\\site-packages (from asttokens->stack-data->ipython->text-fabric) (1.16.0)\n", "Using cached text_fabric-12.5.3-py3-none-any.whl (12.3 MB)\n", "Installing collected packages: text-fabric\n", " Attempting uninstall: text-fabric\n", " Found existing installation: text-fabric 12.5.1\n", " Uninstalling text-fabric-12.5.1:\n", " Successfully uninstalled text-fabric-12.5.1\n", "Successfully installed text-fabric-12.5.3\n", "" ] }, { "cell_type": "markdown", "id": "05c22a4a-532e-47df-bd5a-2709b7c06338", "metadata": {}, "source": [ "## 2.4 - Update to a specific Text-Fabric version\n", "\n", "In certain cases, it may be necessary to load a specific version of Text-Fabric. For example, if the analysis described in a publication uses a specific Text-Fabric version, you might need to use the same version to reproduce the results. This typically involves downgrading to an earlier version.\n", "\n", "Downgrading to an earlier Text-Fabric version can be done using the following command:\n", "\n", "```python\n", "!pip install text-fabric==<desired_version>\n", "``` \n", "\n", "Where <desired_version> is the unqouted version number. For example to downgrade to version 12.5.1 the following command can be used:\n", "\n", "```python\n", "# Update Text-Fabric to version 12.5.1\n", "!pip install text-fabric==12.5.1\n", "``` \n", "\n", "As example, when downgrading from version 12.5.3, the following output is shown (which is abbreviated here):\n", "\n", "
\n", " Collecting text-fabric==12.5.1\n", " Downloading text_fabric-12.5.1-py3-none-any.whl.metadata (1.9 kB)\n", "Requirement already satisfied: wheel in c:\\users\\tonyj\\anaconda3\\envs\\text-fabric\\lib\\site-packages (from text-fabric==12.5.1) (0.41.2)\n", "...\n", "Requirement already satisfied: six in c:\\users\\tonyj\\anaconda3\\envs\\text-fabric\\lib\\site-packages (from asttokens->stack-data->ipython->text-fabric==12.5.1) (1.16.0)\n", "Downloading text_fabric-12.5.1-py3-none-any.whl (12.3 MB)\n", " ---------------------------------------- 0.0/12.3 MB ? eta -:--:--\n", " ...\n", " ---------------------------------------- 12.3/12.3 MB 4.3 MB/s eta 0:00:00\n", "Installing collected packages: text-fabric\n", " Attempting uninstall: text-fabric\n", " Found existing installation: text-fabric 12.5.3\n", " Uninstalling text-fabric-12.5.3:\n", " Successfully uninstalled text-fabric-12.5.3\n", "Successfully installed text-fabric-12.5.1\n", "" ] }, { "cell_type": "markdown", "id": "a5705e69-0488-4dc4-a5fc-d1a3d2c44641", "metadata": {}, "source": [ "# 3 - Notebook version\n", "##### [Back to TOC](#TOC)\n", "\n", "
Author | \n", "Tony Jurg | \n", "
Version | \n", "1.1 | \n", "
Date | \n", "9 October 2024 | \n", "