forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc9fc45
commit fd4a130
Showing
25 changed files
with
160 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ branch = true | |
|
||
source = | ||
cvat/apps/ | ||
utils/cli/ | ||
cvat-cli/ | ||
utils/dataset_manifest | ||
|
||
omit = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include README.md | ||
include requirements/base.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Command-line client for CVAT | ||
|
||
## Installation | ||
|
||
`pip install cvat-cli/` | ||
|
||
## Usage | ||
|
||
```bash | ||
$ cvat-cli --help | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Developer guide | ||
|
||
Install testing requirements: | ||
|
||
```bash | ||
pip install -r requirements/testing.txt | ||
``` | ||
|
||
Run unit tests: | ||
``` | ||
cd cvat/ | ||
python manage.py test --settings cvat.settings.testing cvat-cli/ | ||
``` | ||
|
||
Install package in the editable mode: | ||
|
||
```bash | ||
pip install -e . | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-r base.txt | ||
|
||
# We depend on the server in the tests | ||
-r ../../cvat/requirements/testing.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Copyright (C) 2022 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
import os.path as osp | ||
import re | ||
|
||
import setuptools | ||
|
||
|
||
def find_version(project_dir=None): | ||
if not project_dir: | ||
project_dir = osp.dirname(osp.abspath(__file__)) | ||
|
||
file_path = osp.join(project_dir, "version.py") | ||
|
||
with open(file_path, "r") as version_file: | ||
version_text = version_file.read() | ||
|
||
# PEP440: | ||
# https://www.python.org/dev/peps/pep-0440/#appendix-b-parsing-version-strings-with-regular-expressions | ||
pep_regex = r"([1-9]\d*!)?(0|[1-9]\d*)(\.(0|[1-9]\d*))*((a|b|rc)(0|[1-9]\d*))?(\.post(0|[1-9]\d*))?(\.dev(0|[1-9]\d*))?" | ||
version_regex = r"VERSION\s*=\s*.(" + pep_regex + ")." | ||
match = re.match(version_regex, version_text) | ||
if not match: | ||
raise RuntimeError("Failed to find version string in '%s'" % file_path) | ||
|
||
version = version_text[match.start(1) : match.end(1)] | ||
return version | ||
|
||
|
||
BASE_REQUIREMENTS_FILE = "requirements/base.txt" | ||
|
||
|
||
def parse_requirements(filename=BASE_REQUIREMENTS_FILE): | ||
with open(filename) as fh: | ||
return fh.readlines() | ||
|
||
|
||
BASE_REQUIREMENTS = parse_requirements(BASE_REQUIREMENTS_FILE) | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="cvat-cli", | ||
version=find_version(project_dir="src/cvat_cli"), | ||
description="Command-line client for CVAT", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/openvinotoolkit/cvat/", | ||
package_dir={"": "src"}, | ||
packages=setuptools.find_packages(where='src'), | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
python_requires=">=3.7", | ||
install_requires=BASE_REQUIREMENTS, | ||
entry_points={ | ||
"console_scripts": [ | ||
"cvat-cli=cvat_cli.__main__:main", | ||
], | ||
}, | ||
include_package_data=True, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright (C) 2020-2022 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
utils/cli/core/__init__.py → cvat-cli/src/cvat_cli/core/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Copyright (C) 2020-2022 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT | ||
|
||
from .definition import parser, ResourceType # noqa | ||
from .core import CLI, CVAT_API_V2 # noqa |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VERSION = "0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright (C) 2020-2022 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.