Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rsgoncalves committed Oct 1, 2024
1 parent fe59cf8 commit ac2173e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 86 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/mapper-test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README-UI.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ontology-mapper-ui
The following information pertains to the text2term UI, which is written [here](https://github.com/ccb-hms/ontology-mapper-ui) and runs online [here](https://text2term.hms.harvard.edu/). It supports fewer features than the base package does, but provides a user interface for non-programmers.
The following information pertains to the text2term UI, which is written [here](https://github.com/rsgoncalves/text2term-ui) and runs online [here](https://text2term.hms.harvard.edu/). It supports fewer features than the base package does, but provides a user interface for non-programmers.

### Running Locally via Node + Python

Expand Down
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<a href="https://pypi.org/project/text2term" target="_blank">
<img alt="PyPI" src="https://img.shields.io/pypi/v/text2term" />
</a>
<a href="https://github.com/ccb-hms/ontology-mapper/blob/main/LICENSE" target="_blank">
<a href="https://github.com/rsgoncalves/text2term/blob/main/LICENSE" target="_blank">
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/text2term" />
</a>
<a href="https://github.com/ccb-hms/ontology-mapper/actions/workflows/github_test.yml" target="_blank">
<img alt="Tests" src="https://github.com/ccb-hms/ontology-mapper/actions/workflows/github_test.yml/badge.svg" />
<a href="https://github.com/rsgoncalves/text2term/actions/workflows/github_test.yml" target="_blank">
<img alt="Tests" src="https://github.com/rsgoncalves/text2term/actions/workflows/github_test.yml/badge.svg" />
</a>
<a href="https://doi.org/10.48550/arXiv.2407.02626" target="_blank">
<img alt="arXiv preprint" src="https://img.shields.io/badge/DOI-arXiv:2407.02626-orange" />
Expand Down Expand Up @@ -80,7 +80,19 @@ dfo = mondo.map_terms(source_terms=["asthma", "acute bronchitis"])


### Examples of Command Line Interface Use
To show a help message describing all arguments type into a terminal:
To use text2term from the command-line, the current working folder (in the command line) must be the folder containing the text2term package. This can be achieved as follows:

Identify where pip installed text2term using:
```pip show texterm```

Change to the directory specified in the “Location” field, e.g.:

```cd /opt/homebrew/lib/python3.9/site-packages```

> [!NOTE]
> If the tool is cloned from GitHub and then installed using `pip install path/to/text2term`—where `path/to/text2term` is the cloned folder containing `setup.py`—then text2term can be called from that folder
Then you can run text2term commands from the terminal. For example, to show a help message describing all arguments type into a terminal:
```shell
python text2term --help
```
Expand Down Expand Up @@ -205,7 +217,7 @@ text2term.cache_ontology(ontology_url, ontology_acronym="", base_iris=())
```
This caches a single ontology from a URL or file path, and takes an optional acronym that will be used to reference the cached ontology later. If no acronym is given, the URL is used as the name.

It is also possible to cache multiple ontologies, whose names and URLs are specified in a table formatted as such `acronym,version,url`. An example is provided in [resources/ontologies.csv](https://github.com/ccb-hms/ontology-mapper/blob/main/text2term/resources/ontologies.csv):
It is also possible to cache multiple ontologies, whose names and URLs are specified in a table formatted as such `acronym,version,url`. An example is provided in [resources/ontologies.csv](https://github.com/rsgoncalves/text2term/blob/main/text2term/resources/ontologies.csv):
```python
text2term.cache_ontology_set(ontology_registry_path)
```
Expand Down
1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

html_theme = 'pyramid'
html_static_path = ['_static']
# html_logo = "ccb_logo.jpg"
html_theme_options = {
'sidebarwidth': 280
}
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
install_requires=requirements,
packages=find_packages(),
include_package_data=True,
url='https://github.com/ccb-hms/ontology-mapper',
url='https://github.com/rsgoncalves/text2term',
license='MIT',
description=description,
long_description=long_description,
long_description_content_type='text/markdown',
author='Center for Computational Biomedicine, Harvard Medical School',
author='Rafael Goncalves, Jason Payne',
author_email='rsgoncalves@gmx.com',
classifiers=[
'Development Status :: 4 - Beta',
Expand Down
2 changes: 1 addition & 1 deletion text2term/config.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "4.2.1"
VERSION = "4.3.0"

0 comments on commit ac2173e

Please sign in to comment.