Skip to content
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

refactoring #56

Open
13 tasks
sfmig opened this issue Mar 15, 2023 · 4 comments
Open
13 tasks

refactoring #56

sfmig opened this issue Mar 15, 2023 · 4 comments
Assignees
Labels
enhancement Optional feature
Milestone

Comments

@sfmig
Copy link
Collaborator

sfmig commented Mar 15, 2023

Refactoring and harmonising a bit the style across tabs.

Some pending tasks/rough thoughts below, feel free to add more:

  • factor out the css style of the dash table
  • reduce the size / complexity of the callback functions:
    • define smaller functions,
    • move them to utils.py, layout.py or custom_components.py modules...
    • is there something we can do regarding the long parameter list?
      • maybe we can use temporary storages to save variables and split callbacks into smaller ones? (similar to ROI approach?). E.g. dashboard/modify_rows_selection would ideally only have the output("video-data-table", "selected_rows").
  • some agreements on nomenclature
    • e.g., ROI always capitalised, use ROI_tags rather than roi_names for coherence with event_tags...
    • rename 'input_config' to 'project_config'
    • rename 'pose_estimation_model_str' to 'model_str'
  • consider increasing line length? (see 79 → 88 #59)
  • move VIDEO_TYPES to project_config
  • ensure frame indexing is the same in ROI tab and in dataframe export
    • in dataframe export, frames are zero-indexed
    • in ROI when we save the frame in which an ROI was defined, or when we allow the user to select a frame: are these zero-indexed?
  • ensure metadata yaml files keep the original keys order when a value is appended
    • I think after adding ROIs, the keys are sorted alphabetically
  • use trigger name explicitly in callbacks?
    see here for example
@sfmig sfmig added the enhancement Optional feature label Mar 15, 2023
@sfmig sfmig added this to the Minimum Viable Product: v0 milestone Mar 15, 2023
@sfmig
Copy link
Collaborator Author

sfmig commented Mar 15, 2023

nice refactoring guidelines here, courtesy of @samcunliffe

@samcunliffe
Copy link
Member

🦝

@samcunliffe
Copy link
Member

Oh wait! V0!?

Refactoring should come after/during tests.

Dependencies

@sfmig
Copy link
Collaborator Author

sfmig commented Mar 15, 2023

right! 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Optional feature
Projects
None yet
Development

No branches or pull requests

3 participants