Skip to content

Conversation

@T-rav
Copy link
Collaborator

@T-rav T-rav commented Feb 27, 2024

Moved to running as an Azure function

Summary by CodeRabbit

  • New Features

    • Launched a serverless API on Azure Functions for responsible web scraping with content extraction capabilities.
    • Added a workflow for building and deploying the Python project to Azure Functions.
    • Recommended VS Code extensions for improved development experience.
  • Documentation

    • Updated README with a summary of the Web Cat API's features and its transformation into a serverless model.
  • Chores

    • Specified project dependencies to ensure compatibility and functionality.

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2024

Walkthrough

The project has evolved to introduce a serverless API, "Web Cat," hosted on Azure Functions, aimed at responsible web scraping. It's designed to extract content from web pages ethically, adhering to robots.txt rules, and integrates with ChatGPT for enhanced text processing. This transformation includes a deployment workflow, recommended development tools, and core functionality for fetching and processing web content.

Changes

Files Change Summaries
.github/workflows/...webcatgpt.yml Adds workflow for building and deploying to Azure Function App "webcatgpt."
.vscode/extensions.json Recommends VS Code extensions, specifically for Azure Functions.
README.md Updates with a summary of Web Cat as a serverless API for responsible web scraping and ChatGPT integration.
src/function_app.py Introduces a function for scraping content respecting robots.txt, using Azure Functions.
src/requirements.txt Updates dependencies for the project, excluding azure-functions-worker and including others for web scraping.

🐇✨
To the cloud, we hop and leap,
With Web Cat's code, no secrets we keep.
Through pages and tags, we gently creep,
Extracting wisdom, vast and deep.
In Azure's embrace, our work does sleep.
🌌🚀🐰

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@T-rav T-rav merged commit e9bfa30 into main Feb 27, 2024
@T-rav T-rav deleted the azure-function branch February 27, 2024 21:47
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 056502c and 5b604b0.
Files ignored due to path filters (2)
  • src/host.json is excluded by: !**/*.json
  • src/local.settings.json is excluded by: !**/*.json
Files selected for processing (5)
  • .github/workflows/azure-function_webcatgpt.yml (1 hunks)
  • .vscode/extensions.json (1 hunks)
  • README.md (1 hunks)
  • src/function_app.py (1 hunks)
  • src/requirements.txt (1 hunks)
Files skipped from review due to trivial changes (1)
  • .vscode/extensions.json
Additional comments: 4
src/requirements.txt (1)
  • 1-8: The requirements.txt file is well-organized and includes clear guidance on managing azure-functions-worker. The listed dependencies are essential for the project's functionality, ensuring it runs efficiently in the Azure Functions environment.
README.md (1)
  • 5-44: The updates to the README.md file effectively communicate the transition to Azure Functions and the project's capabilities. The documentation is clear, providing users with a comprehensive understanding of the API's features, setup, and ethical web scraping practices.
src/function_app.py (1)
  • 1-50: The implementation in function_app.py effectively introduces web scraping functionality to the Web Cat API, with a strong emphasis on ethical practices such as respecting robots.txt. The code is well-structured, with clear error handling and the thoughtful inclusion of random user agent selection.
.github/workflows/azure-function_webcatgpt.yml (1)
  • 1-70: The GitHub workflow file is correctly configured to automate the build and deployment process of the Web Cat project to Azure Functions. The steps for setting up Python, managing dependencies, and deploying the application are well-defined, ensuring a smooth CI/CD pipeline.

T-rav added a commit that referenced this pull request Oct 10, 2025
Azure function instead of self hosted
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.

2 participants