Skip to main content

extract data structures from docx/HTML specification

Project description

NVMe-Spex

Build status python Code style: black Mypy checked

What is NVMe-Spex?

NVMe-Spex is a tool for linting- and generating a structured representation of the data-structures contained in an NVMe specification document(https://nvmexpress.org/).

NVMe-Spex provides two front-ends to interact with the tool. The most basic interface to interact with NVMe-Spex is the command line tool as an alternative a web-application is also provided where the docx/html files can be uploaded and processed.

Please see the full documentation at: https://samsungds.github.io/Spex/

Installing NVMe-Spex

There are multiple options for installing NVME-Spex. The list of supported method is: Nix package, python package, docker image and installing nvme-spex from source.

Dependencies

NVME-Spex has libxml2(https://gitlab.gnome.org/GNOME/libxml2) as a dependency. In any other case than for Nix and docker installs it is necessary to install libxml2 manually.

Apt based Linux

For apt based systems such as debian or ubuntu the following commands will install libxml2:

sudo apt update

sudo apt install libxml2-dev

OSX

Open a terminal and issue the following command to install libxml2:

brew install libxml2

Installing with Nix

Given a copy of Nix, the environment will be automatically configured, and is guaranteed to match the environment in which we develop and for which CI testing is done.

See https://samsungds.github.io/Spex/setup/nix.html for details.

NOTE Nix works natively on Linux and MacOS, and on Windows via WSL. See the link above for notes on installing- and using Nix on all 3 platforms.

Installing with pipx

It is possible to install the nvme-spex tool directly from pypi.org via the pipx or pip tool. The nvme-spex tool is build with lxml and therefor has a none python dependency that needs to be installed which is libxml2. See instructions for you particular operation systems to install libxml2.

When the dependency is met is is possible to install nvme-spex with following command:

pipx install nvme-spex

NOTE that in this case, you will still need Python 3.11 or later and libxml2.

Installing webserver with docker

NVMe-Spex is also packaged as a docker container image and can the newest release can be pulled and run by executing the following docker commands:

docker pull ghcr.io/samsungds/nvme-spex-webserver:latest

docker run -p 8000:8000 ghcr.io/samsungds/nvme-spex-webserver:latest

When the docker container is successfully running the web application can be accessed in the browser at http://localhost:8000 .

Note for Windows it is possible to install docker though the docker desktop(https://docs.docker.com/desktop/install/windows-install/) or the podman project (https://podman.io/docs/installation). We aware of docker desktops licensing model.

Installing from source

Clone repository with git:

git clone git@github.com:SamsungDS/Spex.git

cd spex

make build install

make build install build the package and installs Spex for your user in a separate Python virtual environment - meaning the dependencies of Spex are not impacted by other Python software you install. make uninstall removes Spex, if installed.

NOTE that in this case, you will still need Python 3.11 or later and libxml2.

Using Spex

See https://samsungds.github.io/Spex/user_guide/using_spex.html for details.

Setting up the development environment

Note that targets like build, check, format and docs all expect to operate in a properly configured environment.

To understand your options, see https://samsungds.github.io/Spex/setup/index.html

Finally, if you use nix, make dev will put you inside a properly configured development environment.

make check

This target runs all the tests that our regular CI run would to ensure the software is in a good state. If you make modifications, please run this before submitting.

make format

This target automatically re-arranges package imports and reformats the code to comply with our coding standards. Please use this ahead of submitting changes.

make docs

This target builds the documentation locally. This is mostly useful when writing previewing changes to the documentation locally.

make build | clean

These targets respectively build and removes a source distribution python package. You most likely won't need or want this.

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

nvme_spex-0.7.tar.gz (122.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nvme_spex-0.7-py2.py3-none-any.whl (139.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file nvme_spex-0.7.tar.gz.

File metadata

  • Download URL: nvme_spex-0.7.tar.gz
  • Upload date:
  • Size: 122.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for nvme_spex-0.7.tar.gz
Algorithm Hash digest
SHA256 14e16b9689e3c57649ec7cc06d1d37769c85cc665361320270bb2c470ac2a54d
MD5 28c42b647378ec02ac6656d6251f0956
BLAKE2b-256 fcb6e85ce76df1a152cb85805666c234c177c9788834fba9190423ff9a58620d

See more details on using hashes here.

File details

Details for the file nvme_spex-0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: nvme_spex-0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 139.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for nvme_spex-0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 16c90079f9fe06624bc4d905ff1d7c272d314cf7de43c5ac51d59eb70d545646
MD5 d2d96cb0ede86e18297f1d65d1b6be38
BLAKE2b-256 e385f581d2be79ed30367cb98b89efda7773cee35627acdb1d340bba7b0a9bb0

See more details on using hashes here.

Supported by

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