transidate


Nametransidate JSON
Version 0.4.0 PyPI version JSON
download
home_page
SummaryCommandline tool for XML transit data validation.
upload_time2023-01-18 20:41:55
maintainer
docs_urlNone
authorCiaran McCormick
requires_python>=3.7,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/transidate.svg)](https://badge.fury.io/py/transidate)
[![test](https://github.com/ciaranmccormick/transidate/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/ciaranmccormick/transidate/actions/workflows/test.yaml)
[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/ciaranmccormick/transidate/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)
[![codecov](https://codecov.io/gh/ciaranmccormick/transidate/branch/develop/graph/badge.svg?token=I3693DR0S9)](https://codecov.io/gh/ciaranmccormick/transidate)


# Transidate

Transidate is a commandline tool for validating transit data files such as TransXChange
NeTEx and SIRI.

Transidate can validate several transit data formats out of the box.

## Compatibility

Transidate requires Python 3.7 or later.


## Installing

Install transidate using `pip` or any other PyPi package manager.

```sh
pip install transidate
```

## Validate an XML file

Transidate comes with a help guide to get you started. This will list all the options as
well as the transit data formats that are supported.

```sh
transidate --help
```

To validate a data source just specify the path to the data and the schema to validate
the data against. If the `--version` is not specified the data is automatically
validated again TransXChange v2.4.

```sh
transidate validate --version TXC2.4 linear.xml
```

![XML with no violations](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidategoodfile.gif)
If transidate finds any schema violations it will print the details of the violation
such as the file it occurred in, the line number of the violation and details.

![XML with violations](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidatebadfile.gif)
## Validate many files at once

You can also use transidate to validate a archived collection of files.

```sh
transidate validate --version TXC2.4 routes.zip
```

![Zip with no violations](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidategoodzip.gif)
This will iterate over each XML file contained within the zip and collate all the
violations.

![Zip with violations](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidatebadzip.gif)
## Export violations to CSV

Schema violations can be saved to a CSV file using the `--csv` flag.

```sh
transidate validate --version TXC2.4 --csv routes.zip
```

## Configuration

Transidate comes configured with several schemas out of the box. It is really
easy to add your own schema validators to `transidate`. The first step is to
create a configuration file e.g. `touch transidate.cfg`.

Transidate fetches schemas from web in a zip format, to add a schema you
just need to define the name, url and root.

```ini
[MYSCHEMA] # The 'version'
url=http://linktoschema.url/schema.zip # where transidate can get the schema
root=schema_root_file.xml # the root of the schema
```

Then you can just pass the schema configuration using `--schemas`.

```sh
transidate validate --version MYSCHEMA --schemas transidate.cfg linear.xml
```

You can list all the avialble schemas list th `list` command.

```sh
transidate list
```

![List schemas](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidatelist.gif)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "transidate",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Ciaran McCormick",
    "author_email": "ciaran@ciaranmccormick.com",
    "download_url": "https://files.pythonhosted.org/packages/79/10/a4da22774458a7d4f12c688a1ce63e1398cd7e1d46fc836ea276484ff45b/transidate-0.4.0.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/transidate.svg)](https://badge.fury.io/py/transidate)\n[![test](https://github.com/ciaranmccormick/transidate/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/ciaranmccormick/transidate/actions/workflows/test.yaml)\n[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/ciaranmccormick/transidate/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)\n[![codecov](https://codecov.io/gh/ciaranmccormick/transidate/branch/develop/graph/badge.svg?token=I3693DR0S9)](https://codecov.io/gh/ciaranmccormick/transidate)\n\n\n# Transidate\n\nTransidate is a commandline tool for validating transit data files such as TransXChange\nNeTEx and SIRI.\n\nTransidate can validate several transit data formats out of the box.\n\n## Compatibility\n\nTransidate requires Python 3.7 or later.\n\n\n## Installing\n\nInstall transidate using `pip` or any other PyPi package manager.\n\n```sh\npip install transidate\n```\n\n## Validate an XML file\n\nTransidate comes with a help guide to get you started. This will list all the options as\nwell as the transit data formats that are supported.\n\n```sh\ntransidate --help\n```\n\nTo validate a data source just specify the path to the data and the schema to validate\nthe data against. If the `--version` is not specified the data is automatically\nvalidated again TransXChange v2.4.\n\n```sh\ntransidate validate --version TXC2.4 linear.xml\n```\n\n![XML with no violations](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidategoodfile.gif)\nIf transidate finds any schema violations it will print the details of the violation\nsuch as the file it occurred in, the line number of the violation and details.\n\n![XML with violations](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidatebadfile.gif)\n## Validate many files at once\n\nYou can also use transidate to validate a archived collection of files.\n\n```sh\ntransidate validate --version TXC2.4 routes.zip\n```\n\n![Zip with no violations](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidategoodzip.gif)\nThis will iterate over each XML file contained within the zip and collate all the\nviolations.\n\n![Zip with violations](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidatebadzip.gif)\n## Export violations to CSV\n\nSchema violations can be saved to a CSV file using the `--csv` flag.\n\n```sh\ntransidate validate --version TXC2.4 --csv routes.zip\n```\n\n## Configuration\n\nTransidate comes configured with several schemas out of the box. It is really\neasy to add your own schema validators to `transidate`. The first step is to\ncreate a configuration file e.g. `touch transidate.cfg`.\n\nTransidate fetches schemas from web in a zip format, to add a schema you\njust need to define the name, url and root.\n\n```ini\n[MYSCHEMA] # The 'version'\nurl=http://linktoschema.url/schema.zip # where transidate can get the schema\nroot=schema_root_file.xml # the root of the schema\n```\n\nThen you can just pass the schema configuration using `--schemas`.\n\n```sh\ntransidate validate --version MYSCHEMA --schemas transidate.cfg linear.xml\n```\n\nYou can list all the avialble schemas list th `list` command.\n\n```sh\ntransidate list\n```\n\n![List schemas](https://raw.githubusercontent.com/ciaranmccormick/transidate/main/imgs/transidatelist.gif)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Commandline tool for XML transit data validation.",
    "version": "0.4.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d3c73292e067342832197ec0166669dbab43b6c1012015df40ef2e30c07b67d2",
                "md5": "1ab874cb4c49820885d32eeed9c3cc3b",
                "sha256": "acba43ec42c2b6758a10a5fecdfbbf1ab245867698edf84e84307a15ac947b6f"
            },
            "downloads": -1,
            "filename": "transidate-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1ab874cb4c49820885d32eeed9c3cc3b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 8224,
            "upload_time": "2023-01-18T20:41:54",
            "upload_time_iso_8601": "2023-01-18T20:41:54.244798Z",
            "url": "https://files.pythonhosted.org/packages/d3/c7/3292e067342832197ec0166669dbab43b6c1012015df40ef2e30c07b67d2/transidate-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7910a4da22774458a7d4f12c688a1ce63e1398cd7e1d46fc836ea276484ff45b",
                "md5": "2e1a63f4c1a53fe6503773ef76637fcb",
                "sha256": "5a5b6e29e366ca471ad6b5949bc9bf3147e3814f020280a394279e8ffd28d634"
            },
            "downloads": -1,
            "filename": "transidate-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2e1a63f4c1a53fe6503773ef76637fcb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 7660,
            "upload_time": "2023-01-18T20:41:55",
            "upload_time_iso_8601": "2023-01-18T20:41:55.732619Z",
            "url": "https://files.pythonhosted.org/packages/79/10/a4da22774458a7d4f12c688a1ce63e1398cd7e1d46fc836ea276484ff45b/transidate-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-18 20:41:55",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "transidate"
}
        
Elapsed time: 0.07797s