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

Conversation

jeanlauliac
Copy link
Contributor

🤔 What's changed?

Add the uri field which is required by the current implementation of Compiler.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, documentation etc. without changing behaviour)

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

Add the uri field which is required by the current implementation of `Compiler`.
Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

I asked a question, to understand a little more. (I don't know the Compiler interface!)

@@ -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.

@olleolleolle olleolleolle merged commit f9af9d8 into cucumber:main Mar 13, 2024
1 check passed
@aslakhellesoy
Copy link
Contributor

Hi @jeanlauliac,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

@jeanlauliac jeanlauliac deleted the patch-1 branch March 21, 2024 18:07
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.

3 participants