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.
* Return created task id from function * Add pbar for annotation dump * Add testing requirements list * Remove resources properly in tests * Add backup dump progress bar * Refactor code * Set up logging in CLI * Add annotations uploading progress with tus * Refactor code * Add tqdm dependency * Update changelog * Add some comments to the implementation * Remove extra code * Update ci container * Add progress bars to task import * Add tests, refactor code * Add progressbar for task creation * Remove extra line * Change exception type * Move requirements files * Fix dockerfile * Revert extra change * Isolate test directories * Move cli package * Update cli package references * Move package files into a directory * Move files * Update requirements and dockerfiles * Add cvat-cli package * Autoformat CLI code * Add developer guide * Update readme * Add Black check on CI * Add isort check on CI * Merge branch 'develop' into zm/cli-package * Update package * Change paths in cli code * Move files * Update docs * Update dockerfile * Update changelog * Fix linter issues * Fix linter issues * Add dev requirements * Update ci Co-authored-by: Nikita Manovich <[email protected]>
- Loading branch information
1 parent
ca8150e
commit 26d78fe
Showing
11 changed files
with
488 additions
and
441 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Linter | ||
on: pull_request | ||
jobs: | ||
Black: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: files | ||
uses: jitterbit/get-changed-files@v1 | ||
continue-on-error: true | ||
|
||
- name: Run checks | ||
env: | ||
PR_FILES_AM: ${{ steps.files.outputs.added_modified }} | ||
PR_FILES_RENAMED: ${{ steps.files.outputs.renamed }} | ||
run: | | ||
PR_FILES="$PR_FILES_AM $PR_FILES_RENAMED" | ||
for FILE in $PR_FILES; do | ||
EXTENSION="${FILE##*.}" | ||
DIRECTORY="${FILE%%/*}" | ||
if [[ "$EXTENSION" == "py" && "$DIRECTORY" == "cvat-cli" ]]; then | ||
CHANGED_FILES+=" $FILE" | ||
fi | ||
done | ||
if [[ ! -z $CHANGED_FILES ]]; then | ||
sudo apt-get --no-install-recommends install -y build-essential curl python3-dev python3-pip python3-venv | ||
python3 -m venv .env | ||
. .env/bin/activate | ||
pip install -U pip wheel setuptools | ||
pip install $(egrep "black.*" ./cvat-cli/requirements/development.txt) | ||
mkdir -p black_report | ||
echo "Black version: "$(black --version) | ||
echo "The files will be checked: "$(echo $CHANGED_FILES) | ||
black --check --config ./cvat-cli/pyproject.toml $CHANGED_FILES > ./black_report/black_checks.txt || EXIT_CODE=$(echo $?) || true | ||
deactivate | ||
exit $EXIT_CODE | ||
else | ||
echo "No files with the \"py\" extension found" | ||
fi | ||
- name: Upload artifacts | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: black_report | ||
path: black_report |
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,48 @@ | ||
name: Linter | ||
on: pull_request | ||
jobs: | ||
isort: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: files | ||
uses: jitterbit/get-changed-files@v1 | ||
continue-on-error: true | ||
|
||
- name: Run checks | ||
env: | ||
PR_FILES_AM: ${{ steps.files.outputs.added_modified }} | ||
PR_FILES_RENAMED: ${{ steps.files.outputs.renamed }} | ||
run: | | ||
PR_FILES="$PR_FILES_AM $PR_FILES_RENAMED" | ||
for FILE in $PR_FILES; do | ||
EXTENSION="${FILE##*.}" | ||
DIRECTORY="${FILE%%/*}" | ||
if [[ "$EXTENSION" == "py" && "$DIRECTORY" == "cvat-cli" ]]; then | ||
CHANGED_FILES+=" $FILE" | ||
fi | ||
done | ||
if [[ ! -z $CHANGED_FILES ]]; then | ||
sudo apt-get --no-install-recommends install -y build-essential curl python3-dev python3-pip python3-venv | ||
python3 -m venv .env | ||
. .env/bin/activate | ||
pip install -U pip wheel setuptools | ||
pip install $(egrep "isort.*" ./cvat-cli/requirements/development.txt) | ||
mkdir -p isort_report | ||
echo "isort version: "$(isort --version) | ||
echo "The files will be checked: "$(echo $CHANGED_FILES) | ||
isort --check --sp ./cvat-cli/pyproject.toml $CHANGED_FILES > ./isort_report/isort_checks.txt || EXIT_CODE=$(echo $?) || true | ||
deactivate | ||
exit $EXIT_CODE | ||
else | ||
echo "No files with the \"py\" extension found" | ||
fi | ||
- name: Upload artifacts | ||
if: failure() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: isort_report | ||
path: isort_report |
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,5 @@ | ||
-r base.txt | ||
|
||
black>=22.1.0 | ||
isort>=5.10.1 | ||
pylint>=2.7.0 |
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
Oops, something went wrong.