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

filter out replaced models #953

Open
romanmeyerblch opened this issue Aug 15, 2024 · 6 comments
Open

filter out replaced models #953

romanmeyerblch opened this issue Aug 15, 2024 · 6 comments

Comments

@romanmeyerblch
Copy link

I really like to import models using the search bar. However, 99.9% of the time, I need the current version of the model. Please consider adding a checkbox 'current versions only' that is checked by default. Basically, it should hide any model that is in a 'replaced' folder. This is certainly not a major issue for now, but will become more important as versions keep piling up.

I'm adding a screenshot of 'Rodungen', which is very simple, but it gets more confusing if you look at i.e. AV instead... Thanks!

image

@signedav
Copy link
Member

I like this idea. It won't be that hard to filter as soon as we know on what we need to filter. Just having the highest version number according to the name is one thing - others have dates as suffix. Others are the date in the models version, this is more resource consuming, because we need to parse every model (not sure if this is appropriate) and what is when the naming convention is not considered (like the mentioned AV)? Another thing is that deprecated models are sometimes in dedicated folders and sometimes not...

@sjib
Copy link

sjib commented Aug 15, 2024

Usually there is a replaced or Precursor Subfolder in the repos that could help as one criteria for filtering as @romanmeyerblch mentioned:

e.g.
https://www.vsa.ch/models/2015/precursorVersion
https://405.sia.ch/models/2015/precursor/

Maybe we could find some good practise documented also here: https://interlis.discourse.group/c/repositories/8

@signedav
Copy link
Member

Ah yes @romanmeyerblch mentioned it already. Exactly, there it would be good to know what the best practice is. If you find this info, this would be great. I remember an INTERLIS Userday where we talked about this (I think you where even sitting next to me @sjib ) but I don't know the current status.

If no best practice exists, then we might still find out what is currently used and define it here (shouldn't be that hard to find it out).

@sjib
Copy link

sjib commented Aug 15, 2024

@signedav Du hast ja eigentlich schon die Informationen im ilimodels.xml welches dir sagt, welches das aktuellste Modell ist und welches die Precursor Modelle sind

https://405.sia.ch/models/ilimodels.xml

            <IliRepository20.RepositoryIndex.ModelMetadata TID="78" >
                <Name>SIA405_ABWASSER_3D_2015_LV95</Name>
                <SchemaLanguage>ili2_3</SchemaLanguage>
                <File>2015/SIA405_Abwasser_3D_2015_2_d-20211020.ili</File>
                <Version>20.10.2021</Version>
                <NameLanguage>de</NameLanguage>
                <dependsOnModel>
                    <IliRepository20.ModelName_>
                        <value>Units</value>
                    </IliRepository20.ModelName_>
                    <IliRepository20.ModelName_>
                        <value>Base_LV95</value>
                    </IliRepository20.ModelName_>
                    <IliRepository20.ModelName_>
                        <value>SIA405_Base_LV95</value>
                    </IliRepository20.ModelName_>
                    <IliRepository20.ModelName_>
                        <value>SIA405_ABWASSER_2015_LV95</value>
                    </IliRepository20.ModelName_>
                </dependsOnModel>
                <precursorVersion>17.04.2018</precursorVersion>
                <Issuer>http://www.sia.ch/405</Issuer>
                <technicalContact>mailto:[email protected]</technicalContact>
                <md5>56e37a42ac5eea33b3ccab61e2e683db</md5>
            </IliRepository20.RepositoryIndex.ModelMetadata>

Man müsste das jetzt quasi rückwärts durchsuchen und nur jeweils das neueste Modell nehmen.
Ich sehe zwei Fälle, wo es der Tag precursorVersion nicht abgefüllt ist:
Bei der ältesten Version und bei einer ganz neuen Version, wo es noch keine Vorgänger gibt.

Beim Beispiel VSA-DSS fände ich aber, dass man sowohl die neueste Version von Release 2020_1, 2020 als auch von Release 2015 zeigen sollte - beim VSA und sia sind die jeweils in einem eigenen Subordner.

Beim Bund und den Kantonen ist das vielleicht etwas anders strukturiert - Feedbacks erwünscht (und könnte man vielleicht auch via interlis.discours abholen)

Aufbau Repositories siehe schöne Dokumentation von @beistehen - u.a. Bedeutung der einzelnen Tags in ilimodels.xml:
https://geostandards-ch.github.io/doc_ilirepo/#_bedeutung_3

@romanmeyerblch
Copy link
Author

great to see the enthusiastic discussion here! :-) just one change to my initial post: it would probably make sense to make this a setting in the model baker settings instead of another (confusing) checkbox in the GUI. But that's ultimately up to @signedav

@beistehen
Copy link
Contributor

@signedav
We (GeoStandards.ch) are just about to launch a "Housekeeping" project where proper handling of metadata in ilimodels.xml will be addressed. This is also important for other tools like INTERLIS Model Browser (https://ilimodels.ch) which are dependent on metadata quality. As there are no rules how to name a model, I suggest to use ilimodels.xml as the source of all queries, in particular the version history of a model.

cc @olivergrimm

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

No branches or pull requests

4 participants