-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🏗 Build Spider: Los Angeles Board of Supervisors #9
base: main
Are you sure you want to change the base?
🏗 Build Spider: Los Angeles Board of Supervisors #9
Conversation
WalkthroughThe changes introduce a new spider class, Changes
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review as they are similar to previous changes (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range and nitpick comments (1)
city_scrapers/spiders/losca_Board_of_Supervisors.py (1)
58-58
: Use.strip()
to Clean Up the Time StringInstead of splitting the time string by newline and taking the first element, you can use
.strip()
to remove any leading or trailing whitespace from the time string. This approach is more robust and accounts for any unexpected whitespace.Apply this diff:
- time = item.css(".clock-time time::text").get().split("\n")[0] + time = item.css(".clock-time time::text").get().strip()
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- city_scrapers/spiders/losca_Board_of_Supervisors.py (1 hunks)
- tests/files/losca_Board_of_Supervisors.html (1 hunks)
- tests/test_losca_Board_of_Supervisors.py (1 hunks)
Additional comments not posted (2)
tests/test_losca_Board_of_Supervisors.py (1)
1-139
: Good Test Coverage and Usage of FixturesThe tests provide thorough coverage of the
LoscaBoardOfSupervisorsSpider
, validating all key attributes of the parsed items. The use offreezegun
to freeze time ensures consistent test results regardless of the current date. Great job on setting up comprehensive tests!tests/files/losca_Board_of_Supervisors.html (1)
1-192
: Inclusion of Test HTML File Is AppropriateIncluding the HTML file for testing purposes is acceptable. It ensures that tests can run reliably without relying on live website data, which may change over time. This approach contributes to consistent and repeatable test results.
The CI check is having trouble running the FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/city-scrapers-losca/city-scrapers-losca/.venv/bin/python' This happened on my last commit, too. It passed after I reran the job. However, this time time I've rerun it like 3 times and it's still failing. Didn't want to keep retrying after that. Please advise. |
What's this PR do?
This PR adds a Los Angeles County, CA scraper for Board of Supervisors.
Why are we doing this?
Scraper requested from spreadsheet.
Steps to manually test
test_output.csv
to ensure the data looks valid.Are there any smells or added technical debt to note?
None.
Summary by CodeRabbit
New Features
Tests