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

Simplify is_url function #7317

Merged
merged 4 commits into from
Nov 23, 2020
Merged

Simplify is_url function #7317

merged 4 commits into from
Nov 23, 2020

Conversation

federicotdn
Copy link
Contributor

@federicotdn federicotdn commented Nov 19, 2020

Proposed changes:
Change is_url so that it expects a somewhat reasonable URL and then check the schema/path/host. Use urllib.parse instead of regexp.

Fixes https://github.com/RasaHQ/rasa-x/issues/3881.

Status (please check what you already did):

  • added some tests for the functionality
  • updated the documentation
  • updated the changelog (please check changelog for instructions)
  • reformat files using black (please check Readme for instructions)

Copy link
Contributor

@wochinge wochinge left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

Can you please also add changelog?

@@ -271,7 +271,8 @@ async def load_agent_on_start(
)
except Exception as e:
rasa.shared.utils.io.raise_warning(
f"The model at '{model_path}' could not be loaded. " f"Error: {e}"
f"The model at '{model_path}' could not be loaded. "
Copy link
Contributor

Choose a reason for hiding this comment

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

🚀

rasa/nlu/utils/__init__.py Outdated Show resolved Hide resolved
tests/nlu/test_utils.py Show resolved Hide resolved
@rasabot rasabot merged commit 54aa43d into 2.0.x Nov 23, 2020
@rasabot rasabot deleted the simplify-is-url branch November 23, 2020 16:09
@federicotdn federicotdn mentioned this pull request Nov 23, 2020
4 tasks
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.

None yet

3 participants