Skip to content

Commit

Permalink
refactor main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
luiztauffer committed Oct 13, 2023
1 parent 177dd43 commit 38be68b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
45 changes: 23 additions & 22 deletions containers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,28 +622,7 @@ def main(
output_destination = validate_not_none(output_kwargs, "output_destination")
output_path = validate_not_none(output_kwargs, "output_path")

# # Run main function
# main(
# run_at=run_at,
# run_identifier=run_identifier,
# run_description=run_description,
# test_with_toy_recording=test_with_toy_recording,
# test_with_subrecording=test_with_subrecording,
# test_subrecording_n_frames=test_subrecording_n_frames,
# log_to_file=log_to_file,
# source_name=source_name,
# source_data_type=source_data_type,
# source_data_paths=source_data_paths,
# recording_kwargs=recording_kwargs,
# preprocessing_kwargs=preprocessing_kwargs,
# sorter_kwargs=sorter_kwargs,
# postprocessing_kwargs=postprocessing_kwargs,
# curation_kwargs=curation_kwargs,
# visualization_kwargs=visualization_kwargs,
# output_destination=output_destination,
# output_path=output_path,
# )

# Just for checking for now - REMOVE LATER
print("\nRun at: ", run_at)
print("\nRun identifier: ", run_identifier)
print("\nRun description: ", run_description)
Expand All @@ -663,6 +642,28 @@ def main(
print("\nOutput destination: ", output_destination)
print("\nOutput path: ", output_path)

# Run main function
main(
run_at=run_at,
run_identifier=run_identifier,
run_description=run_description,
test_with_toy_recording=test_with_toy_recording,
test_with_subrecording=test_with_subrecording,
test_subrecording_n_frames=test_subrecording_n_frames,
log_to_file=log_to_file,
source_name=source_name,
source_data_type=source_data_type,
source_data_paths=source_data_paths,
recording_kwargs=recording_kwargs,
preprocessing_kwargs=preprocessing_kwargs,
sorter_kwargs=sorter_kwargs,
postprocessing_kwargs=postprocessing_kwargs,
curation_kwargs=curation_kwargs,
visualization_kwargs=visualization_kwargs,
output_destination=output_destination,
output_path=output_path,
)



# Known issues:
Expand Down
4 changes: 2 additions & 2 deletions rest/models/sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class RunKwargs(BaseModel):
# Source Data Models
# ------------------------------
class SourceName(str, Enum):
local = "local"
s3 = "s3"
dandi = "dandi"
local = "local"

class SourceDataType(str, Enum):
nwb = "nwb"
Expand All @@ -46,9 +46,9 @@ class SourceDataKwargs(BaseModel):
# Output Data Models
# ------------------------------
class OutputDestination(str, Enum):
local = "local"
s3 = "s3"
dandi = "dandi"
local = "local"

class OutputDataKwargs(BaseModel):
output_destination: OutputDestination = Field(..., description="Destination of output data. Choose from: s3, dandi, local.")
Expand Down

0 comments on commit 38be68b

Please sign in to comment.