Skip to content

Conversation

@ovillellas
Copy link

On-going refactoring to have a more consistent transforms codebase (and with more tests).

  • Scaffolding done, including a system to ensure the API is consistent and the documentation is shared along the different implementations. API definition metadata describes the API call and documents it. A decorator system makes it easy to declare a function as an implementation of the API. The decorator checks that the function fits the API definition and adds the definition comment to the decorated function. The definitions also support the definition of PRE and POST conditions for parameters and result that must be true. These conditions can be run optionally by setting the HEXRD_XF_CHECK environment variable.

  • Full first implementation using numpy.

  • Partial implementation based on what was available using the C extension module.

  • Testing scaffolding done, with a test file for each function. A system that allows to run the very same tests on different equivalent implementations with little effort.

Oscar Villellas and others added 30 commits April 23, 2018 15:35
Modified setup.py accordingly. Also made coherent
the location of the sglite library location with
that of transforms.
name and path changes to get xf_numpy to import
Also added a workaround to the jit dispatcher not supporting ‘signature’
includes some clean up of numba functions.
For the default beam vector and the default eta vector an identity
matrix should return. This is kind of assumed in other parts of the
code.
Fixed api version so it generates the exceptions as the other versions
do.

Made the error messages a bit more coherent.
also fixed type with atol (1e+10 was meant to be 1e-10)
caught a bug in array version in numba.
Oscar Villellas added 2 commits October 30, 2018 11:21
So that it serves as documentation for the submodule testing as well as
guidelines for test writers.
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.

1 participant