-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 93 Windows blob upload #94
Conversation
Signed-off-by: Sunny Carter <sunny.carter@metaswitch.com>
Really nice job! If we get it fully working on Windows we will need to have a release for Windows for our conda recipe. It looks like for linting, e.g.,: python -m venv env
source env/bin/activate
pip install -r .github/dev-requirements.txt Then pre-commit run --all-files Is hitting a few snags - mostly with typing if you want to adjust those. trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook
Fixing oras/tests/test_utils.py
Fixing oras/tests/test_provider.py
Fixing oras/utils/fileio.py
mixed line ending........................................................Passed
black....................................................................Failed
- hook id: black
- files were modified by this hook
reformatted oras/utils/fileio.py
All done! ✨ 🍰 ✨
1 file reformatted, 13 files left unchanged.
All done! ✨ 🍰 ✨
13 files left unchanged.
isort....................................................................Failed
- hook id: isort
- files were modified by this hook
Fixing /home/runner/work/oras-py/oras-py/oras/tests/test_provider.py
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1
oras/utils/fileio.py:364: error: Incompatible return value type (got "Tuple[str, ...]", expected "Tuple[str, Optional[str]]")
Found 1 error in 1 file (checked 14 source files)
oras/utils/fileio.py:364: error: Incompatible return value type (got "Tuple[str, ...]", expected "Tuple[str, Optional[str]]")
Found 1 error in 1 file (checked 13 source files)
flake8...................................................................Failed
- hook id: flake8
- exit code: 1
oras/utils/fileio.py:329:7: W605 invalid escape sequence '\m'
oras/utils/fileio.py:334:7: W605 invalid escape sequence '\m'
make: *** [Makefile:11: lint] Error 1
Error: Process completed with exit code 2. |
Thanks for the review. I had some issues with returning Tuples with Optional[str] in the type, so I've changed it to return a small class. All those checks are passing now. |
Thanks for fixing that, and sorry for the trouble! I have mixed feelings about "typing" in python - it seems to add more headache often than it's worth, but at least for this project we commit so makes sense to keep trying. |
Hi there,
Thank you for merging this.
Is it possible you can release oras 0.1.19? Sorry for hassling you if you were waiting until after the weekend to do it!
Thanks
Sunny
|
Thank you for the reminder! I intended to but had two full days and just didn't get to it. 😆 https://github.com/oras-project/oras-py/releases/tag/0.1.19 |
Fix for #93
Tested on Linux by writing unit test for parse_manifest and running it before and after change.
Tested on Window by trying to upload a blob with the path C:\blah\blah.json - failed before the fix, succeeds afterwards.