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

API Update #3

Open
6 of 13 tasks
bencleary opened this issue Apr 18, 2022 · 5 comments
Open
6 of 13 tasks

API Update #3

bencleary opened this issue Apr 18, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@bencleary
Copy link
Owner

bencleary commented Apr 18, 2022

Working with the package for the last year and a half now has opened up some areas where improvement is needed and required. This will be a breaking change but will allow for a more stable platform to build from.

Tasks

  • Add pylint, black and other formatting tools
  • Remove the models.models. import string, and tidy up imports
  • Move the TimescaleModel to a utils package instead, it doesn't need to be the primary use as indicated by the multiple "why does 'time' need to be used statements"
  • Update queryset methods to reflect the lastest implementation from TimescaleDB
  • Add unit tests various parts
  • Add integration tests using the example project
  • Update the example project to show a more real-life example
  • Add documentation site
  • First pass of simple types

Potential or Investigative

  • Look at an admin integration interface
  • Retention periods
  • Compression
  • Distributed Tables
@bencleary
Copy link
Owner Author

Need to identify a testing plan as to where the most useful tests can be placed. A large chunk of the code base is behavioural rather than functional, i.e it requires something else to work, like the time_bucket function can only be used as part of a query. An initial testing plan is below:

Unit

  • Field properties
  • Util model properties

Integration (i.e requires a model and data to test)

  • Expressions
  • Aggregates
  • Manages
  • Querysets

All testing will be done through PyTest and will have a simple Django application configured for Timescale. It will require a timescale database instance to test against, i.e docker.

bencleary added a commit that referenced this issue Apr 19, 2022
adding new testing plan as in #3
@bencleary bencleary added the enhancement New feature or request label Apr 21, 2022
@bencleary bencleary self-assigned this Apr 21, 2022
@bencleary
Copy link
Owner Author

Added more tests and better exception handling within the database expressions. Test suite is still growing and will require review.

@bencleary
Copy link
Owner Author

bencleary commented Apr 24, 2022

Tests have been added and structure for tests has been decided:

  • Test aggregate methods
  • Test expression methods
  • Test full queries
  • Test field methods and properties

@bencleary
Copy link
Owner Author

@schlunsen - are you able to review anything that is currently in progress, in-particular the test suites to see if i have missed anything obvious so far?

@bencleary
Copy link
Owner Author

During current work the following tasks needs to be completed:

  • reduce duplicated logic in within expressions (checks for types, and formats, investigate using partials)
  • TimeBucketGapFill test suite feels pretty flaky, add more edge cases and failing test suites
  • Finish documentation for TimescaleModel - explain field names, and reasoning
  • Add logging interface
  • Mark Last & First as depreciated in this package
  • Initial types for querysets and managers (both inputs and outputs)
  • Expand docs for querysets and managers
  • Add check for manager and quersets to confirm model has a hypertable to use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant