A tool for extracting of OS-Specific Tests
Project description
OSTDetector
An automated tool for extracting OS-specific Tests from Git repositories written in Python.
The ostdetector (Operating System-Specific Tests Detector) 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.
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 repositoryproject_hash: the commit SHA of the commit where the OS-specific tests file was extractedline: the line where the OS-specific tests usage occursmodule: 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 namefunction: the function namemethod_type: the method type (method_test or support)url: the URL that represents the API usage on Github
License
Distributed under MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ostdetector-1.0.3.tar.gz.
File metadata
- Download URL: ostdetector-1.0.3.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
518566c6b56c21ff804f30fff750447d779457b638607c33f19cc9b42beb5d86
|
|
| MD5 |
00cfb5d232491b871f23228efde23168
|
|
| BLAKE2b-256 |
c56ae822d108b56741697ef6fa359653ea21607c0d69dfc6436ee09102bb9b7a
|
Provenance
The following attestation bundles were made for ostdetector-1.0.3.tar.gz:
Publisher:
python-publish.yml on ricardojob/OSTDetector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ostdetector-1.0.3.tar.gz -
Subject digest:
518566c6b56c21ff804f30fff750447d779457b638607c33f19cc9b42beb5d86 - Sigstore transparency entry: 367153493
- Sigstore integration time:
-
Permalink:
ricardojob/OSTDetector@55ce9eaa31424e2bc2949925fbc784db48fd07f9 -
Branch / Tag:
refs/tags/1.0.3 - Owner: https://github.com/ricardojob
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@55ce9eaa31424e2bc2949925fbc784db48fd07f9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ostdetector-1.0.3-py3-none-any.whl.
File metadata
- Download URL: ostdetector-1.0.3-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a25c36a0220768442f44462cb4a0d06031e0c04a2f0da3a345da35bbb2e172e
|
|
| MD5 |
4280ad23fcc27cfbe0b367c22c02fade
|
|
| BLAKE2b-256 |
57512d873080d33f7a5dfda14cadd0811b80b576c0079dcbe33a15e272cb8798
|
Provenance
The following attestation bundles were made for ostdetector-1.0.3-py3-none-any.whl:
Publisher:
python-publish.yml on ricardojob/OSTDetector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ostdetector-1.0.3-py3-none-any.whl -
Subject digest:
6a25c36a0220768442f44462cb4a0d06031e0c04a2f0da3a345da35bbb2e172e - Sigstore transparency entry: 367153510
- Sigstore integration time:
-
Permalink:
ricardojob/OSTDetector@55ce9eaa31424e2bc2949925fbc784db48fd07f9 -
Branch / Tag:
refs/tags/1.0.3 - Owner: https://github.com/ricardojob
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@55ce9eaa31424e2bc2949925fbc784db48fd07f9 -
Trigger Event:
push
-
Statement type: