Skip to content

Commit ea7ab2f

Browse files
authored
version 0.1 (#3)
1 parent e0125b6 commit ea7ab2f

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ COPY . .
1515
EXPOSE 8000
1616

1717
# Run the FastAPI app with Uvicorn server
18-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
18+
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port $PORT"]
19+

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# SwiftComp-API
22
[![Version](https://img.shields.io/github/v/release/wenbinyugroup/swiftcomp-api)](https://github.com/wenbinyu/swiftcomp-api/releases)
33
[![Build Status](https://github.com/wenbinyugroup/swiftcomp-api/actions/workflows/ci.yml/badge.svg)](https://github.com/wenbinyugroup/swiftcomp-api/actions)
4-
[![codecov](https://codecov.io/gh/wenbinyugroup/swiftcomp-api/branch/main/graph/badge.svg)](https://codecov.io/gh/wenbinyugroup/swiftcomp-api)
54
[![Last Commit](https://img.shields.io/github/last-commit/wenbinyugroup/swiftcomp-api)](https://github.com/wenbinyugroup/swiftcomp-api/commits/main)
65

76

@@ -39,6 +38,16 @@
3938

4039
---
4140

41+
## Public Use
42+
The SwiftComp API is deployed online:
43+
https://swiftcomp-api-7327e882adaf.herokuapp.com
44+
45+
You can access API documentation at:
46+
* Swagger UI: https://swiftcomp-api-7327e882adaf.herokuapp.com/docs
47+
* ReDoc: https://swiftcomp-api-7327e882adaf.herokuapp.com/redoc
48+
49+
---
50+
4251
## Installation Using Docker (recommend)
4352

4453
### Prerequisites
@@ -119,6 +128,20 @@ uvicorn app.main:app --reload
119128

120129
This will start the SwiftComp API server at http://127.0.0.1:8000.
121130

131+
132+
5. **Testing**:
133+
134+
The repository includes unit tests using `pytest`. To run the tests:
135+
136+
* Ensure you are in the virtual environment.
137+
* Run the following command:
138+
```bash
139+
PYTHONPATH=./ pytest
140+
```
141+
142+
143+
---
144+
122145
## API Documentation
123146
FastAPI automatically generates interactive API documentation using **Swagger** and **Redoc**. Once the server is running, you can access the documentation at:
124147

@@ -132,14 +155,7 @@ FastAPI automatically generates interactive API documentation using **Swagger**
132155
* **POST /api/v1/laminate_3d_properties**: Computes the 3D properties of laminate.
133156
* **POST /api/v1/udfrc_properties**: Calculates UDFRC properties.
134157

135-
## Testing
136-
The repository includes unit tests using `pytest`. To run the tests:
137-
138-
1. Ensure you are in the virtual environment.
139-
2. Run the following command:
140-
```bash
141-
PYTHONPATH=./ pytest
142-
```
158+
---
143159

144160
## Contributing
145161
We welcome contributions to **SwiftComp-API**! Here's how you can help:

0 commit comments

Comments
 (0)