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

fix schema for Array classes #217

Merged
merged 3 commits into from
Mar 3, 2020
Merged

fix schema for Array classes #217

merged 3 commits into from
Mar 3, 2020

Conversation

loriab
Copy link
Collaborator

@loriab loriab commented Mar 3, 2020

Description

This will get us through Molecule, though perhaps it should be still more generic.

Changelog description

Status

  • Code base linted
  • Ready to go

@codecov
Copy link

codecov bot commented Mar 3, 2020

Codecov Report

Merging #217 into master will decrease coverage by 0.18%.
The diff coverage is n/a.

@loriab
Copy link
Collaborator Author

loriab commented Mar 3, 2020

a sample with Array

{'additionalProperties': False,
 'description': 'Facilitates the application of the simple transformation '
                'operations\n'
                '    defined by ``shift``, ``rotation``, ``atommap`` arrays '
                'and ``mirror``\n'
                '    boolean as recipe to the data structures\n'
                '    describing Cartesian molecular coordinates. Attaches '
                'functions to\n'
                '    transform the geometry, element list, gradient, etc. to '
                'the\n'
                '    AlignmentRecipe. When `mirror` attribute (defaults to '
                'False) active,\n'
                '    then molecular system can be substantively changed by '
                'procedure.\n'
                '\n'
                '\n'
                '\n'
                'Parameters\n'
                '----------\n'
                'shift : Array, Optional\n'
                '    Translation array (3,) for coordinates.\n'
                'rotation : Array, Optional\n'
                '    Rotation array (3, 3) for coordinates.\n'
                'atommap : Array, Optional\n'
                '    Atom exchange map (nat,) for coordinates.\n'
                'mirror : bool, Default: False\n'
                '    Do mirror invert coordinates?',
 'properties': {'atommap': {'description': 'Atom exchange map (nat,) for '
                                           'coordinates.',
                            'items': {'multipleOf': 1.0, 'type': 'number'},
                            'title': 'Atommap',
                            'type': 'array'},
                'mirror': {'default': False,
                           'description': 'Do mirror invert coordinates?',
                           'title': 'Mirror',
                           'type': 'boolean'},
                'rotation': {'description': 'Rotation array (3, 3) for '
                                            'coordinates.',
                             'items': {'type': 'number'},
                             'title': 'Rotation',
                             'type': 'array'},
                'shift': {'description': 'Translation array (3,) for '
                                         'coordinates.',
                          'items': {'type': 'number'},
                          'title': 'Shift',
                          'type': 'array'}},
 'title': 'AlignmentMill',
 'type': 'object'}

@loriab loriab mentioned this pull request Mar 3, 2020
2 tasks
Copy link
Collaborator

@dgasmith dgasmith left a comment

Choose a reason for hiding this comment

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

Oh good the __modify_schema__ PR went through. I remember seeing it, but didn't track its progress in Pydantic.

@dgasmith dgasmith merged commit ea52c1a into master Mar 3, 2020
@dgasmith dgasmith deleted the loriab-patch-2 branch March 3, 2020 14:20
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