Skip to content
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: update precommit and dependencies #33

Merged
merged 4 commits into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.9]
python-version: [3.7, 3.9]
os: [ubuntu-latest]
steps:
- name: Checkout the repo
Expand Down
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fail_fast: false
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.4.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -17,23 +17,23 @@ repos:
- id: debug-statements
- id: check-merge-conflict

- repo: 'https://gitlab.com/pycqa/flake8'
rev: 3.9.0
- repo: 'https://github.com/PyCQA/flake8'
rev: 5.0.4 # needed for py < 3.8.1
hooks:
- id: flake8

- repo: 'https://github.com/ambv/black'
rev: 20.8b1
rev: 22.12.0
hooks:
- id: black
args: ['--safe']

- repo: 'https://github.com/chewse/pre-commit-mirrors-pydocstyle'
rev: v2.1.1
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.7.0
rev: v5.10.1
hooks:
- id: isort
8 changes: 8 additions & 0 deletions eodag_cube/api/product/protobuf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""EODAG product protobuf package"""
import os

# Fixes: descriptors cannot not be created directly.
# If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
# If you cannot immediately regenerate your protos, some other possible workarounds are:
# 1. Downgrade the protobuf package to 3.20.x or lower.
# 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
8 changes: 8 additions & 0 deletions eodag_cube/rpc/protocol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""EODAG rpc.protocol package"""
import os

# Fixes: descriptors cannot not be created directly.
# If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
# If you cannot immediately regenerate your protos, some other possible workarounds are:
# 1. Downgrade the protobuf package to 3.20.x or lower.
# 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"eodag >= 2.3.2",
"numpy",
"rasterio",
"protobuf",
"protobuf <= 3.20",
"grpcio",
"xarray",
"rioxarray",
Expand All @@ -37,7 +37,7 @@
"flake8",
"isort",
"pre-commit",
"pytest==5.0.1", # pytest pined to v5.0.1 to avoid issue when run from VSCode
"pytest",
"pytest-cov",
"tox",
"nose",
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ commands =
pytest --show-capture=no --cov --cov-fail-under=50

[testenv:pypi]
whitelist_externals = /bin/bash
allowlist_externals = /bin/bash
commands =
# Check that the long description is ready to be published on PyPI without errors
bash -c 'ERROR=$(\{ python setup.py --long-description | rst2html.py >/dev/null;\} 2>&1) && if [[ ! -z $ERROR ]];'\
/bin/bash -c 'ERROR=$(\{ python setup.py --long-description | rst2html.py >/dev/null;\} 2>&1) && if [[ ! -z $ERROR ]];'\
'then echo "README.rst is incompatible with PyPI reST renderer." && echo $ERROR && exit 1; fi'

[testenv:linters]
Expand Down