Skip to content

WIP: refactor(project-types)!: introduce base class and make groups and lists attribute of project type classes #920

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

Merged
merged 170 commits into from
Jan 17, 2024

Conversation

matthiasschaub
Copy link
Collaborator

@matthiasschaub matthiasschaub commented Jan 10, 2024

This PR introduces a new structure for project type classes:

  • All project type classes inherit from BaseProject
  • Classification, Completeness and Change Detection project types inherit from TileMapServiceBaseProject
    • From those, only Classification class is fully refactored.
  • Task and group classes are reduced to dataclasses and are attributes of project type classes. Logic for creating those are defined as functions in project type classes.

TODOs:

  • need current tutorial draft containing "tutorialTasks" key
  • Implement new inheritance and composition structure for all project types (project.py) Split project types into their own classes #787
    • Factor out groups.py and tasks.py into project.py. Attributes of those modules should go int dataclasses Task & Group and logic into functions create_tasks and create_groups`.
    • Make all project type classes available in project_types.__init__.py and import them in definition.py
    • Add all project type classes to ProjectType Enum in definition.py:
  • Implement new inheritance and composition structure for all tutorials (tutorials.py)
    • Add all tutorial classes to ProjectType Enum in definition.py:

Testing:

Project Creation

-> Creating in Manager Dashboard - Appears in Mapswipe App

  • Classification
  • Completness
  • Change Detection
  • Footprint

Tutorial Creation

-> Creating in Manager Dashboard - Appears in Mapswipe App

  • Classification
  • Completness
  • Change Detection
  • Footprint

Generating Results

-> Mapping in App, firebase to postgres working

  • Classification
  • Completness
  • Change Detection
  • Footprint

Stats Generation

-> mapping in App, stats get generated in a validatable form (e.g. 3 times 1, 2 times 2, 1 time 3)

  • Classification
  • Completness
  • Change Detection
  • Footprint

maze2point0 and others added 30 commits May 15, 2023 15:57
…mapswipe-workers into refactor-python-workers
started splitting into sub project types
add test for group and task creation for tile classification project …
…python-workers

Revert "Revert "Refactor python workers""
@matthiasschaub matthiasschaub changed the base branch from master to dev January 10, 2024 11:25
@ElJocho ElJocho marked this pull request as ready for review January 17, 2024 12:09
@ElJocho ElJocho merged commit ab8942b into dev Jan 17, 2024
@ofr1tz ofr1tz deleted the project_type_refactoring_2 branch February 5, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants