-
Notifications
You must be signed in to change notification settings - Fork 27
Project folders #825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Project folders #825
Conversation
Co-authored-by: Filip Vnenčák <vnencak.filip@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a hierarchical project folders feature to organize projects, along with enhancements to the project listing endpoint. The implementation includes a new database table, REST API endpoints for folder management, and GraphQL integration to expose folder assignments.
Key Changes:
- Added comprehensive project folders API with CRUD operations, ordering, and project assignment capabilities
- Enhanced project listing endpoint to include
library,pinned, andproject_folderfields - Integrated folder information across REST and GraphQL APIs
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| schemas/schema.public.sql | Creates project_folders table with hierarchical structure and unique constraint on parent/label combinations |
| ayon_server/graphql/nodes/project.py | Adds project_folder field to ProjectNode and resolver to expose folder assignment via GraphQL |
| ayon_server/graphql/resolvers/projects.py | Extracts project_folder from project data in GraphQL queries |
| api/projects/list_projects.py | Modernizes field annotations, adds library, pinned, and project_folder fields to response model |
| api/project_folders/router.py | Establishes router for project folders API endpoints |
| api/project_folders/project_folders.py | Implements complete project folders API with models and endpoints for managing folder hierarchy |
| api/project_folders/init.py | Module initialization for project folders API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces a new "project folders" feature, allowing projects to be organized into hierarchical folders. It adds a new API for managing project folders, updates the project model and endpoints to support folder assignment, and creates the necessary database schema. The changes also ensure that folder information is available via both REST and GraphQL APIs.
Project Folders API and Models:
Added a new
project_folders.pymodule with models (ProjectFolderModel,ProjectFolderPostModel, etc.) and endpoints to create, update, delete, list, and reorder project folders. This includes validation, permissions, and error handling.Updated the project listing (
ListProjectsItemModelinlist_projects.py) to include an optionalproject_folderfield, and modified the list logic to populate this field from the project's data.Updated GraphQL project nodes and resolvers to include and return the
project_folderfield, ensuring folder assignment is accessible via GraphQL queries.Database Schema:
Added a new
project_folderstable to the database schema, including fields for hierarchy, position, and metadata, along with a unique index for folder labels within the same parent.Enhanced list project endpoint
This PR also addresses #804 by adding
libraryandpinnedflags to[GET] /api/projectsresultNotes
make setupafter checking out this PR in order to create the database table.