Skip to content

Commit e8a8f2e

Browse files
Merge pull request #20 from UNSW-Redback-Racing/25T3-updates
25T3 TA Updates
2 parents 406f2f7 + e804875 commit e8a8f2e

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
![daq_ta_banner](https://github.com/UNSW-Redback-Racing/DAQ-Technical-Assessment/assets/38149391/9893b793-21ac-4b30-a48f-e26003763460)
22

3-
# UNSW Redback Racing | Data Acquisition Technical Assessment 2025 T1
3+
# UNSW Redback Racing | Data Acquisition Technical Assessment 2025 T3
44

55
This assessment aims to gauge your current technical ability and give you a practical introduction to some of what we do here at Redback Racing. We don't expect everyone to complete everything perfectly - you may not be familiar with all the frameworks and tools mentioned here, and so you may find it helpful to consult the resources linked, as well as doing your own research.
66

77
We also highly encourage you to read through the code and try to understand how it currently works, as well as reading the terminal output of the code once you get it running.
88

99
**Please ensure you note down your approaches, thoughts and research in the [brainstorming.md](./brainstorming.md) file.**
1010

11-
If you have any questions/require clarification about the spec, direct them to the [#daq-ta-questions](https://discord.com/channels/884232338316345374/1144840015856291890) channel within the [UNSW Redback Racing Discord](https://discord.gg/7RT4qewZ) server.
11+
If you have any questions/require clarification about the spec, direct them to the [#daq-ta-questions](https://discord.gg/xm3GvxdD) channel within the [UNSW Redback Racing Discord](https://discord.gg/KYNk9X65) server.
1212

13-
### Submission Due Date: 11:59PM 15/03/2025
13+
### Submission Due Date: 11:59PM 06/09/2025
1414

1515
## Prerequisites
1616

@@ -40,4 +40,4 @@ Please refer to the `docs/README.md` file within each theme directory to find re
4040

4141
## Submission
4242

43-
Complete the submission form [here](https://forms.office.com/r/NPkBJZwVzG)
43+
Complete the submission form [here](https://forms.office.com/r/mk2AeZeTWr)

spyder/docs/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,11 @@ To do this:
6666

6767
**Additionally, it is assumed that your solution to each answer is justified within the `brainstorming.md` file. You may write as much content as you see fit for each question.**
6868

69-
1. Since the `ui` service operates within a docker container, any code changes that you make will not be immediately reflected until you rebuild the containers. [nodemon](https://www.npmjs.com/package/nodemon) is a package which will help reflect any changes you make immediately by automatically restarting the node application when any file is changed. Your task is to install and configure the **nodemon** npm package into the `ui` directory.
69+
1. When running the emulator, the client will occasionally recieve values in the incorrect format. This will be visible in the output of `streaming service` as well as the `ui`. Think about what is happening, and write additional code in `streaming-service` that prevents 'invalid' data from being sent to the frontend. What you wish to do with 'invalid' data is up to you, so long as it is justified in `brainstorming.md`.
7070

71-
2. When running the emulator, the client will occasionally recieve values in the incorrect format. This will be visible in the output of `streaming service` as well as the `ui`. Think about what is happening, and write additional code in `streaming-service` that prevents 'invalid' data from being sent to the frontend. What you wish to do with 'invalid' data is up to you, so long as it is justified in `brainstorming.md`.
71+
2. A safe operating range for the battery temperature is 20-80 degrees. Add a feature to the backend `streaming-service` so that each time the received battery temperature exceeds this range more than 3 times in 5 seconds, the current timestamp and a simple error message is printed to console.
7272

73-
3. A safe operating range for the battery temperature is 20-80 degrees. Add a feature to the backend `streaming-service` so that each time the received battery temperature exceeds this range more than 3 times in 5 seconds, the current timestamp and a simple error message is printed to console.
74-
75-
4. Currently the connect/disconnect button in the top right corner of the ui (frontend) does not update when data is streamed in via streaming service. Why is this occurring and what can be done to rectify this?
73+
3. Currently the connect/disconnect button in the top right corner of the ui (frontend) does not update when data is streamed in via streaming service. Why is this occurring and what can be done to rectify this?
7674

7775
- **Tip:** To start/stop emulating data, you can start/stop the individual data-emulator docker container
7876
- To see a list of all running docker containers
@@ -88,7 +86,7 @@ To do this:
8886
docker start spyder-data-emulator-1
8987
```
9088

91-
5. The NextJS frontend is currently very basic. **Using primarily tailwindCSS and Shadcn/ui components**, extend the frontend by completing the following:
89+
4. The NextJS frontend is currently very basic. **Using primarily tailwindCSS and Shadcn/ui components**, extend the frontend by completing the following:
9290

9391
- Ensure the data displayed from `streaming-service` is correct to **3 decimal places** instead of being unbounded as it is currently.
9492
- Ensure the battery temperature value changes colours based on the current temperature (E.g. changing to red when the safe temperature range is exceeded).
@@ -104,7 +102,7 @@ To do this:
104102
- You may use components other than those mentioned above if they can be justified in your `brainstorming.md` file (E.g. additional charting libraries, notifications (toast) libraries etc).
105103
- You are free to make more than three additional features if you're feeling creative!
106104
107-
6. **Optional Task** - Within the `ui` repository is a file named `page.tsx`. You should be familiar with this file from previous steps. You are tasked with seperating the **websocket** code from `page.tsx` into a new file called `data-wrapper.tsx`. This should contain any code that handles the storage/acquisition of data from streaming service. The file `data-wrapper.tsx` should contain a react context that wraps `numeric.tsx` and any other components that display data.
105+
5. **Optional Task** - Within the `ui` repository is a file named `page.tsx`. You should be familiar with this file from previous steps. You are tasked with seperating the **websocket** code from `page.tsx` into a new file called `data-wrapper.tsx`. This should contain any code that handles the storage/acquisition of data from streaming service. The file `data-wrapper.tsx` should contain a react context that wraps `numeric.tsx` and any other components that display data.
108106
- To use the data stored in this file, you will need to create a context hook using createContext/useContext.
109107
- The following is a brief introduction into creating a react context and the benefits/reasons for doing so:
110108
https://www.w3schools.com/react/react_usecontext.asp
@@ -122,6 +120,8 @@ To see the ui, go to [http://localhost:3000](http://localhost:3000) in your brow
122120
123121
### Additional Notes
124122
125-
- In order to use this command you will have to install **Docker Desktop** in Windows or **Docker** in the terminal locally depending on how your system is configured.
123+
- In order to use this command you will have to install [**Docker Desktop**](https://docs.docker.com/get-started/introduction/get-docker-desktop/) for Windows/Mac/Linux or [**Docker Engine**](https://docs.docker.com/engine/install/) for Linux in the terminal locally depending on how your system is configured.
124+
- Running `docker compose up` the first time may take awhile which is completely ok because Docker needs to pull images and build services from scratch. Subsequent runs of `docker compose up` shouldn't take nearly as long since Docker reuses cached layers and existing containers.
126125
- If you happen to install any new packages, you will need to run `docker compose up --build`.
127126
- To simplify, the reason for this is because the telemetry system runs in a containerised environment where the packages are only installed upon the containers first build. So once the containers are created (with `docker compose up`), should there be any package changes, the containers must be rebuilt (denoted by the `--build` flag) for the new packages to be installed.
127+
- If you get stuck on a question, feel free to skip it and come back to it at the end or completely skip it overall. You do not have to complete each task sequentially.

spyder/ui/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ RUN npm run build
88

99
EXPOSE 3000
1010

11-
CMD ["npm", "start"]
11+
CMD ["npm", "run", "dev"]

0 commit comments

Comments
 (0)