Skip to content

Commit 1ad0503

Browse files
committed
upgraded package dependencies and python version
1 parent d89fa4e commit 1ad0503

File tree

3 files changed

+2
-124
lines changed

3 files changed

+2
-124
lines changed

ellar/core/schema.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -113,44 +113,3 @@ class HTTPValidationError(BaseModel):
113113

114114
class Schema(Serializer):
115115
pass
116-
117-
118-
class EllarPyProjectSerializer(Serializer):
119-
project_name: str = Field(alias="project-name")
120-
application: str = Field(alias="application")
121-
config: str = Field(alias="config")
122-
root_module: str = Field(alias="root-module")
123-
apps_module: str = Field(alias="apps-module")
124-
125-
126-
class EllarScaffoldList(Serializer):
127-
name: str
128-
is_directory: bool
129-
name_in_context: t.Optional[bool] = Field(default=None, alias="name-context")
130-
files: t.Optional[t.List["EllarScaffoldList"]]
131-
132-
133-
EllarScaffoldList.update_forward_refs()
134-
135-
136-
class EllarScaffoldSchema(Serializer):
137-
context: t.List[str]
138-
files: t.List[EllarScaffoldList]
139-
140-
@classmethod
141-
def schema_example(cls) -> "EllarScaffoldSchema":
142-
return cls(
143-
context=["project_name"],
144-
files=[
145-
dict(name="sample.ellar", is_directory=False),
146-
dict(
147-
name="sample",
148-
is_directory=False,
149-
files=[
150-
dict(
151-
dict(name="sample.ellar", is_directory=False),
152-
)
153-
],
154-
),
155-
],
156-
)

pyproject.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ classifiers = [
2929
"Intended Audience :: Developers",
3030
"License :: OSI Approved :: MIT License",
3131
"Programming Language :: Python :: 3",
32-
"Programming Language :: Python :: 3.6",
3332
"Programming Language :: Python :: 3.7",
3433
"Programming Language :: Python :: 3.8",
3534
"Programming Language :: Python :: 3.9",
@@ -47,16 +46,10 @@ dependencies = [
4746
"jinja2",
4847
# cli
4948
"typer >=0.6.1,<0.7.0",
50-
# exclude 0.11.2 and 0.11.3 due to https://github.com/sdispater/tomlkit/issues/225
51-
"tomlkit >=0.11.1,<1.0.0,!=0.11.2,!=0.11.3",
52-
"uvicorn[standard] == 0.18.3",
5349
# testing
5450
"httpx >= 0.22.0"
5551
]
5652

57-
[project.scripts]
58-
ellar = "ellar.cli:main"
59-
6053
[project.urls]
6154
Documentation = "https://github.com/eadwinCode/ellar"
6255
Source = "https://github.com/eadwinCode/ellar"
@@ -101,5 +94,6 @@ doc = [
10194
"mkdocs-material >=7.1.9,<8.0.0",
10295
"mdx-include >=1.4.1,<2.0.0",
10396
"mkdocs-markdownextradata-plugin >=0.1.7,<0.3.0",
104-
"markdown-include"
97+
"markdown-include",
98+
"mkdocstrings"
10599
]

tests/conftest.py

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
import functools
2-
import os.path
3-
import subprocess
4-
import sys
52
from pathlib import PurePath, PurePosixPath, PureWindowsPath
63
from uuid import uuid4
74

85
import pytest
96
from pydantic import create_model
107
from starlette.testclient import TestClient
11-
from tomlkit import table
12-
13-
from ellar.cli.service import PY_PROJECT_TOML, EllarCLIService, EllarPyProject
14-
from ellar.cli.testing import EllarCliRunner
158

169

1710
@pytest.fixture
@@ -41,71 +34,3 @@ class Config:
4134
@pytest.fixture
4235
def random_type():
4336
return type(f"Random{uuid4().hex[:6]}", (), {})
44-
45-
46-
@pytest.fixture
47-
def mock_py_project_table():
48-
return table()
49-
50-
51-
@pytest.fixture
52-
def ellar_py_project(mock_py_project_table):
53-
return EllarPyProject.get_or_create_ellar_py_project(mock_py_project_table)
54-
55-
56-
@pytest.fixture
57-
def add_ellar_project_to_py_project(ellar_py_project, tmp_py_project_path, tmp_path):
58-
EllarCLIService.write_py_project(
59-
tmp_py_project_path, ellar_py_project.get_root_node()
60-
)
61-
62-
def _wrapper(project_name: str):
63-
cli_service = EllarCLIService(
64-
py_project_path=tmp_py_project_path,
65-
ellar_py_projects=ellar_py_project,
66-
cwd=str(tmp_path),
67-
)
68-
cli_service.create_ellar_project_meta(project_name)
69-
return ellar_py_project
70-
71-
return _wrapper
72-
73-
74-
@pytest.fixture
75-
def write_empty_py_project(tmp_py_project_path, mock_py_project_table):
76-
EllarCLIService.write_py_project(tmp_py_project_path, mock_py_project_table)
77-
return mock_py_project_table
78-
79-
80-
@pytest.fixture
81-
def tmp_py_project_path(tmp_path):
82-
os.chdir(str(tmp_path))
83-
py_project_toml = tmp_path / PY_PROJECT_TOML
84-
py_project_toml.touch(exist_ok=True)
85-
return py_project_toml
86-
87-
88-
@pytest.fixture(autouse=True)
89-
def sys_path(tmp_path):
90-
sys.path.append(str(tmp_path))
91-
yield
92-
sys.path.remove(str(tmp_path))
93-
94-
95-
@pytest.fixture
96-
def cli_runner(tmp_path):
97-
os.chdir(str(tmp_path))
98-
return EllarCliRunner()
99-
100-
101-
@pytest.fixture
102-
def process_runner(tmp_path):
103-
os.chdir(str(tmp_path))
104-
105-
def _wrapper_process(*args, **kwargs):
106-
kwargs.setdefault("stdout", subprocess.PIPE)
107-
kwargs.setdefault("stderr", subprocess.PIPE)
108-
result = subprocess.run(*args, **kwargs)
109-
return result
110-
111-
return _wrapper_process

0 commit comments

Comments
 (0)