Releases: e2nIEE/pandahub
v0.3.9
v0.3.8
v0.3.7
v0.3.6
What's Changed
- consider realm when activating project by name by @dlohmeier in #50
- remove PandaHubClient by @jthurner in #52
- project housekeeping by @jthurner in #51
- access of correct collection in get_net_ids by @dlohmeier in #54
- Fix upgrade project version: early exit, log spam by @jthurner in #57
- bump version to 0.3.6 by @jthurner in #58
Full Changelog: v0.3.5...v0.3.6
v0.3.5
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
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
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
- 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
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
andMAIL_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'}]`