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

IVS-228 purepythonparser for critical gherkin checks and info extraction #127

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

aothms
Copy link
Collaborator

@aothms aothms commented Nov 14, 2024

Doesn't fully work yet. Seems that whitespace within strings is discarded. So MVD and authoring are wrong.

afbeelding

@aothms
Copy link
Collaborator Author

aothms commented Nov 15, 2024

Should be ready for review with IfcOpenShell/step-file-parser@8a5349f

I didn't sync any submodules... so checkout the submodule heads when reviewing

@aothms aothms changed the title IVS-228 purepythonparser for critical gherkin checks and info extraction [WIP] IVS-228 purepythonparser for critical gherkin checks and info extraction Nov 15, 2024
Copy link
Contributor

@Ghesselink Ghesselink left a comment

Choose a reason for hiding this comment

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

Looking good. Just had to run the step_file_parser as a module to get it running. Along with some changes on the gherkin-side (also see Jira)
Just have to wait a new ifcopenshell build.

Comment on lines +541 to +547
# @nb previously we also checked for:
# or (len(proc.stderr) > 0):
#
# but I now get warnings:
#
# - features/environment.py:86: ContextMaskWarning: user code is masking context attribute 'gherkin_outcomes';
# see the tutorial for what this means
Copy link
Contributor

Choose a reason for hiding this comment

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

I also noticed this warning a while ago, it appears every run in between scenario's. It seems it is because we set

old_outcomes = getattr(context, 'gherkin_outcomes', []) 
context.gherkin_outcomes = old_outcomes

I think it's some leftover from the past, when had issues with context resetting/overlap between scenario's. The lines don't affect the outcomes that are being outputted to the tests or stored in the database. When I remove them, the warning goes away and nothing changes when running pytest or checking the platform.
It's probably safe and clearer to delete them ..

desc = ifc_file.header.file_description[0][0]
else:
desc = ifc_file.header.file_description.description[0]
# @todo implement based on grammar in header agreement PDF
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this will be covered by IVS-179 / the header policy checks ?
There's at least some overlap.

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.

2 participants