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

Add import of tags, radius and links to CSV importer #16

Merged
merged 12 commits into from
Sep 23, 2024

Conversation

stefanhahmann
Copy link
Collaborator

@stefanhahmann stefanhahmann commented Aug 26, 2024

This Pull request adds some extensions to the current CSV importer.

It adds 3 additional features that can be imported using it

  • A tagset and taggings belonging to it
  • A "parent_id" so that Links between spots can be imported
  • A radius so that a radius column could be used which would be preferred over the fixed radius that can be specified for all spots

In order to maintain usability, while the dialog is growing two new sections are introduced:

  • Mandatory
  • Optional

The PR also contains some technical (hopefully) improvements:

  • Open CSVReader in try-with-statement to make use of the AutoCloseable
  • Let CSVImporter extend ModelImporter so that listeners are paused during import
  • Add .trim() to remove leading and trailing whitespace before number parsing. Without this I encountered some problems in a test dataset
  • Add class to StartImageJ with Mastodon Pasteur Plugins included (for development process only)

The dialog would look like this if this PR is accepted:

grafik

Unit tests:

  • The PR contains a unit test for the newly added features

…arsing

* In some datasets, number format exceptions may occur if leading trailing whitespaces are not trimmed before parsing the number value
* By doing so startImport() can be called before the import of potentially huge amount of spots starts
* startImport() pauses some listeners so that undo/redo functionality does not cause problems during mass import
* finishImport resumes these listeners
* A column mother id would allow to import links between subsequent spots during the CSV import
* By this the Autocloseable feature of the CSVReader is used
* If a radius column is specified the default radius would be overwritten with a radius found in this column
* e.g. in the table the name of a spot is called "label"
@stefanhahmann stefanhahmann self-assigned this Aug 26, 2024
@stefanhahmann stefanhahmann requested a review from tinevez August 26, 2024 14:53
* The reason for this change is that the initial assumption that spots would be sorted by the time frame did not hold true for some test data sets
* In a test data set, it happened that the child spot was in the file before the parent spot so that the parent spot could not be found
@stefanhahmann stefanhahmann marked this pull request as ready for review August 30, 2024 09:29
@stefanhahmann
Copy link
Collaborator Author

Resolves #15

@tinevez tinevez merged commit 064ab80 into master Sep 23, 2024
1 check passed
@tinevez tinevez deleted the add-mother-id-column branch September 23, 2024 15:45
@stefanhahmann stefanhahmann mentioned this pull request Oct 11, 2024
5 tasks
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.

2 participants