Coder Social home page Coder Social logo

webweg's People

Contributors

ewang2002 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

webweg's Issues

Listing instructors for different meetings.

With the release of v0.3.4, each meeting now has a vector of instructors which denote the instructors (other than the instructor of the lecture/base meeting) assigned.

Should this be redesigned so that it lists all instructors assigned to that meeting per meeting instead?

Break functions into two functions for better testing

For testing purposes, it might be a good idea to break each function responsible for calling into a different endpoint into two functions:

  • a function that takes a JSON string and parses it and returns it, and
  • a function that makes the API call and gets a JSON string (and calls the function mentioned above).

Then, the idea is that our 2nd function can call the 1st function w/ the JSON string, but we can also call the 1st function with our own string for testing purposes.

Search Courses method doesn't seem to be correct.

Consider the following line of code:

request_filter
    .courses
    .iter()
    .map(|x| x.split_whitespace().collect::<Vec<_>>())
    .map(|course| {
        course
            .into_iter()
            .map(|x| self.get_formatted_course_code(x))
            .collect::<Vec<_>>()
            .join(":")
    })
    .collect::<Vec<_>>()
    .join(";")
    .to_uppercase()

Let's suppose request_filter.courses is ["COGS 108"]. Then, what happens is that we'll end up with [["COGS", "108"]] in the first map function. Then, in the second map closure, we'll iterate through each element in the first vector (["COGS", "108"]) and format both "COGS" and "108". The issue here is that "COGS" is not a course number.

Speaking of which, get_formatted_course_code is poorly named and should be called get_formatted_course_num.

`ping_server` wrapper function randomly crashes.

It looks like something went wrong when trying to unwrap here. For now, changed to unwrap_or_default but I'm not sure if this will change anything.

Error logs also shows that there was a core dumped message, so that's interesting.

Leaving this up as a reminder.

Classes with TBA meeting days results in null via rocket, , what does it show here?

ANAR 104 with null meeting days.

[{"subj_course_id":"ANAR 104","section_id":"085846","section_code":"A01","instructors":["Staff"],"available_seats":15,"enrolled_ct":0,"total_seats":15,"waitlist_ct":0,"meetings":[{"meeting_type":"LE","meeting_days":["Tu","Th"],"start_hr":15,"start_min":30,"end_hr":16,"end_min":50,"building":"SEQUO","room":"142","other_instructors":[]},{"meeting_type":"LA","meeting_days":null,"start_hr":0,"start_min":0,"end_hr":0,"end_min":0,"building":"TBA","room":"TBA","other_instructors":[]}],"needs_waitlist":false}]

All instructor names show up when searching for courses for PSYC 194C

In particular, all of the instructors in all sections of PSYC 194C appear as instructors for each section in the wrapper.

Put it another way, if section 001 has instructors A, B, C and section 002 has instructors A, C, D, then the wrapper will return A, B, C, D for 001 and 002.

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.