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

raise error on subclass check #340

Merged
merged 8 commits into from
Sep 4, 2024
Merged

Conversation

cymed
Copy link
Contributor

@cymed cymed commented Jul 26, 2024

Solves #337
Not tested yet - thus draft PR

@cymed cymed marked this pull request as draft July 26, 2024 09:36
@sjib
Copy link
Contributor

sjib commented Jul 26, 2024

@cymed Fix seems to work - only error message is wrong (change too many / too few). I have added one additional structure_part entry in my data. So I am missing a corresponding subclass entry.

20240726_subclass_check_missing_structure_part_test_fix

@sjib sjib added the fix Fixing something not working label Jul 26, 2024
@sjib sjib added this to the TEKSI Wastewater 2024.0 milestone Jul 26, 2024
@sjib sjib added the INTERLIS About INTERLIS exchange format (import / export) label Jul 26, 2024
@sjib sjib marked this pull request as ready for review July 26, 2024 16:10
@sjib sjib requested a review from domi4484 July 26, 2024 16:10
@sjib
Copy link
Contributor

sjib commented Jul 30, 2024

@cymed
If I have one entry too much in the superclass (structure_part) I get this message:
2024-07-30T15:42:02 teksi_wastewater.utils:Subclass Count error: Too many subclass entries for tww_od.structure_part

Should be adapted to
2024-07-30T15:42:02 teksi_wastewater.utils:Subclass Count error: Too many superclass entries for tww_od.structure_part

And the other case: Too few subclass entries for {schema_name}.{parent_name}

Is that clearer?

@cymed
Copy link
Contributor Author

cymed commented Jul 30, 2024

Wouldn't it be too many subclass entries in Case 2?

@sjib
Copy link
Contributor

sjib commented Jul 30, 2024

Yes, I think then it is right - either we have too many superclass entries or we have too many subclass entries.

@sjib
Copy link
Contributor

sjib commented Jul 30, 2024

And in using superclass and subclass we indicate where to check

@sjib
Copy link
Contributor

sjib commented Jul 31, 2024

I found out, that we also do the subclass check when we make a selection.

20240730_export_selection_subclass_check_error_sinnvoll

For the user it is a little bit confusing to get the subclass check error also then even if the selected objects are correct.

  • do we want to keep the subclass check also there to enforce data integrity or
  • take it out then (and then might have strange errors)?

I would stay with the existing behaviour an may be adjust the error message to not confuse the users.

Any comments on that?

@ponceta ponceta closed this Aug 7, 2024
@ponceta ponceta reopened this Aug 7, 2024
@cymed cymed requested a review from domi4484 September 3, 2024 12:28
@cymed cymed merged commit 5fbb68a into teksi:main Sep 4, 2024
4 checks passed
@cymed cymed deleted the stop-export-on-subclass-check branch September 4, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixing something not working INTERLIS About INTERLIS exchange format (import / export)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants