Skip to content
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

feat: expose webrequest get page in html format to intelligent contract sintax #486

Merged

Conversation

cristiam86
Copy link
Collaborator

Fixes #478

What

  • The web page in HTML format method (get_html) from the webrequest module has been exposed in the equivalence principle functions by adding a new parameter called "format" in the EquivalencePrinciple.get_webpage method

Why

  • This is needed for some use cases

Testing done

  • I ran the integration tests for the prediction market example

Decisions made

I added a new parameter to extend the current functionality instead of a new method that would require changes in the previous name, therefore breaking the existing examples.

Checks

  • I have tested this code
  • I have reviewed my own PR
  • I have created an issue for this PR
  • I have set a descriptive PR title compliant with conventional commits

Reviewing tips

Add format in the intelligent contract get_webpage and look at the result in the logs.

User facing release notes

Now, you can also get the content of a web page in HTML format; check the docs to learn how to pass an extra parameter to the get_webpage method and get the content in the format you prefer.

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 17.20%. Comparing base (c4c2d77) to head (f49e6d5).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #486      +/-   ##
==========================================
- Coverage   17.90%   17.20%   -0.70%     
==========================================
  Files         111      111              
  Lines        7955     7903      -52     
  Branches      191      190       -1     
==========================================
- Hits         1424     1360      -64     
- Misses       6456     6468      +12     
  Partials       75       75              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cristiam86 cristiam86 deleted the branch main September 11, 2024 09:57
@cristiam86 cristiam86 closed this Sep 11, 2024
@cristiam86 cristiam86 reopened this Sep 11, 2024
@cristiam86 cristiam86 changed the base branch from staging to main September 11, 2024 10:00
@cristiam86 cristiam86 linked an issue Sep 11, 2024 that may be closed by this pull request
@cristiam86 cristiam86 merged commit 46d3417 into main Sep 16, 2024
16 of 17 checks passed
Copy link
Contributor

🎉 This PR is included in version 0.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@cristiam86 cristiam86 deleted the 478-expose-get-html-on-the-web-request-module-for-developers branch October 16, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose get html on the web request module for developers
2 participants