Skip to content

Commit bffc905

Browse files
committed
Fixed tests and pre-commit config on mac
1 parent 5234a79 commit bffc905

File tree

3 files changed

+41
-5
lines changed

3 files changed

+41
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
# --remove-unused-variables,
2929
# ]
3030
- repo: https://github.com/hadialqattan/pycln
31-
rev: v1.0.3
31+
rev: v1.2.4
3232
hooks:
3333
- id: pycln
3434
args: [--config=setup.cfg]

README.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ for all columns and relationships in the given model.
1212

1313
- Extensible to arbitrary custom SQLAlchemy types.
1414

15-
- Support for SQLAlchemy 1.x and 2.x
15+
- Support for SQLAlchemy >=1.4.x
1616

17+
- Lightweight and fast.
1718

1819
## Getting Started
1920

2021
First, define your sqlalchemy model:
2122

22-
```
23+
```python
2324
# models.py
2425
from sqlalchemy import Column, Integer, String
2526
from sqlalchemy.ext.declarative import declarative_base
@@ -37,7 +38,7 @@ to register it as a strawberry type for the given SQLAlchemy model.
3738
This will automatically add fields for the model's columns, relationships, association proxies,
3839
and hybrid properties. For example:
3940

40-
```
41+
```python
4142
# in another file
4243
strawberry_sqlalchemy_mapper = StrawberrySQLAlchemyMapper()
4344
@strawberry_sqlalchemy_mapper.type(models.Employee)
@@ -49,7 +50,7 @@ class Employee:
4950

5051
Natively supports the following SQLAlchemy types:
5152

52-
```
53+
```python
5354
Integer: int,
5455
Float: float,
5556
BigInteger: int,
@@ -78,6 +79,19 @@ i.e., both properties are expected to be relationships.
7879

7980
## Contributing
8081

82+
We encourage you to contribute to strawberry-sqlalchemy-mapper! Any contributions you make are greatly appreciated.
83+
84+
If you have a suggestion that would make this better, please fork the repo and create a pull request. Don't forget to give the project a star! Thanks again!
85+
86+
1. Fork the Project
87+
2. Create your Feature Branch (git checkout -b feature)
88+
3. Commit your Changes (git commit -m 'Add some feature')
89+
4. Push to the Branch (git push origin feature)
90+
5. Open a Pull Request
91+
92+
93+
### Prerequisites
94+
8195
This project uses `pre-commit`_, please make sure to install it before making any
8296
changes::
8397

@@ -90,3 +104,19 @@ It is a good idea to update the hooks to the latest version::
90104
pre-commit autoupdate
91105

92106
Don't forget to tell your contributors to also install and use pre-commit.
107+
108+
### Installation
109+
110+
```bash
111+
pip install -r requirements.txt
112+
```
113+
114+
### Test
115+
116+
```bash
117+
pytest
118+
```
119+
120+
## ⚖️ LICENSE
121+
122+
MIT © [strawberry-sqlalchemy-mapper](LICENSE.txt)

requirements.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
importlib-metadata==4.11.1
2+
pytest==7.0.1
3+
pytest-cov==3.0.0
4+
sentinel==0.3.0
5+
sqlalchemy>=1.4
6+
strawberry-graphql>=0.95

0 commit comments

Comments
 (0)