Skip to content
Snippets Groups Projects
  1. Jun 24, 2019
    • sarsonl's avatar
      LiteratureSource relationships -> one to one · 31365e07
      sarsonl authored
      On testing the relationships for LiteratureSource and CreationInfo, it
      was found that they were not one to one, although they were one to one
      on the schema level. An extra parameter was added to the relationships
      on the parent side, backref=().
      31365e07
  2. Jun 21, 2019
    • sarsonl's avatar
    • sarsonl's avatar
      PEP8 of file · eeeb8a84
      sarsonl authored
      eeeb8a84
    • sarsonl's avatar
      Fixing of unit tests and addition to READMS.md · 39e051f6
      sarsonl authored
      The unit tests have now been fixed to run without error and some
      information has been added to the readme file, but this has gaps. The
      app file has had an extra warning added correctly informing the user
      that a config file does not exist rather than the config section not
      existing.
      39e051f6
    • sarsonl's avatar
      Change to Literature Source & Creation Info · 76f3a63a
      sarsonl authored
      Exploring the usage of the WS with Postgresql, it was found that the
      column names for flattened tables LiteratureSource etc. were too long
      for the character limit, and these were truncated so that the db could
      not be built.
      The >63 char limit meant that the only sensible solution was to
      reimplement the table structure as being nested tables.
      
      Test files have also been moved to appropriately named folders.
      
      Also some cleaning up of moved files was done.
      76f3a63a
    • sarsonl's avatar
      Change datetime serialization so no timezone. · 278fb510
      sarsonl authored
      The datetimes output from the schema will always be utc, with
      a timezone of 0, so the timestamp has been removed.
      278fb510
    • sarsonl's avatar
      Addition of logic so that parents always returned if no children · 842ae180
      sarsonl authored
      There is a specific case where if hydraulic query parameters are
      used and these filter out all the hydraulic children, then nothing
      was returned. We thought the expection should be that if there
      are no matching children, the parents should still be returned if
      they are valid.
      
      Validation on query parameters has also been updated in accordance
      with the Ramsis core code so that these match.
      842ae180
    • sarsonl's avatar
      Do not return sections if epoch time not valid · f2b70095
      sarsonl authored
      When datetime query parameters were used to filter hydraulics,
      The sections of the borehole would all be returned regardless
      of the section epoch time. Now logic has been added to also
      filter sections on epoch time if this does not overlap with
      the hydraulic search criteria.
      
      A test case was added to the populate_db_cases.py to test.
      f2b70095
    • sarsonl's avatar
      Route which returns specific borehole defined to return JSON object · 42751187
      sarsonl authored
      Previously this route would always return a list, although more
      than one JSON boject would never be returned.
      42751187
    • sarsonl's avatar
      Addition Flask-Migrate · 492c2c28
      sarsonl authored
      Flask migrate functionality was added as this might be required in
      the future of using postresql. Some print statements were removed
      with this commit.
      492c2c28
    • sarsonl's avatar
      Minor updates to docstrings, addition of test SQLite db · ddba6dc8
      sarsonl authored
      The SQLite db and the code that generates the content for this
      populate_db_test_cases.py has been added.
      
      Some small changes made to comments and docstrings in files.
      
      Addition of manage.py to manage migration within the postgresql db.
      This is not finished at present.
      ddba6dc8
    • sarsonl's avatar
      Addition of unit tests and refactoring code · 5a66f4a7
      sarsonl authored
      Some refactoring of code was required to make the code cleaner.
      
      Added more validation to the schema based on what input data is allowed.
      
      Centralised the column prefix m_
      
      Added more docstrings.
      5a66f4a7
    • sarsonl's avatar
      Reimplementation of schema logic and parsing data · f875d98b
      sarsonl authored
      Cross-code change to the way the schemas have been implemented and where
      they are used. Each fields that will be output from a schema is uniquely
      referenced so that the same schema can be used for validataion on
      deserialization and also for producing json output.
      
      Added measured_depth to the borehole level.
      
      Using a custom parser with strict validation on the input query
      parameters, as when using webargs, inputing a parameter that is not
      included in the schema would not return an error. I have added the tests
      for the strict.py parser file but these do not pass yet.
      f875d98b
    • sarsonl's avatar
      Change attr names to match with 'm_'+column key · 3658862d
      sarsonl authored
      It was decided that it would be sensible if the column key
      closely matched to the attribute name. Previously this
      was deeply nested and made very long and confusing attribute
      names. Have also added the ability to give a different column
      name to the attribute name.
      3658862d
    • sarsonl's avatar
      Moving query filter class to its own file · d93ca708
      sarsonl authored
      As it didn't belong in an existing file, this has been
      moved. The tests and the code are currently unfinished,
      further testing required.
      d93ca708
    • sarsonl's avatar
      Column attributes now use no m_ prefix · 402f4025
      sarsonl authored
      It was decided that it was a cleaner implementation to name the
      ORM columns and ORM attributes differently.
      
      This is cleaner without having to reference the m_ prefix all the
      time, and the user should not have to know about this.
      
      To avoid having m_ prefix on the attributes but still maintaining
      prefix on column keys required an extra arg to be added to most
      functions. Also fixed the bug where if an attribute was
      previously called:
      m_literaturesource_m_literaturesource_creator_m_\
      literaturesource_creator_person_givenname
      
      it would now be called:
      m_literaturesource_literaturesource_creator_\
      literaturesource_creator_person_givenname
      
      (m_'s removed from within the name)
      
      Question raised about whether we want the attribute to be called:
      m_literaturesource_creator_person_givenname
      but on attempting to modify this, an mapping error is called.
      402f4025
    • sarsonl's avatar
    • sarsonl's avatar
      Add filter query class to centralize column filtering. · e57f4947
      sarsonl authored
      Implemented cleaner way of doing column comparison to input query
      parameters. No functionality currently to do specialised filters which
      use joins, but this use will be added if and when required.
      
      Unit tests writen for new class.
      e57f4947
    • sarsonl's avatar
      Refactoring code to try and minimise use of same code multiple times. Have to... · 4871aab4
      sarsonl authored and sarsonl's avatar sarsonl committed
      Refactoring code to try and minimise use of same code multiple times. Have to discuss the use of None filtering in query as I am not sure about the purpose.
      4871aab4
  3. May 06, 2019
    • damb's avatar
      Return ordered result · be90da69
      damb authored
      be90da69
    • damb's avatar
      Join with HydraulicSample · bee25889
      damb authored
      When evaluating time constraint parameters validate the
      HydraulicSample's datetime value, as well. As a consequence, the
      response returns only data, when there is at least a single valid sample
      available.
      bee25889
  4. May 05, 2019
  5. May 03, 2019
  6. May 02, 2019
  7. Apr 30, 2019
Loading