DevOps: Add AiiDA deprecation warnings #45
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The warnings are enabled by setting the
AIIDA_WARN_v3
environment variable toTrue
in the CI workflow.Most of the warnings are addressed, but a few remain that cannot be trivially fixed:
id
property on theaiida.orm.Entity
class is deprecated. This is being called because the ORM proxy model declaresid
as the primary key field. This is correct for the database models of thePsqlDosBackend
inaiida-core
, but the front-end ORM is using thepk
property instead.attributes
,extras
andrepository_metadata
of the proxy models are declared "top-level" and sopydantic
will set them on the ORM instance using that property, however, these properties have been deprecated inaiida-core
and should be set through thebase.attributes.set_many
,base.extras.set_many
and thebase.repository.metadata
properties instead.With the current setup using
pydantic
it is not clear how these changes can be addressed and whether the manner in which field values are being set on the underlying ORM model instance can be customized.