Skip to content

Releases: e2nIEE/pandahub

pandahub v0.3.2

23 Jan 12:21
Compare
Choose a tag to compare
  • add support for timeseries collections
  • fix: activate created project by id

Full Changelog: v0.3.1...v0.3.2

pandahub v0.3.1

pandahub v0.3.0

27 Nov 08:13
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.2.10...v0.3.0

BREAKING CHANGES:

  • existing user collections have to be migrated (recreate with id field moved into _id - see below)
  • changed variable names in fastapi-mail: MAIL_TLS -> MAIL_STARTTLS and MAIL_SSL -> MAIL_SSL_TLS
  • applications integrating pandahub must adapt to changes introduced since fastapi-users v9 and fastapi v0.75

User database migration

pandahub v0.3.0 introduces a breaking change in the way user documents are stored. Log-ins will throw a backend error if you run pandahub >= v0.3.0 against a database containing users created with previous versions.

To migrate an existing database:

    from pandahub import PandaHub
    from pandahub.lib.database_toolbox import migrate_userdb_to_beanie
    ph = PandaHub()
    migrate_userdb_to_beanie(ph)

This migration breaks logins for pandahub < 0.3.0. Trying to create new users with an old pandahub version on a migrated database will fail if at least one user already exists. A backup of the original user collection will be created as users_fa9_%Y-%m-%d_%H-%M.

Background

fastapi-users, which pandahub depends on for user management, introduces a couple of breaking changes in version 10. With the switch to Beanie ODM for mongodb support, user ids are now saved on the _id field instead of id:

fastapi v9

{'_id': ObjectId('637f2341304330c7511e4056'), 'id': UUID('2b52cf59-f5c3-433c-963c-834fbe9edbeb'), 'email': '[email protected]'}

fastapi v10+

{'_id': UUID('2b52cf59-f5c3-433c-963c-834fbe9edbeb'), 'email': '[email protected]'}

To migrate, drop the index on id and move the id field into _id:

db["user_management"]["users"].drop_index("id_1")
db["user_management"]["users"].aggregate([{'$addFields': {'_id': '$id'}}, {'$unset': 'id'}, {'$out': 'users'}]

To roll back to pre-0.3.0, apply the reverse transformation:

db["user_management"]["users"].aggregate([{'$addFields': {'id': '$_id'}}, {'$unset': '_id'}, {'$out': 'users'}]`

pandahub v0.2.10

27 Nov 08:06
Compare
Choose a tag to compare

What's Changed

pandahub v0.2.9

27 Nov 08:05
Compare
Choose a tag to compare

What's Changed

  • Refactor functions for element creation and deletion by @jthurner in #39
  • added collection_name to GetTimeseriesModel for API calls by @jthurner in #40
  • Custom element filters for get_subnet by @jthurner in #41
  • Set mongodb indexes on project creation by @jthurner in #36

Full Changelog: v0.2.8...v0.2.9

pandahub v0.2.8

23 Nov 10:27
Compare
Choose a tag to compare

What's Changed

  • Fix: Return value of create_elements_in_db by @lhillma in #34

Full Changelog: v0.2.7...v0.2.8

pandahub v0.2.7

07 Sep 15:38
Compare
Choose a tag to compare

FIX: bulk timeseries functions have been fixed. Now reading and writing of timeseries is working again.

pandahub v0.2.6

06 Sep 12:20
Compare
Choose a tag to compare

release version 0.2.6

pandahub v0.2.5

06 Sep 02:01
Compare
Choose a tag to compare

pandahub v0.2.5

pandahub v0.2.3

04 Aug 09:36
Compare
Choose a tag to compare
  • ADDED version property in project data
  • ADDED method to migrate projects to latest version
  • ADDED option to disable registration
  • ADDED option to use a separate mongodb instance as global database
  • ADDED geo mode to handle geojson columns
  • ADDED tutorials
  • IMPROVED collections for element tables now start with 'net_'
  • IMPROVED project IDs now can be any name
  • IMPROVED compatibility with python < 3.9
  • IMPROVED project settings API
  • IMPROVED timeseries handling