-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Python implementation #113
base: main
Are you sure you want to change the base?
Conversation
A second pair of eyes would be great for the publishing as I haven't tried to publish a directory outside the module before ("features" directory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers. Mostly looks good.
But it does look like you've copied the ruby implementation. This includes quite a few files that aren't essential to the CCK (we are in the process of cleaning them up). It would be better to copy the javascript implementation.
Ideally we only distribute the feature files (input) and the ndjson files (output).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some additional minor thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
@jsa34 I've somewhat simplified the release scripts. And made them look more like Ruby. Can you check I didn't do anything silly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example situation needs fixing to replicate a legitimate consumption of the CCK.
Also you might need to extend the docs to support the new 'empty' feature which was merged in recently. This one will likely slip through silently because it's the one item that doesn't need step definitions writing as there are none!
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last minute check: Do we want to run the release scripts in 3.8 - @jsa34 just confirm this if you can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self - re-reviewing the whole PR as I'd forgotten about it, this comment still stands
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: What version support do you want for the CCK. Ideally this should be a lower-bounded version of whatever the consuming cucumber flavour supports (i.e. for the CCK we support a similar amount of versions to the equivalent cucumber-ruby flavour)
|
||
2. Set up your test environment. Here's an example of how you might set up a test using `pytest`: | ||
|
||
```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important TOFIX: This example / documentation should be added to be something functionally equivalent to "HOW" your cck will run in the consuming cucumber flavour.
The sample here is the internal tests for the library which wouldn't be copied by a consuming cucumber. For cucumber ruby the documentation example is here: https://github.com/cucumber/compatibility-kit/blob/main/ruby/README.md#installation-and-usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: This will need fixing. See the link above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to make the requisite changes in the devkit
folder too to ensure that the script will generate your files.
Running locally inside the devkit folder and then running the npm
script should locally generate all files that will then populate your CCK package proper
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self - re-reviewing the whole PR as I'd forgotten about it, this comment still stands
@@ -0,0 +1,36 @@ | |||
name: Release Python Package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've standardised all the workflows so far I'm working on just to say "Release X" where X is the name of the language. The filename can stay the same.
This way in large polyglots I know exactly what's being released
|
||
jobs: | ||
test-python: | ||
defaults: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced this is correct, recently we reverted. Can you add the npm script inside this entire job (Will need adding).
|
||
2. Set up your test environment. Here's an example of how you might set up a test using `pytest`: | ||
|
||
```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: This will need fixing. See the link above
pytest = "^7.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to check - we've had issues before with specific poetry versions, can we ensure this will work on old and new versions of python so it's not a barrier
'cdata', | ||
'data-tables', | ||
'examples-tables', | ||
'hooks', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add empty
in here also
🤔 What's changed?
Added python implementation of kit for publishing to PyPI
⚡️ What's your motivation?
Able to test upcoming messages.
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally generated from a template, then edited by hand. You can modify the template here.