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

Replace pragma structure #37

Open
wants to merge 6 commits into
base: plcte-2020
Choose a base branch
from
Open

Conversation

JoeAtHPI
Copy link
Collaborator

@JoeAtHPI JoeAtHPI commented Feb 2, 2021

This MR replaces the serialization of examples in pragmas through referencing their test methods instead. so in order for all the existing examples to still be styled as morphs, we generated tests and replaced the pragmas with the new ones.

Aka pragmas go from looking like this
<exampleName: active: self: expectedValue: with: ....> to <testRef: active:> as the data is in the tests.

As the setUpScript and tearDownScript are not yet serialized, they still are part of the pragma.

Additionally, it changes the annotation extraction so that the new pragma structure is also getting displayed as morphs in the BPBabylonianBrowser. For that old example pragmas were serialized to tests and then changed to the new testRef structure

@JoeAtHPI
Copy link
Collaborator Author

JoeAtHPI commented Feb 2, 2021

Live specimen test failing due to me not knowing how to initialize these :D

@coveralls
Copy link

coveralls commented Feb 3, 2021

Pull Request Test Coverage Report for Build 532206976

  • 197 of 214 (92.06%) changed or added relevant lines in 61 files are covered.
  • 246 unchanged lines in 40 files lost coverage.
  • Overall coverage decreased (-1.6%) to 68.146%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/Babylonian-Tests.package/BPSerializerRoundtripTest.class/instance/assertExample.equals..st 0 1 0.0%
packages/Babylonian-Tests.package/BPTestExamplesClass.class/instance/methodWithLiveSpecimen..st 0 1 0.0%
packages/Babylonian-Core.package/BPScriptExample.class/instance/asPragma.st 0 2 0.0%
packages/Babylonian-Tests.package/BPStylerTest.class/instance/method.st 0 2 0.0%
packages/Babylonian-Tests.package/BPAnnotationMorphsTestTest.class/instance/testExample1.st 0 5 0.0%
packages/Babylonian-Core.package/BPScriptExample.class/instance/initializeFromDeserialized..st 0 6 0.0%
Files with Coverage Reduction New Missed Lines %
packages/Babylonian-Tests.package/BPStylerTest.class/instance/method.st 1 0%
packages/Babylonian-Core.package/BPActiveExamples.class/instance/examples.st 4 0%
packages/Babylonian-Core.package/BPActiveExamples.class/instance/runActiveExamples.st 4 0%
packages/Babylonian-Core.package/BPExample.class/instance/trace.st 4 0%
packages/Babylonian-Core.package/BPExampleExecutionInterrupted.class/instance/trace..st 4 0%
packages/Babylonian-Core.package/BPExampleTraceInformation.class/instance/trace..st 4 0%
packages/Babylonian-Core.package/BPExampleTraceInformation.class/instance/tracingProcess..st 4 0%
packages/Babylonian-Core.package/BPFailedTrace.class/instance/tracedValue.st 4 0%
packages/Babylonian-Core.package/BPFailedTrace.class/instance/traceHasFailedBefore.st 4 0%
packages/Babylonian-Core.package/BPSpecimenRegistry.class/instance/at..st 4 0%
Totals Coverage Status
Change from base Build 512525654: -1.6%
Covered Lines: 4837
Relevant Lines: 7098

💛 - Coveralls

@codeZeilen
Copy link
Member

After looking through some of the things happening in this PR I started wondering what it is supposed to do? It kind of replaces most of the central example infrastructure?

@JoeAtHPI
Copy link
Collaborator Author

JoeAtHPI commented Feb 3, 2021

@codeZeilen Oh, I thought we were on the same page so I skipped the description, sorry for the misunderstanding. This MR replaces the serialization of examples in pragmas through referencing their test methods instead. so in order for all the existing examples to still be styled as morphs, we generated tests and replaced the pragmas with the new ones.

@JoeAtHPI JoeAtHPI added enhancement New feature or request plcte-2020 labels Feb 3, 2021
@codeZeilen
Copy link
Member

Now that I had time to consider this. To improve the mergability of this with regard to develop, we might want to approach this differently. Instead of replacing everything, this could be implemented by subclassing BPExample and BPScriptExample and adding corresponding buttons to the UI.

Currently, merging this change back into develop would change the complete infrastructure which would prevent me from merging for at least a couple of months during which I need it to remain stable. If this is too much effort, we should briefly chat on Monday. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plcte-2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants