Skip to content

Commit

Permalink
fix: standardize deps and renovate config - DIA-70164 (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
edouardlp committed Jun 18, 2024
1 parent b496e04 commit c3fb840
Show file tree
Hide file tree
Showing 5 changed files with 1,155 additions and 489 deletions.
24 changes: 11 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
version: 2.1

orbs:
base: dialogue/base@1.23.0
release: dialogue/release@2.19.0
python: dialogue/python@3.22.1
utils: dialogue/utils@3.19.0
base: dialogue/base@1.23.1
release: dialogue/release@2.19.1
python: dialogue/python@3.22.5
utils: dialogue/utils@3.19.1
codecov: codecov/codecov@4.1.0

aliases:
- &executor
Expand Down Expand Up @@ -107,23 +108,20 @@ jobs:
steps:
- base/setup
- python/setup
- python/install_deps
- utils/with_cache:
key: 'python<<parameters.python_version>>-sqlalchemy<<parameters.sqlalchemy_version>>-pydantic<<parameters.pydantic_version>>-<<parameters.asyncpg>>-<<parameters.aws_rds_iam>>-{{ checksum "pyproject.toml" }}-{{ checksum "poetry.lock" }}'
namespace: tox
key: 'python<<parameters.python_version>>-sqlalchemy<<parameters.sqlalchemy_version>>-pydantic<<parameters.pydantic_version>>-<<parameters.asyncpg>>-<<parameters.aws_rds_iam>>-{{ checksum "pyproject.toml" }}-{{ checksum "poetry.lock" }}'
path: ~/project/.tox
strict: true
steps:
- run:
name: "install tox"
command: |
poetry run pip install -U tox==4.7.0
- run:
name: "run tox using sqlalchemy <<parameters.sqlalchemy_version>>.* pydantic<<parameters.pydantic_version>> and -<<parameters.asyncpg>> and -<<parameters.aws_rds_iam>>"
command: |
poetry run tox -e sqlalchemy<<parameters.sqlalchemy_version>>-pydantic<<parameters.pydantic_version>>-<<parameters.asyncpg>>-<<parameters.aws_rds_iam>>
- store_test_results:
path: test-reports
- utils/send_coverage_to_codecov:
codecov_flag: python_version<<parameters.python_version>>-sqlalchemy<<parameters.sqlalchemy_version>>-pydantic<<parameters.pydantic_version>>-<<parameters.asyncpg>>-<<parameters.aws_rds_iam>>
- codecov/upload:
flags: python_version<<parameters.python_version>>-sqlalchemy<<parameters.sqlalchemy_version>>-pydantic<<parameters.pydantic_version>>-<<parameters.asyncpg>>-<<parameters.aws_rds_iam>>


publish:
<<: *executor
Expand Down
3 changes: 2 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>dialoguemd/renovate-config"
"local>dialoguemd/renovate-config",
"local>dialoguemd/renovate-config//presets/library"
]
}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Using [pip](https://pip.pypa.io/):
pip install fastapi-sqla
```

Note that you need a [SQLAlchemy compatible engine](https://docs.sqlalchemy.org/en/20/core/engines.html) adapter. We test with `psycopg2` which you can install using the `psycopg2` extra.

# Quick Example

Assuming it runs against a DB with a table `user` with 3 columns, `id`, `name` and
Expand Down Expand Up @@ -600,7 +602,7 @@ If your project uses [SQLModel], then `Session` dependency is an SQLModel sessio
# Pytest fixtures

This library provides a set of utility fixtures, through its PyTest plugin, which is
automatically installed with the library.
automatically installed with the library. Using the plugin requires the `pytest_plugin` extra.

By default, no records are actually written to the database when running tests.
There currently is no way to change this behaviour.
Expand Down Expand Up @@ -744,7 +746,7 @@ It returns the path of `alembic.ini` configuration file. By default, it returns
## Setup

```bash
$ poetry install --extras tests --extras asyncpg --extras aws_rds_iam
$ poetry install --all-extras
```

## Running tests
Expand Down
Loading

0 comments on commit c3fb840

Please sign in to comment.