ostdetector


Nameostdetector JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/ricardojob/OSTDetector
SummaryA tool for extracting of OS-Specific Tests
upload_time2025-08-08 13:21:42
maintainerNone
docs_urlNone
authorRicardo Job
requires_python~=3.8
licenseMIT
keywords os-specific test detect tool
VCS
bugtrack_url
requirements astunparse click smmap jsonschema coverage pytest pygments pydriller
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Tests](https://github.com/ricardojob/psae/actions/workflows/tests.yaml/badge.svg)](https://github.com/ricardojob/ostdetector/actions/workflows/tests.yaml)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/psae)](https://pypi.org/project/ostdetector/)

# OSTDetector

An automated tool for extracting OS-specific Tests from Git repositories written in Python. 
The `ostdetector` (**O**perating System-**S**pecific **T**ests **D**etector) is primarily designed to be used as a command-line tool. 
With `ostdetector`, you can easily extract information about the OS-specific Tests from the Git repository (only python files are analyzed).
The set of OS-specific Tests are saved in a given CSV file.

## Install

The easiest way to install `ostdetector` is to install from Pypi

```
pip install -i https://test.pypi.org/simple/ ostdetector==1.0.5
```

Alternatively, you can install from `test environment`
```
pip install --index-url https://test.pypi.org/simple/ --no-deps ostdetector
```

You may wish to use this tool in a virtual environment. You can use the following commands.

```
virtualenv ostdetector_venv
source ostdetector_venv/bin/activate
pip install ostdetector
```

## Quick examples

As an example, the following command extracts every OS-Specific Testes from the repository `ricardojob/ostdetector`. 
It also saves various information (line, module, filename ...) in directory `dir_output`. 
This information will be available in the output file.

```bash
ostdetector ricardojob/ostdetector -o dir_output
```

Note that the tool also can fetch it. 
For example, the GitHub repository `https://github.com/ricardojob/ostdetector` will be fetched, saved under the `dir_output/ricardojob` directory.
Note that, by default all projects are cloned to the `data` directory.


## Usage

After installation, the `ostdetector` command-line tool should be available in your shell. 
Otherwise, please replace `ostdetector` by `python -m ostdetector`. 
The explanations in the following stays valid in both cases.

You can use `ostdetector` with the following arguments:

```
Usage: ostdetector [OPTIONS] REPOSITORY

  Extract the usage of OS-Specific Tests from a single Git repository
  `REPOSITORY`. The Git repository can be remote. It will be pulled locally in
  the folder `data`. Every extracted OS-Specific Tests will be written in the
  dir given to `-o`, or in the `data' if not specified.

  Example of usage: python main.py ricardojob/OSTDetector -o data_experiment

Options:
  -o, --output DIRECTORY  The output dir where the usage of OS-Specific Tests
                          related to the repository will be stored. By
                          default, the information will written to `data' dir.
  -h, --help              Show this message and exit.
```

The `*compare.csv' file given to directory `-o` will contain the following columns:
- `project_name`: the name of the repository
- `project_hash`: the commit SHA of the commit where the OS-specific tests file was extracted
- `line`: the line where the OS-specific tests usage occurs
- `module`: the module that packages the OS-specific tests (e.g., sys)
- `package`: the API (e.g., platform)
- `platform`: the information about OS (e.g, win32)
- `file`: the file name
- `function`: the function name
- `method_type`: the method type (method_test or support)
- `url`: the URL that represents the API usage on Github

## License

Distributed under [MIT License](https://github.com/ricardojob/ostdetector/blob/main/LICENSE.txt).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ricardojob/OSTDetector",
    "name": "ostdetector",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": "os-specific test detect tool",
    "author": "Ricardo Job",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/16/b8/ab1f7596f74c4aba2d1e4459dfaadc82cec7de4c3c0dbe1a56fc5e94aace/ostdetector-1.0.1.tar.gz",
    "platform": null,
    "description": "[![Tests](https://github.com/ricardojob/psae/actions/workflows/tests.yaml/badge.svg)](https://github.com/ricardojob/ostdetector/actions/workflows/tests.yaml)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/psae)](https://pypi.org/project/ostdetector/)\n\n# OSTDetector\n\nAn automated tool for extracting OS-specific Tests from Git repositories written in Python. \nThe `ostdetector` (**O**perating System-**S**pecific **T**ests **D**etector) is primarily designed to be used as a command-line tool. \nWith `ostdetector`, you can easily extract information about the OS-specific Tests from the Git repository (only python files are analyzed).\nThe set of OS-specific Tests are saved in a given CSV file.\n\n## Install\n\nThe easiest way to install `ostdetector` is to install from Pypi\n\n```\npip install -i https://test.pypi.org/simple/ ostdetector==1.0.5\n```\n\nAlternatively, you can install from `test environment`\n```\npip install --index-url https://test.pypi.org/simple/ --no-deps ostdetector\n```\n\nYou may wish to use this tool in a virtual environment. You can use the following commands.\n\n```\nvirtualenv ostdetector_venv\nsource ostdetector_venv/bin/activate\npip install ostdetector\n```\n\n## Quick examples\n\nAs an example, the following command extracts every OS-Specific Testes from the repository `ricardojob/ostdetector`. \nIt also saves various information (line, module, filename ...) in directory `dir_output`. \nThis information will be available in the output file.\n\n```bash\nostdetector ricardojob/ostdetector -o dir_output\n```\n\nNote that the tool also can fetch it. \nFor example, the GitHub repository `https://github.com/ricardojob/ostdetector` will be fetched, saved under the `dir_output/ricardojob` directory.\nNote that, by default all projects are cloned to the `data` directory.\n\n\n## Usage\n\nAfter installation, the `ostdetector` command-line tool should be available in your shell. \nOtherwise, please replace `ostdetector` by `python -m ostdetector`. \nThe explanations in the following stays valid in both cases.\n\nYou can use `ostdetector` with the following arguments:\n\n```\nUsage: ostdetector [OPTIONS] REPOSITORY\n\n  Extract the usage of OS-Specific Tests from a single Git repository\n  `REPOSITORY`. The Git repository can be remote. It will be pulled locally in\n  the folder `data`. Every extracted OS-Specific Tests will be written in the\n  dir given to `-o`, or in the `data' if not specified.\n\n  Example of usage: python main.py ricardojob/OSTDetector -o data_experiment\n\nOptions:\n  -o, --output DIRECTORY  The output dir where the usage of OS-Specific Tests\n                          related to the repository will be stored. By\n                          default, the information will written to `data' dir.\n  -h, --help              Show this message and exit.\n```\n\nThe `*compare.csv' file given to directory `-o` will contain the following columns:\n- `project_name`: the name of the repository\n- `project_hash`: the commit SHA of the commit where the OS-specific tests file was extracted\n- `line`: the line where the OS-specific tests usage occurs\n- `module`: the module that packages the OS-specific tests (e.g., sys)\n- `package`: the API (e.g., platform)\n- `platform`: the information about OS (e.g, win32)\n- `file`: the file name\n- `function`: the function name\n- `method_type`: the method type (method_test or support)\n- `url`: the URL that represents the API usage on Github\n\n## License\n\nDistributed under [MIT License](https://github.com/ricardojob/ostdetector/blob/main/LICENSE.txt).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool for extracting of OS-Specific Tests",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/ricardojob/OSTDetector"
    },
    "split_keywords": [
        "os-specific",
        "test",
        "detect",
        "tool"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "da0d8fcd9ae90453aaa32728db4b7c02a07966b9163b1ad629210ebaede38a38",
                "md5": "870f4b2b5a6c5feba10c951777680641",
                "sha256": "1dec671351fbeb88a7cd464b8ebd0453091e58574f4c21afc00b756f991e84f2"
            },
            "downloads": -1,
            "filename": "ostdetector-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "870f4b2b5a6c5feba10c951777680641",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 12211,
            "upload_time": "2025-08-08T13:21:41",
            "upload_time_iso_8601": "2025-08-08T13:21:41.635479Z",
            "url": "https://files.pythonhosted.org/packages/da/0d/8fcd9ae90453aaa32728db4b7c02a07966b9163b1ad629210ebaede38a38/ostdetector-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "16b8ab1f7596f74c4aba2d1e4459dfaadc82cec7de4c3c0dbe1a56fc5e94aace",
                "md5": "772886dfeda09531633fe9f8d5886bc3",
                "sha256": "a88a8f9d23878ecffac8fb1d035548e187f16efbf6b359d923060a3e5a5fcee1"
            },
            "downloads": -1,
            "filename": "ostdetector-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "772886dfeda09531633fe9f8d5886bc3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 11728,
            "upload_time": "2025-08-08T13:21:42",
            "upload_time_iso_8601": "2025-08-08T13:21:42.860758Z",
            "url": "https://files.pythonhosted.org/packages/16/b8/ab1f7596f74c4aba2d1e4459dfaadc82cec7de4c3c0dbe1a56fc5e94aace/ostdetector-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-08 13:21:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ricardojob",
    "github_project": "OSTDetector",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "astunparse",
            "specs": []
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "smmap",
            "specs": [
                [
                    "==",
                    "5.0.1"
                ]
            ]
        },
        {
            "name": "jsonschema",
            "specs": [
                [
                    "==",
                    "4.21.1"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    "==",
                    "6.5.0"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "pygments",
            "specs": []
        },
        {
            "name": "pydriller",
            "specs": []
        }
    ],
    "lcname": "ostdetector"
}
        
Elapsed time: 1.43561s