Skip to content

Commit 101c733

Browse files
authored
Merge pull request #20 from python-ellar/requirement_fix
rearrangement lib dependencies
2 parents b667a9b + 0f513f0 commit 101c733

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+49
-57
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install Flit
1818
run: pip install flit
1919
- name: Install Dependencies
20-
run: flit install --symlink
20+
run: make install
2121
- name: Install build dependencies
2222
run: pip install build
2323
- name: Build distribution

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install Flit
1919
run: pip install flit
2020
- name: Install Dependencies
21-
run: flit install --symlink
21+
run: make install
2222
- name: Test
2323
run: make test-cov
2424
- name: Coverage

.github/workflows/test_full.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install Flit
2222
run: pip install flit
2323
- name: Install Dependencies
24-
run: flit install --symlink
24+
run: make install
2525
- name: Test
2626
run: pytest tests
2727

@@ -36,7 +36,7 @@ jobs:
3636
- name: Install Flit
3737
run: pip install flit
3838
- name: Install Dependencies
39-
run: flit install --symlink
39+
run: make install
4040
- name: Linting check
4141
run: ruff check ellar_sql tests
4242
- name: mypy

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ clean: ## Removing cached python compiled files
1313
find . -name .ruff_cache | xargs rm -rfv
1414

1515
install: ## Install dependencies
16-
flit install --deps develop --symlink
16+
pip install -r requirements.txt
17+
flit install --symlink
1718

1819
install-full: ## Install dependencies
1920
make install
@@ -24,8 +25,8 @@ lint:fmt ## Run code linters
2425
mypy ellar_sql
2526

2627
fmt format:clean ## Run code formatters
27-
ruff format ellar_sql tests examples
28-
ruff check --fix ellar_sql tests examples
28+
ruff format ellar_sql tests samples
29+
ruff check --fix ellar_sql tests samples
2930

3031
test:clean ## Run tests
3132
pytest

ellar_sql/model/base.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,11 @@ class ModelBase(ModelDataExportMixin):
157157

158158
__table_args__: t.Any
159159

160-
def __init__(self, **kwargs: t.Any) -> None:
161-
...
160+
def __init__(self, **kwargs: t.Any) -> None: ...
162161

163-
def _sa_inspect_type(self) -> sa.Mapper["ModelBase"]:
164-
...
162+
def _sa_inspect_type(self) -> sa.Mapper["ModelBase"]: ...
165163

166-
def _sa_inspect_instance(self) -> sa.InstanceState["ModelBase"]:
167-
...
164+
def _sa_inspect_instance(self) -> sa.InstanceState["ModelBase"]: ...
168165

169166
@classmethod
170167
def get_db_session(

ellar_sql/model/table.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ def __init__(
3030
*args: sa_sql_schema.SchemaItem,
3131
__database__: t.Optional[str] = None,
3232
**kwargs: t.Any,
33-
) -> None:
34-
...
33+
) -> None: ...
3534

3635
@t.overload
3736
def __init__(
@@ -40,14 +39,12 @@ def __init__(
4039
metadata: sa.MetaData,
4140
*args: sa_sql_schema.SchemaItem,
4241
**kwargs: t.Any,
43-
) -> None:
44-
...
42+
) -> None: ...
4543

4644
@t.overload
4745
def __init__(
4846
self, name: str, *args: sa_sql_schema.SchemaItem, **kwargs: t.Any
49-
) -> None:
50-
...
47+
) -> None: ...
5148

5249
def __init__(
5350
self, name: str, *args: sa_sql_schema.SchemaItem, **kwargs: t.Any

ellar_sql/pagination/view.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ def pagination_context(
6565

6666
if t.TYPE_CHECKING:
6767

68-
def __init__(self, **kwargs: t.Any) -> None:
69-
...
68+
def __init__(self, **kwargs: t.Any) -> None: ...
7069

7170

7271
class PageNumberPagination(PaginationBase):

pyproject.toml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,40 +37,12 @@ dependencies = [
3737
"alembic >= 1.10.0"
3838
]
3939

40-
dev = [
41-
"pre-commit"
42-
]
43-
doc = [
44-
"mkdocs >=1.1.2,<2.0.0",
45-
"mkdocs-material >=7.1.9,<10.0.0",
46-
"mdx-include >=1.4.1,<2.0.0",
47-
"mkdocs-markdownextradata-plugin >=0.1.7,<0.3.0",
48-
"markdown-include",
49-
"mkdocstrings",
50-
"mkdocs-minify-plugin",
51-
"mkdocs-git-revision-date-localized-plugin"
52-
]
53-
5440
[project.urls]
5541
Documentation = "https://github.com/python-ellar/ellar-sql"
5642
Source = "https://github.com/python-ellar/ellar-sql"
5743
Homepage = "https://python-ellar.github.io/ellar-sql/"
5844
"Bug Tracker" = "https://github.com/python-ellar/ellar-sql/issues"
5945

60-
[project.optional-dependencies]
61-
test = [
62-
"pytest >= 7.1.3,< 9.0.0",
63-
"pytest-cov >= 2.12.0,<5.0.0",
64-
"pytest-asyncio",
65-
"aiosqlite",
66-
"anyio[trio] >= 3.2.1",
67-
"ruff ==0.3.0",
68-
"mypy == 1.8.0",
69-
"autoflake",
70-
"ellar-cli >= 0.3.3",
71-
"factory-boy >= 3.3.0"
72-
]
73-
7446
[tool.ruff]
7547
select = [
7648
"E", # pycodestyle errors

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
addopts = --strict-config --strict-markers
33
xfail_strict = true
44
junit_family = "xunit2"
5-
norecursedirs = examples/*
5+
norecursedirs = samples/*
66

77
[pytest-watch]
88
runner= pytest --failed-first --maxfail=1 --no-success-flaky-report

requirements-docs.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
markdown-include
2+
mdx-include >=1.4.1,<2.0.0
3+
mkdocs >=1.1.2,<2.0.0
4+
mkdocs-git-revision-date-localized-plugin
5+
mkdocs-markdownextradata-plugin >=0.1.7,<0.3.0
6+
mkdocs-material >=7.1.9,<10.0.0
7+
mkdocs-minify-plugin
8+
mkdocstrings[python] >=0.19.0, <0.25.0

0 commit comments

Comments
 (0)