Skip to content

Commit adb05e1

Browse files
committed
Removed depreciated request calls
1 parent bebc3f0 commit adb05e1

File tree

5 files changed

+2
-73
lines changed

5 files changed

+2
-73
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ venv/
66
dist/
77
build/
88
debiai_data/
9+
debiai_data_test/
910
*.egg-info/
1011

1112
# Dependency directories

Diff for: debiaiServer/controller/selection.py

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def post_selection(dataProviderId, projectId, data):
3535
projectId,
3636
data["selectionName"],
3737
data["sampleHashList"],
38-
data["requestId"] if "requestId" in data else None,
3938
)
4039
return "Selection added", 200
4140
except DataProviderException as e:

Diff for: debiaiServer/modules/dataProviders/pythonDataProvider/dataUtils/samples.py

-33
Original file line numberDiff line numberDiff line change
@@ -94,36 +94,3 @@ def _block_to_array_recur(block):
9494
ret[i] = values + child_values[i]
9595

9696
return ret
97-
98-
99-
# def projectSamplesGenerator(projectId):
100-
# """
101-
# Generator used to iterate over all samples in a project.
102-
# Used by the 'createSelectionFromRequest' method
103-
# """
104-
105-
# # Get the project block structure
106-
# projectBlockStructure = projects.get_project_block_level_info(projectId)
107-
# sampleLevel = len(projectBlockStructure) - 1
108-
109-
# rootBlocks = utils.listDir(DATA_PATH + projectId + "/blocks/")
110-
# for rootBlock in rootBlocks:
111-
# path = DATA_PATH + projectId + "/blocks/" + rootBlock + "/"
112-
# yield from yieldSample(path, 0, [], sampleLevel, projectBlockStructure)
113-
# print("end")
114-
115-
116-
# def yieldSample(path, level, sampleInfo, sampleLevel, blockLevelInfo):
117-
# # TODO : optimizations : add in parameters the block that we need to open
118-
# blockInfo = utils.readJsonFile(path + "info.json")
119-
# sampleInfo.append(getBlockInfo(blockLevelInfo[level], blockInfo))
120-
121-
# if level == sampleLevel:
122-
# # merge the dict into one
123-
# yield {k: v for x in sampleInfo for k, v in x.items()}, blockInfo["id"]
124-
# else:
125-
# childrenBlockNames = utils.listDir(path)
126-
# for name in childrenBlockNames:
127-
# yield from yieldSample(path + name + "/",
128-
# level + 1, sampleInfo, sampleLevel, blockLevelInfo)
129-
# del sampleInfo[-1]

Diff for: debiaiServer/modules/dataProviders/pythonDataProvider/dataUtils/selections.py

-7
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ def create_selection(project_id, selection_name, sample_ids, request_id=None):
3535
"samples": sample_ids,
3636
}
3737

38-
if request_id is not None:
39-
selectionInfo["requestId"] = request_id
40-
4138
os.mkdir(DATA_PATH + project_id + "/selections/" + selection_id)
4239
pythonModuleUtils.writeJsonFile(selectionInfoFilePath, selectionInfo)
4340
projects.update_project(project_id)
@@ -74,10 +71,6 @@ def get_selection(project_id, selectionId):
7471
"nbSamples": len(data["samples"]),
7572
}
7673

77-
# Add the request Id if it exist
78-
if "requestId" in data:
79-
ret["requestId"] = data["requestId"]
80-
8174
return ret
8275

8376

Diff for: debiaiServer/swagger.yaml

+1-32
Original file line numberDiff line numberDiff line change
@@ -693,13 +693,6 @@ paths:
693693
description: List of the selection sample id (hash)
694694
selectionName:
695695
type: string
696-
requestDescription:
697-
type: string
698-
x-nullable: true
699-
requestId:
700-
type: string
701-
description: Id of the request that has created the selection.
702-
x-nullable: true
703696
responses:
704697
200:
705698
description: selection added
@@ -1586,7 +1579,7 @@ definitions:
15861579
items:
15871580
type: string
15881581

1589-
# Selections and requests
1582+
# Selections
15901583
selection:
15911584
allOf:
15921585
- $ref: "#/definitions/artefact"
@@ -1597,30 +1590,6 @@ definitions:
15971590
metadata:
15981591
type: object
15991592

1600-
request:
1601-
allOf:
1602-
- $ref: "#/definitions/artefact"
1603-
- type: object
1604-
required:
1605-
- filters
1606-
properties:
1607-
filters:
1608-
type: array
1609-
items:
1610-
type: object
1611-
required:
1612-
- type
1613-
- columnLabel
1614-
properties:
1615-
type:
1616-
type: string
1617-
columnLabel:
1618-
type: string
1619-
description: Can be of type 'values' of 'intervals', 'values'
1620-
filters have a 'values' key that is a list of text or numbers
1621-
, 'intervals' filters have an 'interval' key that is a list of
1622-
{min, max} intervals
1623-
16241593
# DataTypes
16251594
dataType:
16261595
type: object

0 commit comments

Comments
 (0)