Skip to content

Implement Group Class Scraper#110

Merged
isabellahoie merged 25 commits into
masterfrom
kidus/scraper-fix2
Oct 18, 2023
Merged

Implement Group Class Scraper#110
isabellahoie merged 25 commits into
masterfrom
kidus/scraper-fix2

Conversation

@kidzegeye
Copy link
Copy Markdown
Contributor

Overview

Implemented the scraper for group classes

Changes Made

*Finished the scraper for group classes in scraper.py

  • Created ClassInstance model, which is an Association table between Classes and Gyms that contains information about a scheduled instance of a class

Test Coverage

Verified models and data in GraphQL playground and the Sqlite database

Next Steps (delete if not applicable)

Related PRs or Issues (delete if not applicable)

Screenshots (delete if not applicable)

Screen Shot Name

Copy link
Copy Markdown
Contributor

@joycrwu joycrwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scraper code looks good, for some of the models in the codebase, have their formatting been changed on purpose or is it just a git formatting thing?

@kidzegeye
Copy link
Copy Markdown
Contributor Author

The scraper code looks good, for some of the models in the codebase, have their formatting been changed on purpose or is it just a git formatting thing?

I think its just my linter

Copy link
Copy Markdown
Contributor

@joycrwu joycrwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok slay

Copy link
Copy Markdown
Collaborator

@isabellahoie isabellahoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good just my 2 questions !!

Comment thread src/models/classes.py
isVirtual = Column(Boolean(), nullable=False, default=False)
start_time = Column(DateTime(), nullable=False)
end_time = Column(DateTime(), nullable=False)
class_ = relationship("Class", back_populates="gyms")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused as to what "class_" is ??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its a relationship to the Class model, but "class" is a reservedword in python so i had to call it class_

Comment thread src/models/classes.py
start_time = Column(DateTime(), nullable=False)
end_time = Column(DateTime(), nullable=False)
class_ = relationship("Class", back_populates="gyms")
gym = relationship("Gym", back_populates="classes")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for a many to many relationship or a one to many?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

many classInstances to one gym

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait so what is the difference between the "gym_id" column and "gym" column

Copy link
Copy Markdown
Collaborator

@isabellahoie isabellahoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good :)

@isabellahoie isabellahoie merged commit 3b56d88 into master Oct 18, 2023
@vinnie4k vinnie4k deleted the kidus/scraper-fix2 branch December 22, 2023 17:46
@isabellahoie isabellahoie mentioned this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants