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

Update README.md, python example #235

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ from gherkin.pickles.compiler import Compiler

parser = Parser()
gherkin_document = parser.parse("Feature: ...")
gherkin_document["uri"] = "uri_of_the_feature.feature"
Copy link
Contributor

Choose a reason for hiding this comment

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

πŸ” Looks good! Thanks!

Minor question, not a blocker: Is "uri_of_the_feature.feature" an acceptable "uri", here?

  • If yes, that's cool,
  • If not, perhaps we can use something that would be a real URI, (e.g. "file:///home/alice/projects/my_app/uri_of_the_feature.feature", "http://example.com/gherkin_features/uri_of_the_feature.feature")

(Minor question #2: can Parser.parse dig out "uri" out of given text to parse? Sounds improbable.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copied this URL from another language's example. We can pick an example url and change it everywhere.

Copy link
Contributor

Choose a reason for hiding this comment

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

No need to, change, let's merge this improvement as it stands , thanks for filling me in.

pickles = Compiler().compile(gherkin_document)
```

Expand Down