Skip to content

Commit

Permalink
Merge pull request #18 from LoopMind-AI/restful_api
Browse files Browse the repository at this point in the history
Sdk api fix
  • Loading branch information
jinyu-loopmind committed Sep 4, 2023
2 parents 658c9ef + 128dadc commit 0b46a07
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,27 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']

python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Build the servers
run: docker compose up -d --build


- name: Set up Python environment
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install pytest
pip install -e .
- name: Run pytest on tests folder
run: pytest tests/

- name: Stop Docker Compose
run: docker-compose down
2 changes: 1 addition & 1 deletion frontend/src/components/variable_monitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function VariableMonitor({
);

useEffect(() => {
fetch(`/api/env?id=${env_id}`)
fetch(`/api/env/${env_id}`)
.then((response) => response.json())
.then((data) => {
setEnv(data);
Expand Down
2 changes: 1 addition & 1 deletion loopquest/crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def create_environment(backend_url: str, env: gymnasium.Env, user_id: str) -> st

def get_environment(backend_url: str, id: str):
id = replace_special_chars_with_dash(id)
response = requests.get(f"{backend_url}/env", params={"id": id})
response = requests.get(f"{backend_url}/env/{id}")
response.raise_for_status()
environment = response.json()
return environment["id"]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def parse_requirements(filename):

setup(
name="loopquest",
version="0.1.6",
version="0.1.7",
description="A Production Tool for Embodied AI.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 0b46a07

Please sign in to comment.