https://github.com/jmisilo/jm-stacksync
https://github.com/jmisilo/jm-stacksync
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jmisilo/jm-stacksync
- Owner: jmisilo
- Created: 2025-08-27T10:01:05.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T15:39:26.000Z (10 months ago)
- Last Synced: 2025-08-28T18:41:25.435Z (10 months ago)
- Language: Shell
- Size: 21.2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# JM x Stacksync assignement
Assignement: https://drive.google.com/file/d/1uaPRGXqNqbCqGKqULqSw2CQ2dcid3T3r/view
Disclaimers:
```
- The assignement example result mentions `stdout`, however the assignement itself mentions to not include it, only the return value should be captured. I excluded it.
```
To run the project you have to build the docker image:
```bash
docker build -t stacksync . --no-cache
```
And then run it:
```bash
docker run -p 8080:8080 stacksync
```
You can test the API with curl:
```bash
curl -X POST "https://jm-stacksync-1043345859573.europe-central2.run.app/execute" \
-H "Content-Type: application/json" \
-d '{
"script": "import pandas as pd\n\ndef main():\n df = pd.DataFrame({\"a\": [1, 2, 3], \"b\": [4, 5, 6]})\n return {\"data\": df.to_dict(), \"shape\": list(df.shape)}"
}'
```
There are some test cases, in `test.sh` that you can run to verify the functionality (use --local flag to run it locally):
```bash
chmod +x test.sh
./test.sh
```
Command used to deploy to GCP Cloud Run:
```
gcloud run deploy jm-stacksync \
--source . \
--platform managed \
--region europe-central2 \
--allow-unauthenticated \
--port 8080 \
--memory 512Mi \
--cpu 1 \
--timeout 60s \
--execution-environment gen2
```
Thank you for the opportunity to work on this assignement!