Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename jaclang_jaseci to jac_cloud internally in the jac-cloud package #1254

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ jobs:
run: |
jac clean
jac tool gen_parser
jac serve jaclang_jaseci/tests/simple_graph.jac --port 8000 &
jac serve jac_cloud/tests/simple_graph.jac --port 8000 &
sleep 3
pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.jac_mypy_cache/
4 changes: 2 additions & 2 deletions jac-cloud/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# **JACLANG JASECI**
# **jac-cloud**

### Installation
```bash
Expand All @@ -10,5 +10,5 @@ pip install jaclang black pre-commit pytest flake8 flake8_import_order flake8_do
pre-commit install
```
# **REFERENCES**
### [**Jaseci**](./docs/Jaseci.md)
### [**jac-cloud**](./docs/Jaseci.md)
### [**Environment Variables**](./docs/Environment-Variables.md)
12 changes: 6 additions & 6 deletions jac-cloud/docs/Jaseci.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[<< back to main](../README.md)
# **Jaseci**
# **jac-cloud**

## **How To Start**
- `FastAPI.start` will convert walkers to FastAPI endpoints
- as default, jaseci have base user and sso apis
- as default, `jac_cloud` have base user and sso apis

## **Supported Args**
| **NAME** | **DESCRIPTION** | **ENVIRONMENT VARIABLE** | **DEFAULT** |
|-----------|-------------------|---------------------------|---------------|
| **host** | your local host | HOST | 0.0.0.0 |
| **port** | your local port | PORT | 8000 |
| **emailer** | overrided `jaclang_jasec.jaseci.utils.Emailer` | N/A | N/A |
| **emailer** | overrided `jac_cloud.jaseci.utils.Emailer` | N/A | N/A |
| {**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.
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
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
Loading