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

Formatting of values in Ranges #19

Closed
rowlesmr opened this issue Apr 13, 2023 · 2 comments · Fixed by #22
Closed

Formatting of values in Ranges #19

rowlesmr opened this issue Apr 13, 2023 · 2 comments · Fixed by #22

Comments

@rowlesmr
Copy link
Collaborator

rowlesmr commented Apr 13, 2023

There are different ways of formatting values in ranges:

    _type.contents                Real
    _enumeration.range            0.0:1.0
    _type.contents                Real
    _enumeration.range            0.:180.
    _type.contents                Real
    _enumeration.range            0:1.0
    _type.contents                Real
    _enumeration.range            0:90
    _type.contents                Integer
    _enumeration.range            1:48
    _type.contents                Real
    _enumeration.range            0.0:100.

IIRC, CIF2 specification separated the formatting of a value from it's interpretation as an integer/real, so this is purely cosmetic, but...

For consistency, should there be a standard way of doing things?

Reals -> 1.0
Integers -> 1

??

@jamesrhester jamesrhester transferred this issue from COMCIFS/cif_core Apr 14, 2023
@jamesrhester
Copy link
Contributor

This is really more appropriate for the style guide so I've transferred the issue.

@jamesrhester
Copy link
Contributor

I agree that writing reals with at least one digit after the decimal point is more harmonious. In terms of the style guide, the stipulation would be that there should be at least one digit after the decimal point, and any following digits must be non-zero if present.

rowlesmr added a commit to rowlesmr/cif_core that referenced this issue Jun 25, 2023
jamesrhester pushed a commit to COMCIFS/cif_core that referenced this issue Jun 28, 2023
Format enumeration ranges to follow guidance in COMCIFS/comcifs.github.io#19
---------

Co-authored-by: vaitkus <[email protected]>
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 a pull request may close this issue.

2 participants