1. 24 Jun, 2019 1 commit
    • 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=().
  2. 21 Jun, 2019 18 commits
    • sarsonl's avatar
    • sarsonl's avatar
      PEP8 of file · eeeb8a84
      sarsonl authored
    • 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
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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:
      it would now be called:
      (m_'s removed from within the name)
      Question raised about whether we want the attribute to be called:
      but on attempting to modify this, an mapping error is called.
    • 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.
    • 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.
  3. 06 May, 2019 2 commits
    • damb's avatar
      Return ordered result · be90da69
      damb authored
    • 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
  4. 05 May, 2019 1 commit
  5. 03 May, 2019 5 commits
  6. 02 May, 2019 5 commits
  7. 30 Apr, 2019 8 commits