Skip to content

Commit f91f7ea

Browse files
authored
✨ Is2392/api project version control (ITISFoundation#2529)
* updates tables diagram * new vc tables * migration script for new projects_version_control tables * review @sanderegg: removed unused file * new utils-aiohttp helpers module * updates snapshots app module * adds ORMs in meta-db * creating repo api handlers * implements repo API handlers * fixes bad rebase after PR ITISFoundation#2519 * removed meta_models.py * separated also snapshots handler tests * moved openapi_specs fixture to root conftest.py * ORM supports pagination * Implements get repos handler * Normalized handlers * prepared tests * strict markers * adapting handlers implementation to new core signatures * fixes on utils_aiopg * implemented update * Added fixture to emulate user modifying the project * test meta core passes * activate snapshot handlers * adjusts OAS for project/snapshots * Fixes snapshots tests * fixing checkpoints handlers * Removes pydantic dependency * Implements get_snapshot_contents * updates precommit config * Handles not-implemented errors * fixing meta handlers * removed wrong constraints * fixing meta handlers tests * webserver api version 0.6.0 → 0.7.0 * improved error handling * changes ondelete in projcts_vc and add migration script * fixes project deletion * Adds echo statments for testing * adds workbench in fixture and fixes view * @sanderegg review: long options * @sanderegg review: minor OAS * @sanderegg review: set onupdate clauses and updated migration script for project_vc tables * @sanderegg review: minor cleanup * @GitHK review: cleanup, transations * fixes handlers tests * fixes aiopg_orm tests after changing page policy * Fixes missing filter in fetch_page * Renames meta by version_control * Fixes dir_with_random_content fixture producing toolong paths
1 parent 9addb14 commit f91f7ea

File tree

62 files changed

+4974
-904
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4974
-904
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ Add here YOUR checklist/notes to guide and monitor the progress of the case!
4646
4747
e.g.
4848
49-
- [ ] Did you change any service's API? Then make sure to bundle document and upgrade version (``make openapi-specs``, ``git commit ...`` and then ``make version-*``)
49+
- [ ] Openapi changes? ``make openapi-specs``, ``git commit ...`` and then ``make version-*``)
50+
- [ ] Database migration script? ``cd packages/postgres-database``, ``make setup-commit``, ``sc-pg review -m "my changes"``
5051
- [ ] Unit tests for the changes exist
5152
- [ ] Runs in the swarm
5253
- [ ] Documentation reflects the changes

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ repos:
1717
hooks:
1818
- id: isort
1919
- repo: https://github.com/psf/black
20-
rev: 20.8b1
20+
rev: 21.7b0
2121
hooks:
2222
- id: black

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ endif
537537

538538
.PHONY: clean clean-images clean-venv clean-all clean-more
539539

540-
_git_clean_args := -dxf -e .vscode -e TODO.md -e .venv -e .python-version
540+
_git_clean_args := -dx --force --exclude=.vscode --exclude=TODO.md --exclude=.venv --exclude=.python-version --exclude=*keep*
541541
_running_containers = $(shell docker ps -aq)
542542

543543
.check-clean:

api/specs/webserver/openapi-projects.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ paths:
443443
- snapshot
444444
summary: List Snapshots
445445
description: Lists all snapshots taken from a given project
446-
operationId: simcore_service_webserver.repos_snapshots_api_handlers.list_snapshots
446+
operationId: simcore_service_webserver.version_control_handlers_snapshots.list_project_snapshots_handler
447447
parameters:
448448
- required: true
449449
schema:
@@ -482,7 +482,7 @@ paths:
482482
title: Response List Snapshots Projects Project Id Snapshots Get
483483
type: array
484484
items:
485-
$ref: "#/components/schemas/SnapshotResource"
485+
$ref: "#/components/schemas/SnapshotItem"
486486
"422":
487487
description: Validation Error
488488
content:
@@ -495,7 +495,7 @@ paths:
495495
- snapshot
496496
summary: Create Snapshot
497497
description: Takes a snapshot of the project at this time
498-
operationId: simcore_service_webserver.repos_snapshots_api_handlers.create_snapshot
498+
operationId: simcore_service_webserver.version_control_handlers_snapshots.create_project_snapshot_handler
499499
parameters:
500500
- required: true
501501
schema:
@@ -516,7 +516,7 @@ paths:
516516
content:
517517
application/json:
518518
schema:
519-
$ref: "#/components/schemas/SnapshotResource"
519+
$ref: "#/components/schemas/SnapshotItem"
520520
"422":
521521
description: Validation Error
522522
content:
@@ -531,7 +531,7 @@ paths:
531531
- snapshot
532532
summary: Get Snapshot
533533
description: Gets commit info for a given snapshot
534-
operationId: simcore_service_webserver.repos_snapshots_api_handlers.get_snapshot
534+
operationId: simcore_service_webserver.version_control_handlers_snapshots.get_project_snapshot_handler
535535
parameters:
536536
- required: true
537537
schema:
@@ -553,7 +553,7 @@ paths:
553553
content:
554554
application/json:
555555
schema:
556-
$ref: "#/components/schemas/SnapshotResource"
556+
$ref: "#/components/schemas/SnapshotItem"
557557
"422":
558558
description: Validation Error
559559
content:
@@ -566,7 +566,7 @@ paths:
566566
- snapshot
567567
summary: Delete Snapshot
568568
description: Deletes both the commit and the project itself
569-
operationId: simcore_service_webserver.repos_snapshots_api_handlers.delete_snapshot
569+
operationId: simcore_service_webserver.version_control_handlers_snapshots.delete_project_snapshot_handler
570570
parameters:
571571
- required: true
572572
schema:
@@ -597,7 +597,7 @@ paths:
597597
- snapshot
598598
summary: Update Snapshot
599599
description: Updates label/name of a snapshot
600-
operationId: simcore_service_webserver.repos_snapshots_api_handlers.update_snapshot
600+
operationId: simcore_service_webserver.version_control_handlers_snapshots.patch_project_snapshot_handler
601601
parameters:
602602
- required: true
603603
schema:
@@ -694,8 +694,8 @@ components:
694694
description: Unique human readable display name
695695
description: Model to patch a snapshot resource
696696

697-
SnapshotResource:
698-
title: SnapshotResource
697+
SnapshotItem:
698+
title: SnapshotItem
699699
required:
700700
- parent_uuid
701701
- project_uuid

0 commit comments

Comments
 (0)