Skip to content

Commit

Permalink
Task/DES-2623: Add Pydantic models and integration tests for entity m…
Browse files Browse the repository at this point in the history
…etadata (#1137)

* Add Pydantic models and integration tests for entity metadata

* linting

* Default to null values for fields we plan to deprecate

* Add utils for constructing graphs from projects/pubs

* refactor to use constants for entity names

* add paths to publication graph constructor

* add utils for converting legacy data

* improve conciseness of update_file_tag_paths method

* Update BaseProject to use the new facility model

* validate dropdown options as id/name pairs for type Other

* consolidate dropdown values in Experiments

* clean up code for handling dropdowns

* improve types and add post-validator for fields in base project metadata

* Represent all dropdown value fields as id/name pairs

* update alias for experimental facility

* store string-type award numbers under 'number' instead of 'name

* construct graphs for all pubs. TODO: handle file tags when no path is provided.

* Fix bugs in file tag transforms

* factor out models/validators and populate publication graph with user list

* consolidate fields and parse keywords as array

* Publish Other metadata as a child node for consistent versioning.

* Factor out method for constructing entity paths

* move projects_v2 into the designsafe api module

* add deduplication for published paths

* add version information to pub graphs

* add leading slash to published base paths

* Add database model and ingest workflow for project metadata

* add database-enforced uniqueness constraint for project IDs.

* update project model and migration scripts

* add utilities for updating metadata and graphs

* consolidate migrations and add tests for project metadata init

* fix type ambiguities in schema models

* Refactor and add more unit tests for operations

* improve re-ordering algo

* formatting

* bugfixes and tests for file/tag association

---------

Co-authored-by: Jake Rosenberg <[email protected]>
Co-authored-by: Jake Rosenberg <[email protected]>
Co-authored-by: Jake Rosenberg <[email protected]>
Co-authored-by: Jake Rosenberg <[email protected]>
  • Loading branch information
5 people authored Feb 2, 2024
1 parent 5f1476a commit 367b663
Show file tree
Hide file tree
Showing 31 changed files with 3,633 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ignore=CVS,tests.py
# ignore-list. The regex matches against paths and can be in Posix or Windows
# format. Because '\\' represents the directory delimiter on Windows systems,
# it can't be used as an escape character.
ignore-paths=^.*migrations/.*$
ignore-paths=^.*migrations/.*$,^.*_tests/.*$

# Files or directories matching the regular expression patterns are skipped.
# The regex matches against base names, not paths. The default value ignores
Expand Down Expand Up @@ -429,7 +429,8 @@ disable=raw-checker-failed,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead
use-symbolic-message-instead,
duplicate-code

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
Empty file.
10 changes: 10 additions & 0 deletions designsafe/apps/api/projects_v2/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Projects V2 API"""
from django.apps import AppConfig


class ProjectsV2AppConfig(AppConfig):
"""App config for Projects V2 API"""

name = "designsafe.apps.api.projects_v2"
label = "projects_v2_api"
verbose_name = "Designsafe Projects V2"
Loading

0 comments on commit 367b663

Please sign in to comment.