openqasm-pygments


Nameopenqasm-pygments JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://openqasm.github.io/openqasm-pygments
SummaryPygments tools for OpenQASM
upload_time2023-04-11 16:27:03
maintainer
docs_urlNone
authorOpenQASM contributors
requires_python
licenseApache 2.0 License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pygments tools for OpenQASM

[![License](https://img.shields.io/github/license/openqasm/openqasm-pygments.svg?style=popout-square)](https://opensource.org/licenses/Apache-2.0)<!--- long-description-skip-begin -->[![Release](https://img.shields.io/github/release/openqasm/openqasm-pygments.svg?style=popout-square)](https://github.com/openqasm/openqasm-pygments/releases)[![Downloads](https://img.shields.io/pypi/dm/openqasm-pygments.svg?style=popout-square)](https://pypi.org/project/openqasm-pygments/)<!--- long-description-skip-end -->

This repository provides the Python package `openqasm-pygments`, which provides
a lexer for syntax highlighting OpenQASM code with [Pygments](https://pygments.org/).
There are current three lexers included, all of which register themselves with
Pygments when this package is installed:

- `OpenQASM3Lexer` (Pygments aliases `openqasm3` and `qasm3`), for parsing
  OpenQASM 3 code.  Most OpenQASM 2 programs will lex acceptably with this lexer
  as well, except for some keyword differences.
- `OpenQASM2Lexer` (aliases `openqasm2` and `qasm2`), for lexing OpenQASM 2
  programs.
- `OpenPulseLexer` (aliases `openpulse`), for lexing the OpenPulse pulse
  calibration dialect also defined in the OpenQASM 3 specification.  For the
  most part, this lexer will not be used as a root, but the `OpenQASM3Lexer`
  will delegate lexing of calibration blocks to it, when required.


## Installation

Install the latest release of `openqasm-pygments` package from pip:

```bash
pip install openqasm-pygments
```

This will automatically install all the dependencies as well (Pygments, for
example) if they are not already installed.


## Developing

If you're looking to contribute to this project, please first read
[our contributing guidelines](CONTRIBUTING.md).

Set up your development environment by installing the development requirements
with pip:

```bash
pip install -r requirements-dev.txt tox
```

This installs a few more packages than the dependencies of the package at
runtime, because there are some tools we use for testing also included, such as
`tox` and `pytest`.

After the development requirements are installed, you can install an editable
version of the package with

```bash
pip install -e .
```

After this, any changes you make to the library code will immediately be present
when you open a new Python interpreter session.


## License

This project is licensed under [version 2.0 of the Apache License](LICENSE).
This is a Qiskit project.

            

Raw data

            {
    "_id": null,
    "home_page": "https://openqasm.github.io/openqasm-pygments",
    "name": "openqasm-pygments",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "OpenQASM contributors",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/81/4c/c4722f133b5bbef71bc8043dc1610bb72d1d724630373f046fa477aa9e3e/openqasm-pygments-0.1.2.tar.gz",
    "platform": null,
    "description": "# Pygments tools for OpenQASM\n\n[![License](https://img.shields.io/github/license/openqasm/openqasm-pygments.svg?style=popout-square)](https://opensource.org/licenses/Apache-2.0)<!--- long-description-skip-begin -->[![Release](https://img.shields.io/github/release/openqasm/openqasm-pygments.svg?style=popout-square)](https://github.com/openqasm/openqasm-pygments/releases)[![Downloads](https://img.shields.io/pypi/dm/openqasm-pygments.svg?style=popout-square)](https://pypi.org/project/openqasm-pygments/)<!--- long-description-skip-end -->\n\nThis repository provides the Python package `openqasm-pygments`, which provides\na lexer for syntax highlighting OpenQASM code with [Pygments](https://pygments.org/).\nThere are current three lexers included, all of which register themselves with\nPygments when this package is installed:\n\n- `OpenQASM3Lexer` (Pygments aliases `openqasm3` and `qasm3`), for parsing\n  OpenQASM 3 code.  Most OpenQASM 2 programs will lex acceptably with this lexer\n  as well, except for some keyword differences.\n- `OpenQASM2Lexer` (aliases `openqasm2` and `qasm2`), for lexing OpenQASM 2\n  programs.\n- `OpenPulseLexer` (aliases `openpulse`), for lexing the OpenPulse pulse\n  calibration dialect also defined in the OpenQASM 3 specification.  For the\n  most part, this lexer will not be used as a root, but the `OpenQASM3Lexer`\n  will delegate lexing of calibration blocks to it, when required.\n\n\n## Installation\n\nInstall the latest release of `openqasm-pygments` package from pip:\n\n```bash\npip install openqasm-pygments\n```\n\nThis will automatically install all the dependencies as well (Pygments, for\nexample) if they are not already installed.\n\n\n## Developing\n\nIf you're looking to contribute to this project, please first read\n[our contributing guidelines](CONTRIBUTING.md).\n\nSet up your development environment by installing the development requirements\nwith pip:\n\n```bash\npip install -r requirements-dev.txt tox\n```\n\nThis installs a few more packages than the dependencies of the package at\nruntime, because there are some tools we use for testing also included, such as\n`tox` and `pytest`.\n\nAfter the development requirements are installed, you can install an editable\nversion of the package with\n\n```bash\npip install -e .\n```\n\nAfter this, any changes you make to the library code will immediately be present\nwhen you open a new Python interpreter session.\n\n\n## License\n\nThis project is licensed under [version 2.0 of the Apache License](LICENSE).\nThis is a Qiskit project.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0 License",
    "summary": "Pygments tools for OpenQASM",
    "version": "0.1.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3761a69266cbbddd686229947052d672154589bcd5cc3fee1573be8909c657da",
                "md5": "eb14919ecd1c526f02a1aa2dd32a5362",
                "sha256": "b224632f8a535ad81609a991ffd82222330a742c6fbd444ed707f8586653ecc0"
            },
            "downloads": -1,
            "filename": "openqasm_pygments-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eb14919ecd1c526f02a1aa2dd32a5362",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18387,
            "upload_time": "2023-04-11T16:27:01",
            "upload_time_iso_8601": "2023-04-11T16:27:01.736868Z",
            "url": "https://files.pythonhosted.org/packages/37/61/a69266cbbddd686229947052d672154589bcd5cc3fee1573be8909c657da/openqasm_pygments-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "814cc4722f133b5bbef71bc8043dc1610bb72d1d724630373f046fa477aa9e3e",
                "md5": "9e1c60a810624c27872f0c7910b4c4e9",
                "sha256": "9740ce2eb13adbb1de53a1bb447eeaf5cc212aeb4560e4dbed6015c8f50e5bf9"
            },
            "downloads": -1,
            "filename": "openqasm-pygments-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "9e1c60a810624c27872f0c7910b4c4e9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 56016,
            "upload_time": "2023-04-11T16:27:03",
            "upload_time_iso_8601": "2023-04-11T16:27:03.485942Z",
            "url": "https://files.pythonhosted.org/packages/81/4c/c4722f133b5bbef71bc8043dc1610bb72d1d724630373f046fa477aa9e3e/openqasm-pygments-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-11 16:27:03",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "openqasm-pygments"
}
        
Elapsed time: 1.49993s