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

Pubid algebra: is new edition of #49

Closed
mico opened this issue Aug 20, 2024 · 10 comments · Fixed by #50
Closed

Pubid algebra: is new edition of #49

mico opened this issue Aug 20, 2024 · 10 comments · Fixed by #50
Assignees

Comments

@mico
Copy link
Contributor

mico commented Aug 20, 2024

related #47

is new edition of (newer edition year)

Identifier.parse("ISO 22610:2018").new_edition_of?("ISO 22610:2006") => true
@ronaldtse ronaldtse removed their assignment Aug 20, 2024
@ronaldtse
Copy link
Contributor

Agree with use case.

@mico
Copy link
Contributor Author

mico commented Aug 21, 2024

@ronaldtse for #new_edition_of? could be provided identifier that related to another document like

Identifier.parse("ISO 22610:2018").new_edition_of?("ISO/PRF 6709:2022")

But also can be provided even identifier from different provider:

Identifier.parse("ISO 22610:2018").new_edition_of?("BS 7121-3:2017")

What should we do in these cases? Returning false would be not completely correct, because it might mean that original identifier newer edition, which is not correct because documents are not related.
Raising an error, wouldn't it be too redundant?

@andrew2net any thoughts?

@ronaldtse
Copy link
Contributor

I think it's just false because we can't really raise an error...

@mico
Copy link
Contributor Author

mico commented Aug 21, 2024

@ronaldtse should we also compare supplements, drafts editions?
Like ISO/IEC/IEEE 8802-22.2:2015/Amd.2:2017, IEEE Draft Std PC57.21/D14, December 2007?

@ronaldtse
Copy link
Contributor

I think it's just false because we can't really raise an error...

Or maybe we throw an error that it cannot be compared?

  • different publishers can’t be compared?
  • amd and cor cannot be compared?

@mico
Copy link
Contributor Author

mico commented Aug 21, 2024

I think it's just false because we can't really raise an error...

Or maybe we throw an error that it cannot be compared?

  • different publishers can’t be compared?
  • amd and cor cannot be compared?

@ronaldtse I can just throw an error when identifiers doesn't match without edition

@andrew2net
Copy link

Or we can just return nil for not comparable IDs. So the caller method can decide what to do with it.

@mico
Copy link
Contributor Author

mico commented Aug 21, 2024

Or we can just return nil for not comparable IDs. So the caller method can decide what to do with it.

@andrew2net it's quite uncommon to return anything else except true or false for #? methods...

@mico
Copy link
Contributor Author

mico commented Sep 11, 2024

After talking with @andrew2net we decided not to compare identifiers without year or edition because it's not correct,
ISO 1 might represent latest edition but we don't know what is the latest year.
Also for comparison in relaton we don't need comparison for identifiers without year.
So I'll update code in pull request accordingly.

@andrew2net
Copy link

andrew2net commented Sep 12, 2024

Also for comparison in relaton we don't need comparison for identifiers without year.

@mico actually we do need comparison IDs without year in Relaton, but it's not like in this issue.

@mico mico closed this as completed in #50 Oct 29, 2024
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 a pull request may close this issue.

3 participants