Skip to content

Commit

Permalink
Rename inner import from jaclang_jaseci to jac_cloud too
Browse files Browse the repository at this point in the history
  • Loading branch information
ypkang committed Sep 9, 2024
1 parent 6719c96 commit df8f66b
Show file tree
Hide file tree
Showing 35 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.jac_mypy_cache/
6 changes: 3 additions & 3 deletions jac-cloud/docs/Jaseci.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
| {**kwargs} | any fields that's currently supported in `uvicorn.run` | N/A | N/A |

```python
import:py from jaclang_jaseci {FastAPI}
import:py from jac_cloud {FastAPI}

with entry:__main__ {
FastAPI.start(
Expand All @@ -32,7 +32,7 @@ with entry:__main__ {
- group will be based on allowed `methods` and `path` on specs
- group 1: `/walker/{walker's name}`
- group 2: `/walker/{walker's name}/{node}`
- to control enpoint specification, you need to declare inner `class __specs__ {}` or `obj __specs__ {}`. You may also use `@specs` from `jaclang_jaseci.plugin.jaseci.specs` if you have disabled auto endpoint
- to control enpoint specification, you need to declare inner `class __specs__ {}` or `obj __specs__ {}`. You may also use `@specs` from `jac_cloud.plugin.jaseci.specs` if you have disabled auto endpoint
- walker support all kind of http method and all fastapi's supported object as path variable / query parameters / json body / file

## **Supported specs**
Expand All @@ -46,7 +46,7 @@ with entry:__main__ {

## **Examples**
```python
import:py from jaclang_jaseci {FastAPI}
import:py from jac_cloud {FastAPI}

walker post_no_body {}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def create_cmd() -> None:

@cmd_registry.register
def serve(filename: str, host: str = "0.0.0.0", port: int = 8000) -> None:
from jaclang_jaseci import FastAPI
from jac_cloud import FastAPI

"""Serve the jac application."""
base, mod = os.path.split(filename)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Example of simple walker walking nodes."""
import:py from jaclang_jaseci.core.architype {BaseAnchor}
import:py from jaclang_jaseci.core.context {JaseciContext}
import:py from jaclang_jaseci.jaseci.models {User as BaseUser, NO_PASSWORD}
import:py from jaclang_jaseci.jaseci.utils {SendGridEmailer}
import:py from jac_cloud.core.architype {BaseAnchor}
import:py from jac_cloud.core.context {JaseciContext}
import:py from jac_cloud.jaseci.models {User as BaseUser, NO_PASSWORD}
import:py from jac_cloud.jaseci.utils {SendGridEmailer}
import:py from dataclasses {dataclass}
import:py from fastapi {UploadFile}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def trigger_openapi_specs_test(self) -> None:
res = get(f"{self.host}/openapi.json", timeout=1)
res.raise_for_status()

with open("jaclang_jaseci/tests/openapi_specs.json") as file:
with open("jac_cloud/tests/openapi_specs.json") as file:
self.assertEqual(load(file), res.json())

def trigger_create_user_test(self, suffix: str = "") -> None:
Expand Down
6 changes: 3 additions & 3 deletions jac-cloud/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
setup(
name="jac-cloud",
version=VERSION,
packages=find_packages(include=["jaclang_jaseci", "jaclang_jaseci.*"]),
packages=find_packages(include=["jac_cloud", "jac_cloud.*"]),
install_requires=[
"jaclang~=0.7.17",
"fastapi~=0.111.0",
Expand Down Expand Up @@ -35,8 +35,8 @@
package_data={},
entry_points={
"jac": [
"jac = jaclang_jaseci.plugin.jaseci:JacPlugin",
"serve = jaclang_jaseci.plugin.cli:JacCmd",
"jac = jac_cloud.plugin.jaseci:JacPlugin",
"serve = jac_cloud.plugin.cli:JacCmd",
],
},
author="Jason Mars",
Expand Down

0 comments on commit df8f66b

Please sign in to comment.