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

Upload/download urdfs #202

Merged
merged 20 commits into from
Jul 31, 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 .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ GITHUB_CLIENT_SECRET=

# For Google OAuth
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_CLIENT_SECRET=
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# .gitignore

#environment varibles
# Environment variables
.env
env.sh

Expand Down
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ Initialize the test databases by running the creation script:
python -m store.app.db create
```

And initialize the image bucket:
And initialize the artifact bucket:

```
aws s3api create-bucket --bucket images
aws s3api create-bucket --bucket artifacts
```

#### Admin Panel
Expand Down Expand Up @@ -84,6 +84,14 @@ Serve the FastAPI application in development mode:
ROBOLIST_ENVIRONMENT=local fastapi dev 'store/app/main.py' --port 8080 # On port 8080 to avoid conflicts with Docker
```

### Keeping Frontend and Backend In Sync

After updating the backend API, you need to update the generated API client. To do this, from this `frontend` directory, run:

```bash
openapi-typescript http://localhost:8080/openapi.json --output src/gen/api.ts # While running the backend API locally
```

### Configuration

Settings for the app backend live in the `store/settings/` directory. To configure which set of settings you are using, set `ROBOLIST_ENVIRONMENT`. It is the stem of one of the config files in the `store/settings/configs/` directory. When developing locally this should usually just be `local`
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ all:
# Serve #
# ------------------------ #

start-fastapi:
start-backend:
@fastapi dev 'store/app/main.py' --port 8080

start-frontend:
Expand Down
4 changes: 4 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ COPY /store/requirements.txt /app
# Install Python dependencies.
RUN pip install --no-cache-dir -r requirements.txt

# Copy code and install Python dependencies.
COPY . /app

# Installs the project.
RUN pip install --no-cache-dir -e .

# Expose the port that the application runs on.
EXPOSE 8080

Expand Down
2 changes: 2 additions & 0 deletions frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore codegen files
src/gen/
8 changes: 8 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ Build static files:
```bash
npm run build
```

## Updating Backend API

After updating the backend API, you need to update the generated API client. To do this, from this `frontend` directory, run:

```bash
openapi-typescript http://localhost:8080/openapi.json --output src/gen/api.ts # While running the backend API locally
```
Loading
Loading