Skip to content

Releases: e2nIEE/pandahub

v0.3.9

30 Sep 13:35
b4a2b20
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.8...v0.3.9

v0.3.8

10 Sep 07:46
3eb2487
Compare
Choose a tag to compare

What's Changed

  • enforce specifying variant argument as int instead of list by @jthurner in #61
  • bump version to 0.3.8 by @jthurner in #62

Full Changelog: v0.3.7...v0.3.8

v0.3.7

06 Sep 07:50
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.3.6...v0.3.7

v0.3.6

05 Sep 08:09
3ea9e2a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.5...v0.3.6

v0.3.5

04 Sep 09:35
Compare
Choose a tag to compare

What's Changed

  • added collection_name to GetTimeseriesModel for API calls by @dlohmeier in #38

Full Changelog: v0.3.3...v0.3.5

pandahub v0.3.4

03 Jul 14:57
Compare
Choose a tag to compare

Changelog

  • repaired tests
  • added the possibility to add informations to a project
  • added switches for CORS
  • added more env parsing
  • repaired the docker build
  • added a pyproject.toml

pandahub v0.3.3

20 Jun 07:17
Compare
Choose a tag to compare

What's Changed

  • Added registry class to JSON Decoder upon calling json.loads by @dlohmeier in #19
  • Additional project entries by @dlohmeier in #43
  • alleviate race condition creating non-unique net-ids by @jthurner in #45
  • pandas 2.0 compatibility for timeseries compression by @julffers in #42
  • make variants more robust by @jthurner in #46
  • add mongodb_indexes and datatypes as arguments to PandaHub() by @jthurner in #48

Full Changelog: v0.3.2...v0.3.3

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': 'my@user.com'}

fastapi v10+

{'_id': UUID('2b52cf59-f5c3-433c-963c-834fbe9edbeb'), 'email': 'my@user.com'}

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'}]`