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

chore: additional CI and PDM cleanup #2413

Merged
merged 9 commits into from
Oct 7, 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/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
./pdm.lock

- name: Install dependencies
run: pdm install -G:docs
run: pdm install -G:all

- name: Build docs
run: pdm run make docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
./pdm.lock

- name: Install dependencies
run: pdm install -G:docs
run: pdm install -G:all

- name: Fetch gh pages
run: git fetch origin gh-pages --depth=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
./pdm.lock

- name: Install dependencies
run: pdm install
run: pdm install -G:all

- if: ${{ inputs.pydantic-version == '1' }}
name: Prepare for pydantic v1
Expand Down
23 changes: 9 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,21 @@ repos:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pdm-project/pdm
rev: 2.9.2
hooks:
- id: pdm-lock-check
- repo: https://github.com/provinzkraut/unasyncd
rev: "v0.6.1"
hooks:
- id: unasyncd
additional_dependencies: ["ruff"]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.290"
rev: "v0.0.292"
hooks:
- id: ruff
args: ["--fix"]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
rev: v2.2.6
hooks:
- id: codespell
exclude: "tests/openapi/typescript_converter/test_converter"
exclude: "tests/openapi/typescript_converter/test_converter|README.md"
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
Expand Down Expand Up @@ -72,7 +68,6 @@ repos:
annotated_types,
anyio,
async_timeout,
asyncmy,
asyncpg,
asyncpg_stubs,
attrs,
Expand All @@ -89,16 +84,15 @@ repos:
jsbeautifier,
mako,
mongomock_motor,
minijinja,
msgspec,
multidict,
opentelemetry-instrumentation-asgi,
opentelemetry-sdk,
oracledb,
piccolo,
picologging,
polyfactory,
prometheus_client,
psycopg,
pydantic-extra-types,
pydantic>=2,
pytest,
Expand All @@ -113,15 +107,17 @@ repos:
rich,
rich-click,
sqlalchemy>=2.0.12,
advanced-alchemy==0.2.2,
starlette,
structlog,
advanced-alchemy==0.2.2,
time-machine,
types-beautifulsoup4,
types-python-jose,
types-pyyaml,
types-redis,
uvicorn,
uvloop,
httptools,
]
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.328
Expand All @@ -134,7 +130,6 @@ repos:
annotated_types,
anyio,
async_timeout,
asyncmy,
asyncpg,
asyncpg_stubs,
attrs,
Expand All @@ -156,12 +151,10 @@ repos:
multidict,
opentelemetry-instrumentation-asgi,
opentelemetry-sdk,
oracledb,
piccolo,
picologging,
polyfactory,
prometheus_client,
psycopg,
pydantic-extra-types,
pydantic>=2,
pytest,
Expand All @@ -185,6 +178,8 @@ repos:
types-pyyaml,
types-redis,
uvicorn,
uvloop,
httptools,
]
- repo: https://github.com/sphinx-contrib/sphinx-lint
rev: "v0.6.8"
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ install: ## Install the project, dependencies, and pre-commit for loca
if [ "$(VENV_EXISTS)" ]; then $(MAKE) destroy; fi
if [ "$(VENV_EXISTS)" ]; then $(MAKE) clean; fi
@if [ "$(USING_PDM)" ]; then $(PDM) config venv.in_project true && python3 -m venv --copies .venv && . $(ENV_PREFIX)/activate && $(ENV_PREFIX)/pip install --quiet -U wheel setuptools cython pip; fi
@if [ "$(USING_PDM)" ]; then $(PDM) install; fi
@echo "=> Installing pre-commit hooks"
pre-commit install --install-hooks
@if [ "$(USING_PDM)" ]; then $(PDM) install -G:all; fi
@echo "=> Install complete! Note: If you want to re-install re-run 'make install'"

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/stores.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ These come with the additional :meth:`with_namespace <.base.NamespacedStore.with
new :class:`NamespacedStore <.base.NamespacedStore>` instance. Once a namespaced store is created, operations on it
will only affect itself and its child namespaces.

When using the :class:`RedisStore <.redis.RedisStore>`, this allows to re-use the same underlying
When using the :class:`RedisStore <.redis.RedisStore>`, this allows to reuse the same underlying
:class:`Redis <redis.asyncio.Redis>` instance and connection, while ensuring isolation.

.. note::
Expand Down Expand Up @@ -237,7 +237,7 @@ This mechanism also allows to control the stores used by various integrations, s

In this example, the registry is being set up with stores using the ``sessions`` and ``response_cache`` keys. These are
not magic constants, but instead configuration values that can be changed. Those names just happen to be their default
values. Adjusting those default values allows to easily re-use stores, without the need for a more complex setup:
values. Adjusting those default values allows to easily reuse stores, without the need for a more complex setup:

.. literalinclude:: /examples/stores/configure_integrations_set_names.py
:language: python
Expand Down
Loading