Skip to content

Conversation

@progval
Copy link
Member

@progval progval commented Jan 17, 2026

Should fix #103, but not tested.

@meldra could you check this works?

@progval progval changed the title Update properties_to_json.py Fix merging of properties type and description Jan 17, 2026
@meldra
Copy link
Contributor

meldra commented Jan 17, 2026

It does not seem to, and that's because the Makefile isn't fetching v3.1 at all...

It probably needs to be rewritten for going past v3 anyway in the forseeable future, but I'm inclined to hardcode in 3.1 just so the docs are correct for now.

@meldra
Copy link
Contributor

meldra commented Jan 20, 2026

This didn't address #103 at all because the property term in question is only in v3 (and the error was in v3.0 which is what the Makefile has hardcoded, not v3.1, so it wasn't a string replacement issue).

This does attempt to address the issue introduced in codemeta#342 where typos in types and descriptions were fixed are causing the script to parse duplicates. It doesn't work though, but should with this patch that I cannot push to this branch. Someone other than me should check the validity of the merge.

@meldra
Copy link
Contributor

meldra commented Jan 20, 2026

This didn't address #103 at all because the property term in question is only in v3 (and the error was in v3.0 which is what the Makefile has hardcoded, not v3.1, so it wasn't a string replacement issue).

This does attempt to address the issue introduced in codemeta#342 where typos in types and descriptions were fixed are causing the script to parse duplicates. It doesn't work though, but should with this patch that I cannot push to this branch. Someone other than me should check the validity of the merge.

Though it occurs to me now that the types should be displayed in a format like "URL (v2) URL or Text (V3)"

@progval
Copy link
Member Author

progval commented Jan 20, 2026

Though it occurs to me now that the types should be displayed in a format like "URL (v2) URL or Text (V3)"

it may be more readable to make them two separate rows when types differ

@progval
Copy link
Member Author

progval commented Jan 20, 2026

This does attempt to address the issue introduced in codemeta#342 where typos in types and descriptions were fixed are causing the script to parse duplicates. It doesn't work though, but should with this patch that I cannot push to this branch. Someone other than me should check the validity of the merge.

much better, thanks

@meldra
Copy link
Contributor

meldra commented Jan 20, 2026

Though it occurs to me now that the types should be displayed in a format like "URL (v2) URL or Text (V3)"

it may be more readable to make them two separate rows when types differ

I just had a look, and almost all of the types changes were removing double-spacing... this would be a little bit of a mess of logic.

@progval
Copy link
Member Author

progval commented Jan 20, 2026

we can normalize with re.sub("\W", "", s).lower() (which strips all non-letters) when comparing

@meldra
Copy link
Contributor

meldra commented Jan 21, 2026

Ok this was fun. New patch.

This puts differing types on separate lines for readability as discussed here yesterday. There were complications.

First, there are multiple Identifier properties. They are obviously not all equal yet they were being overwritten to be identical. This is now mitigated and they do not become clones anymore.

Second, when the property has a change to both type and description, it was resulting in a row with both versions and a row with the one of the version. I'm pretty sure these now work correctly. Changing the value of codeRepository's type will confirm this.

meldra and others added 4 commits January 21, 2026 08:14
- There are multiple Identifier properties with different parents. These are now
  addressed independently.
- A property with a change between versions for both type and description were not
  correctly limiting the versions. I believe this is correctly happening now.
@progval
Copy link
Member Author

progval commented Jan 21, 2026

First, there are multiple Identifier properties. They are obviously not all equal yet they were being overwritten to be identical.

Good catch!

This is now mitigated and they do not become clones anymore.

v2 did not appear in the list of versions for Thing's identifier. I fixed it.

@meldra
Copy link
Contributor

meldra commented Jan 21, 2026

If you're satisfied that this is good enough (you're quite sure there are no other missing versions, improperly overwritten types/descriptions, etc) then I can flip #105 to ready for review and these can both be merged in.

Given /terms has a lot of things pointing at it, is there anyone else who would want an opportunity to weigh in before we do that?

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.

[Bug]: reviewBody display incorrect due to Makefile issue

3 participants