Skip to content

Commit

Permalink
Update workflows and documentation to use dev_requirements.txt instea…
Browse files Browse the repository at this point in the history
…d of requirements.txt, and improve clarity in documentation.

Signed-off-by: BoazBD <[email protected]>
  • Loading branch information
BoazBD committed Jan 1, 2025
1 parent 3f5dd9f commit edb02e3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-python-wrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,5 @@ runs:
source "$HOME/.cargo/env"
python3 -m venv .env
source .env/bin/activate
python3 -m pip install --no-cache-dir -r requirements.txt
python3 -m pip install --no-cache-dir -r dev_requirements.txt
maturin develop
2 changes: 0 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ jobs:
working-directory: ./python
run: |
source .env/bin/activate
pip install -r requirements.txt
pip install -r dev_requirements.txt
cd python/tests/
pytest --asyncio-mode=auto --html=pytest_report.html --self-contained-html
Expand Down Expand Up @@ -179,7 +178,6 @@ jobs:
working-directory: ./python
run: |
source .env/bin/activate
pip install -r requirements.txt
pip install -r dev_requirements.txt
cd python/tests/
pytest --asyncio-mode=auto -k test_pubsub --html=pytest_report.html --self-contained-html
Expand Down
4 changes: 2 additions & 2 deletions python/DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protoc -Iprotobuf=${GLIDE_ROOT}/glide-core/src/protobuf/ \
cd python
python3 -m venv .env
source .env/bin/activate
pip install -r requirements.txt
pip install -r dev_requirements.txt
```

## Build the package (in release mode):
Expand Down Expand Up @@ -210,7 +210,7 @@ Run from the main `/python` folder
```bash
cd $HOME/src/valkey-glide/python
source .env/bin/activate
pip install -r requirements.txt
pip install -r dev_requirements.txt
isort . --profile black --skip-glob python/glide/protobuf --skip-glob .env
black . --exclude python/glide/protobuf --exclude .env
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics \
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "valkey-glide"
requires-python = ">=3.9"
dependencies = [
# Note: If you add a dependency here, make sure to also add it to requirements.txt
# This is necessary until the issue https://github.com/aboutcode-org/python-inspector/issues/197 is resolved.
# Once issue https://github.com/aboutcode-org/python-inspector/issues/197 is resolved, the requirements.txt file can be removed.```
"async-timeout>=4.0.2; python_version < '3.11'",
"typing-extensions>=4.8.0; python_version < '3.11'",
"protobuf>=3.20",
Expand Down
6 changes: 3 additions & 3 deletions python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Note: If you add a dependency here, make sure to also add it to pyproject.toml
# This is necessary until the issue https://github.com/aboutcode-org/python-inspector/issues/197 is resolved.
# Note: The main location for tracking dependencies is pyproject.toml. This file is used only for the ORT process. When adding a dependency, make sure to add it both to this file and to pyproject.toml.
# Once issue https://github.com/aboutcode-org/python-inspector/issues/197 is resolved, this file can be removed.
async-timeout>=4.0.2
typing-extensions>=4.8.0
protobuf>=3.20
protobuf>=3.20
2 changes: 2 additions & 0 deletions utils/get_licenses_from_ort.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"Unicode-3.0",
"(Apache-2.0 OR MIT) AND Unicode-3.0"
]

# Packages with non-pre-approved licenses that received manual approval.
APPROVED_PACKAGES = [
"PyPI::pathspec:0.12.1",
"PyPI::certifi:2023.11.17"
Expand Down

0 comments on commit edb02e3

Please sign in to comment.