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

Keeping QgsTask classes in one file consistently #280

Open
Gpetrak opened this issue Nov 1, 2024 · 1 comment
Open

Keeping QgsTask classes in one file consistently #280

Gpetrak opened this issue Nov 1, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Gpetrak
Copy link
Contributor

Gpetrak commented Nov 1, 2024

Currently the QgsTask classes (e.g LayerLoaderTask, ThumbnailLoaderTask or NetworkRequestTask) are included in different files (e.g network.py, search_result_widget.py). However, for consistency reasons, we could keep all the QgsTask classes in one file e.g tasks.py.

Also the LayerUploaderTask task could be refactored in order to not include repetitive code which comes from its base class: NetworkRequestTask.

@Gpetrak Gpetrak self-assigned this Nov 1, 2024
@Gpetrak Gpetrak added the enhancement New feature or request label Nov 1, 2024
@Gpetrak Gpetrak changed the title Keeping QgsTask classes in one file Keeping QgsTask classes in one file consistently Nov 1, 2024
@giohappy giohappy added this to the 2.0.0 milestone Nov 7, 2024
@Gpetrak
Copy link
Contributor Author

Gpetrak commented Nov 29, 2024

@giohappy the issue is completed and you can find the current PR here: #304
The changes that are included are the following:

  • I kept all the tasks in a new folder, called: tasks
  • In this folder I kept the main task (network_task) in a separate file
  • I included all the other tasks in the tasks/tasks.py
  • I kept / moved all the functions related with the network in the network.py
  • All the functions related with the style are in the styles.py
  • I moved all the other functions in the utils.py

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

No branches or pull requests

2 participants