Skip to content

Move RelationshipType naming convention to Markdown guide instead#1135

Open
bact wants to merge 3 commits intospdx:developfrom
bact:relationshiptype-naming
Open

Move RelationshipType naming convention to Markdown guide instead#1135
bact wants to merge 3 commits intospdx:developfrom
bact:relationshiptype-naming

Conversation

@bact
Copy link
Collaborator

@bact bact commented Oct 23, 2025

  • Put info about directionality and temporality to Relationship description.
  • Move the sentences: "Relationship names should be descriptive enough to easily deduce the correct direction from their name. The best way to do this is to make sure that the relationship name completes the sentence.." out of the RelationshipType description and put them to the "Naming convention" section in the Markdown guide (docs/format.md) instead.
    • They are not meant for the users of the spec but for the authors of the spec.
    • As the RELATIONSHIP is in capital letters, looks like it is from SPDX 2 - should remove it.
  • Update an example for property naming convention
    • Replace "import" (singular noun) / "imports" (singular verb) example with less ambiguous "element"/"elements"
    • As "import" / "imports" can be plural verb and plural noun as well, and that can be confusing with the relationship type naming convention.

bact added 2 commits October 23, 2025 09:09
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added documentation Improvements or additions to documentation relationship Relationship and related matters labels Oct 23, 2025
@goneall goneall requested review from kestewart and zvr November 11, 2025 17:52
@bact bact added this to the 3.1 milestone Nov 13, 2025
A relationship can be either directional or non-directional (directionless).
For a directional relationship,
the direction of a relationship is always from the `from` Element to the
`to` Element, as defined by the `relationshipType` property.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I do no understand this.

What are these two types of relationships (directional and directionless)?

And what does it mean that the relationshipType property "defines" from and to?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these two types of relationships (directional and directionless)?

This is a directional relationship.

  graph LR;
    A[from] -->|directional relationship| B[to]
Loading

This is a directionless relationship.

  graph LR;
    A[from] ---|non-directional relationship| B[to]
Loading

Since v3.0.1 https://spdx.github.io/spdx-spec/v3.0.1/model/Core/Vocabularies/RelationshipType/, we have one directionless relationship type, which is "other":

other: Every to Element is related to the from Element where the relationship type is not described by any of the SPDX relationship types (this relationship is directionless).

The rest are directional.

--

And what does it mean that the relationshipType property "defines" from and to?

The text didn't say that.
It said the relationshipType defines the direction of a relationship.
This aligns with the last paragraph of RelationshipType description:

Relationship names should be descriptive enough to easily deduce the correct direction from their name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation relationship Relationship and related matters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants