Git Product home page Git Product logo

ucl-assistant-app's Introduction

UCL API build staging codecov

What is the UCL API?

UCL API started as a student-built platform for student developers to improve the student experience of everyone at UCL. We now also have our own end-user facing applications in addition to this, such as UCL Assistant, our rival app to UCL GO.

Our Goal

Create a ridiculously simple, documentation first, and comprehensive API around UCL's digital services and establish an ecosystem of third party UCL apps and services that use the API. Find out more at our website or if you feel brave try staging.

Interested in helping build it?

Read on more to find out how to setup and build the API. From here you can start writing your own changes and submitting them. See our Contribution Guide to learn more about how you can contribute.

Setup in 10 Minutes

For this setup to work you need to have docker, git, python (3.7), and node + pnpm installed. If you would like the old setup guide (without docker) that can be found here, it also contains some advanced information for maintainers. This guide has been tested to work on Windows (we recommend PowerShell Core), Linux, and MacOS.

Clone uclapi to a local directory:

git clone https://github.com/uclapi/uclapi.git
cd uclapi

Then start the development docker compose file:

docker-compose -f docker-compose-dev.yml up

And setup the frontend:

cd uclapi-frontend
pnpm install
pnpm start

And setup your Python virtual environment & Django (you may need to write python instead of python3):

cd backend/uclapi
cp .env.docker.example .env
python3 -m venv ./venv

# For unix:
source ./venv/bin/activate
# For windows:
./venv/Scripts/activate

# Then
pip install -r requirements.txt

# Finally, start the Django web server:
cd backend/uclapi
python3 manage.py runserver

Give it a go!

If those commands work you should be able to navigate to http://localhost:8000/dashboard in your browser, which will let you log in via Azure AD. If so, then you're up and running!

Testing

We're an amazing project, so obviously we have tests โœจ. Make sure you have the requirements installed in your virtual environment (and you have activated it) , cd into backend/uclapi and then run : python manage.py test --settings=uclapi.settings_mocked

Linting

We have a pre-commit hook set up that runs eslint on all staged JS files, stylelint on all staged scss files, and autopep8 & flake8 on all staged Python files. This automatically fixes style issues and stops the commit if there are any obvious problems (e.g. failure to define variable).

Documentation

As well as the user-facing documentation we also now ship our own internal Documentation which aims to help developers contribute to our code. To make it simply run make html while in the backend directory. You can then navigate to the build directory and open up index.html in your favourite browser to view the documentation. It can also be built in pdf, latex and a few other formats.

ucl-assistant-app's People

Contributors

anushks avatar christopherhammond13 avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar hueyy avatar ingalless avatar shu8 avatar tuxedofish avatar zipy124 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ucl-assistant-app's Issues

Display closest empty room

This could be displayed on the Rooms tab when no search query is entered (right now the screen is a bit empty). Based on your current coordinates, it could suggest nearby empty rooms.

Essentially, this is an incorporation of room-buddy into ucl-assistant.

In-App Notifications

When notifications are received whilst the app is open, they will not display on iOS and may not display on Android. The app needs to handle the notification itself. This is usually done with a custom in-app dropdown notification.

image

Handle the case of lecturers without department and email information

image

As of uclapi/uclapi#1064 duplicate timetable entries have been handled by putting a forward slash between lecturer names. We don't handle the case of multiple lecturer IDs or multiple departments beyond this fix.

One solution would be for us to respond with a list item with every lecturer, every email address and every department but this would be breaking for API clients. Another would be for us to check the fields in UCL Assistant to see if the data is present before displaying it.

Show Multiple Days for Timetable

It may be useful to see all events in the upcoming few days instead of just for the current day. A 3-day view might work best in portrait mode.

Look into React Native for Web

Expo & React Native now has web support??? This has really come full cycle.

This could allow us to turn ucl-assistant-app into a web app as well so people with non-smartphones, people who hate installing apps, and people on the computer who are too lazy to reach for their phones, can all enjoy ucl-assistant-app as well.

https://github.com/expo/web-examples

Person Detail Screen Loads Old Data First

  1. Do a search for somebody
  2. Tap on them
  3. Back out of the Person Detail screen
  4. Search for somebody else
  5. Tap on them
  6. The data for the first person you searched for is shown until the second person's data is loaded, after which it switches over.

Proposed solution: show no data (and just a loading indicator) when opening the Person Detail screen until the data is ready to be displayed.

Local time not handled correctly

Set your time to say 4pm on your phone. The app will now act like its 4pm, it should either convert the time or shift the graph.

Show Free Seats on Study Spaces Screen

At the moment the app says, for example, Quite busy (235/282)

It's probably more beneficial to say something like Quite busy (47/282 seats free)
I'm not sure if it'll fit in the box though? We might need to experiment a bit with the text there, but I think it'll make it more clear to users what the numbers mean.

Display Room Closed Booking differently

When rooms are closed they are booked as Room Closed by Room Closed. an example would be roberts building G02 on tuesday 12 Mar. Maybe we could detect this and display a warning that the room is closed? and change that booking to also look a little different?

Live Seating Maps

Awesome feature idea, but we'll need to think carefully about how to do this in a way that works well on portrait devices (given that the maps are mostly landscape)

One solution is to literally flip the maps 90 degrees and show them full screen, but we'll probably have to consider each map separately.

We'll also need a nice UI to let people choose which floor of the library they want to look at.

Happening Now

It would be awesome if we could have lectures which are currently in progress listed as 'happening now', similar to 'past events' that we have now. The only concern is how often this page is updated (e.g. would it require a manual refresh to update this?)

FAB should have fixed position

Floating Action Button on StudySpaceDetail Screen should stay at bottom right of screen regardless of scroll position.

Logout button does not clear state

It brings the user to the SplashScreen but does not actually clear user data. So the user is logged back in again upon re-opening the app

[High Priority] Privacy Guidelines

In order to publish in the Play Store, we have to abide by the following rules: https://play.google.com/about/privacy-security-deception/personal-sensitive/

This means that on the Splash screen we should have a notice that says something like:

By signing into this app, you accept that certain data will be required to ensure the app functions correctly.

We should also tell them exactly which organisations data is sent to:

  • UCL
  • UCL API [i.e. us]
  • Sentry for crash information

Plus, we should point out that updates may be downloaded automatically via Expo as they are made available. They will be informed if updates require a change in the privacy policy.
The app is subject to UCL's standard Privacy Policy: https://www.ucl.ac.uk/legal-services/privacy/general-privacy-policy

Continuous Deployment

We might want to add continuous deployment via Travis:

  • We could automatically publish master to a production release channel
  • And automatically publish PRs to individual release channels for testing purposes

More accurate historical data for studyspace occupancy

Right now, the chart in the app is plotted based on the average occupancy across the last 30 days. Whilst this generally works fine, the data can be very inaccurate during certain periods of time:

  • Between holidays and term time: overestimation when the holiday begins, and underestimation for the first few weeks of term
  • During bank holidays / public holidays / special events
  • When a new studyspace is opened / closed / etc, e.g. when the UCL Student Centre was opened, when a studyspace is re-opened after renovation, etc.
  • Certain libraries during certain periods of the year when there are many deadlines in close proximity

A better approach may be to identify analogous periods in time. The following app, which provides estimates of crossing times for one of the busiest land borders in the world, does this:

One easy way could be to look at the equivalent month/week from the previous year.

Display PC availability

This could be shown on the StudySpaces screens alongside the occupancy info (for those studyspaces with desktops).

isSigningIn state is persistent in redux

This means that if the app is quit during the sign-in process, on subsequent runs, isSigningIn will be true, and the user will be faced with an eternal spinner and be unable to sign in :(

Solution: do not persist isSigningIn.

Map of UCL

Including a campus map will probably be quite useful.

image

Quick and dirty way is to embed a zoomable image/pdf.

Alternatively, we could try to get access to the custom google map used on https://www.ucl.ac.uk/maps

Bug in logincheck

NavigationActions.reset is no longer a function in react-navigation 2. Use dispatch instead.

Details button on TimetableDetailScreen does not work

This button does not do anything at the moment.

It should probably open the PersonDetailScreen with the profile of the lecturer / instructor / etc.

However, the data I'm working with is a bit different from that received from the /search/people endpoint:

"lecturer": {
    "name": "HIRSCH, Robin (Prof)",
    "department_name": "Computer Science",
    "department_id": "COMPS_ENG",
    "email": "[email protected]"
}

There are a few options:

  1. We could remove the Details button altogether
  2. We could open the PersonDetailScreen anyway and only show the data we have available (i.e. missing status and with a slightly different department name).
  3. We could change the Details button to an Email button and open the email client upon press (as with the PersonDetailScreen)

I'm inclined towards Option 3 because this saves the end-user 1 tap. But Option 2 does seem reasonable as well.

Library Rooms Availability

On each study space's detail screen, it would be cool if we could list each map (which will be far easier to implement than the live maps) with a view that looks a bit like, for UCL Main Library (as an example):

Rooms
1st West: 17 seats free (total: 184)
1st East: 14 seats free (total: 84)
...
etc.

We could have each map name as a subtitle and put a live map underneath it (#3) but I think this will be too cramped on smaller (< 5") devices. For now, the text is probably enough.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.