Closed farazkhanfk7 closed 3 years ago
@Mec-iS I think checks are failing because Travis is using a different version of hydra-python-core which hasn't been released yet. The job throws error that says that HydraClassProp object doesn't have a kwargs attribute. The tests are passing on my local. Can u please confirm.
ok. let's release the new hydra-python-core and update the requirements. please @farazkhanfk7 create an account at https://pypi.org/ and send me your username on Slack
If the column type is integer or float, then a random integer is returned
@farazkhanfk7 If the column type is a float, shouldn't a float value be returned?
@sameshl Yes, a float should be returned. But if the column type is Float, an integer 20 will be treated as 20.0 in database. This is why I created a random integer for both types.
Fixes #581
Checklist
Current behaviour
Database columns should be created with String, Integer or Float according to types defined in the ApiDoc.
New expected behaviour
hydrus will check for
range
of supported_properties. If the supported_property has arange
( specified datatype ) then column in database table will be created accordingly. For ex:Currently, I have added support for
Integer
andFloat
only. We can also addDateTime
column after this. If a user won't passrange
as an argument while creatingHydraClassProp
then the column will be treated as String in hydrus database. Example (Passed "xsd:integer" as range for two random HydraClassProp in apidoc):Also, I've made changes in
gen_dummy_object
function, so that it'll also check the type of column before creating it's dummy object. If the column type is integer or float, then a random integer is returned ( instead of a string).Change logs