Extracted from #5083
Related #5096
- Improved dataset manifest docs
- Dataset manifest requirements are now installed in the server image
- Package dependencies are aligned with the server
Extracted some enhancements from
https://github.com/opencv/cvat/pull/4819
- Extracted common s3 manipulations in tests
- Refactored import/export tests to be more clear
For user-facing functions, keep accepting `str` paths to maintain
compatibility and flexibility, but add support for arbitrary path-like
objects. For internal functions (in `downloading.py` and
`uploading.py`), don't bother and require `pathlib.Path`.
The only code that isn't converted is build-time code (e.g. `setup.py`)
and code that came from openapi-generator.
`isort --version` prints a large banner, which, after shell processing,
is collapsed into one line, and the result is an unreadable mess. Use
`--version-number` instead, which prints just the number.
`pathlib` improves code readability and type safety. It is already used
in some of the tests; convert all remaining `os.path` usage to `pathlib`
equivalents.
Fixes#5215
It's not really clear how the error can be obtained, but this PR adds a
workaround for the problem. There are 2 possible ways to get the
`message` parameter - from an error and from the operation status.
- Our status messages are always represented by a string, no any other
values is assigned.
- rq is trickier here - it receives rq data and [decodes
it](https://github.com/rq/rq/blob/master/rq/job.py#L603-L609) if there
is an error, but the operations can leave None as the `exc_info` value.
Maybe [this issue](https://github.com/rq/rq/issues/1633) is relevant
here.
Fixed REST API tests after merging #5408 and #5396 to develop
Co-authored-by: Boris Sekachev <sekachev.bs@gmail.com>
Co-authored-by: Nikita Manovich <nikita@cvat.ai>
Fix https://github.com/opencv/cvat/issues/5245
The PR contains a simple fix. Just return BAD REQUEST if somebody tries
to export a task without data. It doesn't make sense. But a more complex
fix will require changing a massive amount of code. It doesn't make any
sense to support such a weird scenario.
* rq 1.5.1 uses `collections.Iterable` (long deprecated and deleted in
Python 3.10). 1.5.2 fixes this issue. To avoid potential regressions,
don't bump the version further.
* av 8.0.2 was built with old Cython, which generates C code
incompatible with Python 3.10. The newest version is av 10.0.0, but that
drops support for FFmpeg<4.3, which would make it unbuildable using the
default Ubuntu 20.04 FFmpeg packages. To avoid that problem, use the
previous version, 9.2.0.
<!-- Raised an issue to propose your change
(https://github.com/cvat-ai/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the
[CONTRIBUTION](https://github.com/cvat-ai/cvat/blob/develop/CONTRIBUTING.md)
guide. -->
<!-- Provide a general summary of your changes in the Title above -->
### Motivation and context
<!-- Why is this change required? What problem does it solve? If it
fixes an open
issue, please link to the issue here. Describe your changes in detail,
add
screenshots. -->
This makes it possible to run CVAT on Python 3.10.
Fixes#5262.
### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->
I'm relying on CI.
### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable by a reason then ~~explicitly
strikethrough~~ the whole
line. If you don't do that github will show an incorrect process for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- ~~[ ] I have added a description of my changes into
[CHANGELOG](https://github.com/cvat-ai/cvat/blob/develop/CHANGELOG.md)
file~~
- ~~[ ] I have updated the [documentation](
https://github.com/cvat-ai/cvat/blob/develop/README.md#documentation)
accordingly~~
- ~~[ ] I have added tests to cover my changes~~
- [x] I have linked related issues ([read github docs](
https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- ~~[ ] I have increased versions of npm packages if it is necessary
([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),
[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),
[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and
[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))~~
### License
- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
Feel free to contact the maintainers if that's a concern.
Currently, all properties of the server proxy object are created using
`Object.defineProperties` in the constructor, which means that IDEs like
VS Code can't analyze the file's static structure to determine what
properties there are and what types they have. Consequently, things like
autocomplete and go-to-definition don't work.
Fix that by removing the `ServerProxy` class altogether and exporting an
anonymous object with all properties defined statically.
Link to the old videos removed as there were changes made in CVAT
interface and now these videos are a bit confusing Links to playlists of
the updated videos were added with the description what these videos
contact Contacts sections updated
General proofreading