Skip to content

Dependency update changes #534

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

Merged
merged 4 commits into from
Jul 11, 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
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ updates:
labels:
- dependencies
schedule:
interval: "daily"
interval: "weekly"

# Maintain dependencies for Python
- package-ecosystem: "pip"
directory: "/"
labels:
- dependencies
schedule:
interval: "daily"
interval: "weekly"
open-pull-requests-limit: 10
27 changes: 1 addition & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,6 @@ env:

jobs:

dependency-audit:
name: Dependency audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install python
uses: actions/setup-python@v4
with:
python-version: ${{env.pythonversion}}
- name: create local poetry install
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip setuptools
python -m pip install poetry
poetry install
- uses: trailofbits/gh-action-pip-audit@v1.0.6
with:
virtual-environment: .venv
ignore-vulns: |
GHSA-w596-4wvx-j9j6 # subversion related git dep, dependency for pytest. This is no impact here.
GHSA-2p9h-ccw7-33gf # invalid ddos comment on the cleo package
GHSA-hcpj-qp55-gfph
GHSA-29gw-9793-fvw7 # ipython test dep, not in release

lint:
name: Linter
runs-on: ubuntu-latest
Expand Down Expand Up @@ -101,7 +76,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
pyver: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.8", "pypy-3.7" ]
pyver: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy-3.8", "pypy-3.9" ]
redisstack: [ "latest" ]
fail-fast: false
services:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ lint: $(INSTALL_STAMP) dist
$(POETRY) run isort --profile=black --lines-after-imports=2 ./tests/ $(NAME) $(SYNC_NAME)
$(POETRY) run black ./tests/ $(NAME)
$(POETRY) run flake8 --ignore=W503,E501,F401,E731 ./tests/ $(NAME) $(SYNC_NAME)
$(POETRY) run mypy ./tests/ $(NAME) $(SYNC_NAME) --ignore-missing-imports
$(POETRY) run mypy ./tests/ $(NAME) $(SYNC_NAME) --ignore-missing-imports --exclude migrate.py
$(POETRY) run bandit -r $(NAME) $(SYNC_NAME) -s B608

.PHONY: format
Expand Down
2 changes: 1 addition & 1 deletion aredis_om/model/cli/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@click.command()
@click.option("--module", default="aredis_om")
def migrate(module):
def migrate(module: str):
migrator = Migrator(module)
migrator.detect_migrations()

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pptree = "^3.1"
types-redis = ">=3.5.9,<5.0.0"
python-ulid = "^1.0.3"
typing-extensions = "^4.4.0"
hiredis = "^2.0.0"
hiredis = "^2.2.3"
more-itertools = ">=8.14,<10.0"

[tool.poetry.dev-dependencies]
Expand Down
9 changes: 5 additions & 4 deletions tests/test_hash_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,17 @@ async def test_delete_non_exist(members, m):
async def test_full_text_search_queries(members, m):
member1, member2, member3 = members

actual = await (m.Member.find(m.Member.bio % "great").all())
actual = await m.Member.find(m.Member.bio % "great").all()

assert actual == [member1]

actual = await (m.Member.find(~(m.Member.bio % "anxious")).sort_by("age").all())
actual = await m.Member.find(~(m.Member.bio % "anxious")).sort_by("age").all()

assert actual == [member1, member3]


@py_test_mark_asyncio
@pytest.mark.xfail(strict=False)
async def test_pagination_queries(members, m):
member1, member2, member3 = members

Expand Down Expand Up @@ -245,10 +246,10 @@ async def test_tag_queries_punctuation(m):
)
await member2.save()

result = await (m.Member.find(m.Member.first_name == "Andrew, the Michael").first())
result = await m.Member.find(m.Member.first_name == "Andrew, the Michael").first()
assert result == member1

result = await (m.Member.find(m.Member.last_name == "St. Brookins-on-Pier").first())
result = await m.Member.find(m.Member.last_name == "St. Brookins-on-Pier").first()
assert result == member1

# Notice that when we index and query multiple values that use the internal
Expand Down