Skip to main content

Generates alt text for UpSet plots

Project description

:sparkles: upset-alt-txt-gen Tests

Design experiments for generating semantically meaningful alt-text. This work is adapted from:

Alan Lundgard AND Arvind Satyanarayan (2022). Accessible Visualization via 
Natural Language Descriptions: A Four-Level Model of Semantic Content. IEEE 
Transactions on Visualization & Computer Graphics (Proc. IEEE VIS).

Local Deployment

  1. Clone the repository using git clone or download and extract the zip file.
  2. Ensure you have python version >= 3.8.10 installed.
  3. Open a terminal in the repository directory and create and activate a python virtual environment running at least Python 3.8.10. For information on how to do this, navigate here.
  4. Install the required dependencies using pip install -r requirements.txt.
  5. (Optional) Install the required development dependencies using pip install -r requirements-dev.txt. These are only required if you plan on running the tests or linting.
  6. Install the alttxt module in development mode with pip install -e .

To run the alt-text-gen program, run python3 [path/to/generator.py] --data [path/to/data] --grammar [path/to/grammar]. See Command Line Options for more information.

To run the program with the example data, run python [path/to/alttxt directory] --data ../../data/movie_data_card_sort.json --level 2 --verbosity medium while in the src/alttxt directory. Level and granularity can be changed to any of the options listed in Command Line Options.

Local Testing

Local testing can be done using the tox command. Tests have not been updated to match the latest updates to the repository, and updating them is currently on hold, as deployment is a priority over robustness.

  • Linting: To run the linting tests, run tox -e lint
  • Type: To run the type tests, run tox -e type
  • Tests: To run the python tests, run tox -e test
  • Formatting: To automatically format the files to match the flake8-black standards, run tox -e format

To run the entire suite of tests at once, use tox.

Command Line Options

Command Description
-h, --help Show information on each command and exit.
-V, --version Show the program version number and exit.
-D, --data (Required) Relative path to data file.
-l, --level Semantic level. Defaults to 1. Options are: 0, 1, and 2. 3 TBA.
-v, --verbosity Alt-text verbosity. Defaults to medium. Options: low, medium, high.
-e, --explain-upset Whether to explain UpSet plots generally. Defaults to none. Options: none, simple, full.
-t, --title A title for the plot; used in some generations. Defaults to has no title.
------------------------ -------------------------------------------------------------------------------------------------

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upset-alttxt-0.1.7.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

upset_alttxt-0.1.7-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file upset-alttxt-0.1.7.tar.gz.

File metadata

  • Download URL: upset-alttxt-0.1.7.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for upset-alttxt-0.1.7.tar.gz
Algorithm Hash digest
SHA256 1baec584e58a1d690988e3ff588dcff8a6463ca456459e229e67ac67e16ac74b
MD5 638611bdb4e943c13eda1d2cd549c4b3
BLAKE2b-256 e4b02a82cf4e73f7c3869df6efeb5d4406e6110b9dce268ef1e4079de28b4636

See more details on using hashes here.

File details

Details for the file upset_alttxt-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for upset_alttxt-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 78affe2145a26a25522e939d0e487dc3afd4f5dc2a62b6b0d44f54f0263ba083
MD5 a7e60741739ce059254efce645a6bafa
BLAKE2b-256 d93d9358aac80551fb382088e8aa94746face5dc42908b224f982753e80d63ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page