Skip to content

change letter case for test case identifier#1200

Merged
hannaeko merged 6 commits into
zonemaster:developfrom
hannaeko:update-test-case-identifier-spec
Nov 9, 2023
Merged

change letter case for test case identifier#1200
hannaeko merged 6 commits into
zonemaster:developfrom
hannaeko:update-test-case-identifier-spec

Conversation

@hannaeko

@hannaeko hannaeko commented Aug 30, 2023

Copy link
Copy Markdown
Contributor

Purpose

Improve test case identifier and module readability by preferring capitalized words to upper case.

Context

zonemaster/zonemaster-gui#437

Changes

  • prefer capitalized words to full uppercase

How to test this PR

-

@hannaeko hannaeko added the A-Documentation Area: Documentation only. label Aug 30, 2023
@hannaeko hannaeko added this to the v2023.1.4 milestone Aug 30, 2023

@marc-vanderwal marc-vanderwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I only have one little suggestion for one paragraph.

Comment on lines +3 to +4
All test cases belong to one module, and it gets its name from that module's
name. The following modules are defined and available:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
All test cases belong to one module, and it gets its name from that module's
name. The following modules are defined and available:
All test cases belong to one module and their names are based on that module’s name.
The following modules are defined and available:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed the wording to match your proposal

marc-vanderwal
marc-vanderwal previously approved these changes Aug 31, 2023

@matsduf matsduf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of recommendation I think we should have a "should".

When referencing to a test case the test level name may be used in other letter
case than all uppercase.
When referencing to a test case the module name may be used in other letter
case, but for readability, camel case sould be prefered.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not think these are examples of "camelCase", https://en.wikipedia.org/wiki/Camel_case

"sould" --> "should"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed it for PascalCase then.

The typo has been fixed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No, "Address" is not PascalCase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See my other comment.

Comment on lines +16 to +17
The module name is not case sensitive, but camel case, as defined above,
should be prefered.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The module name is not case sensitive, but the forms defined above,
should be used when referring to the modules, i.e. "Address" and neither
"ADDRESS" nor "address".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done.

* Zone06

One exceptional test case identifier is `BASIC00`, in which the index
One exceptional test case identifier is `Basic00`, in which the index

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Basic00 has been removed, hasn't it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not yet

@matsduf matsduf modified the milestones: v2023.1.4, v2023.2 Sep 14, 2023
marc-vanderwal
marc-vanderwal previously approved these changes Oct 25, 2023

@matsduf matsduf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This document defines the case of the test level identifiers, and I think that is good, but I would like to see stronger wording.

It also tries to rename "test level" to "module", and that might be good, but it requires more changes and it should not start here. Rather in the master test plan.

In the description it is referred to "Camel case", but none of the suggestions are Camel case. "iPhone" is example of Camel case, but "Address" is not.

Comment on lines +3 to +4
All test cases belong to one module and their names are based on that module’s
name. The following modules are defined and available:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This document now refer "modules" but previously it referred to "test levels". We should use the same terminology in all places. The reason why this document referred to "test level" is because it is called so in other documents. We should be consistent.

See e.g. https://github.com/zonemaster/zonemaster/blob/master/docs/public/specifications/tests/MasterTestPlan.md#definition-of-test-levels

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think the current wording across component is Module,

and so on.

@hannaeko

hannaeko commented Oct 26, 2023

Copy link
Copy Markdown
Contributor Author

It also tries to rename "test level" to "module", and that might be good, but it requires more changes and it should not start here. Rather in the master test plan.

The wording "module" is used quite a lot, see Engine, CLI and Backend implementation and documentation. I just tried to make this document more uniform with the rest of the documents / components.

In the description it is referred to "Camel case", but none of the suggestions are Camel case. "iPhone" is example of Camel case, but "Address" is not.

I changed it to refers to PascalCase not camelCase. "Address" is PascalCase, with one word it would just be equivalent to the capitalized word, but covers the case of something with several words without having to change the document in the future.

@matsduf

matsduf commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

It is obvious that there is an inconsistency between "test level" and "module". The test plans refer to the IEEE terminology "test level". I guess that "module" has come from the Perl programming.

I am not against leaving "test level" but we should consider if there is any problem of using "module" for the non-programming side of Zonemaster. In the code, module also refer to other parts that do not match any test levels. If we decide to do the change, we should also update other documents to have a complete switch.

When it comes to Pascal case, I cannot see that any of the names of the test levels (or modules) are to be written in Pascal case. I do not think we should use the term in the document. It does not add anything, and it makes the text harder to understand.

"The more specific terms Pascal case and upper camel case refer to a joined phrase where the first letter of each word is capitalized, including the initial letter of the first word." https://en.wikipedia.org/wiki/Camel_case

@hannaeko

hannaeko commented Nov 6, 2023

Copy link
Copy Markdown
Contributor Author

All comments should have been addressed.

matsduf
matsduf previously approved these changes Nov 6, 2023
@hannaeko

hannaeko commented Nov 6, 2023

Copy link
Copy Markdown
Contributor Author

@matsduf please re-review, just fixed a typo.

@hannaeko hannaeko merged commit 66ce1e5 into zonemaster:develop Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Documentation Area: Documentation only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants