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

Realign Safety decision points IEC 61508 #439

Merged
merged 9 commits into from
Feb 7, 2024

Conversation

ahouseholder
Copy link
Contributor

@ahouseholder ahouseholder commented Feb 6, 2024

This PR is a (mostly) code-only fix. It includes the following changes:

  1. Adds a new Safety Impact v2.0.0 that changes the value names to reflect the IEC 61508 categories (Catastrophic, Critical, Marginal, Negligible), and alters the Physical harm part of the description to reflect those categories.
  2. Adds a new Human Impact v2.0.1 that updates its value descriptions to reflect the terminology change in Safety Impact
  3. Adds a new Public Safety Impact v2.0.1 that updates its value descriptions to reflect the terminology change in Safety Impact
  4. Unrelated to the above, but noticed when I ran doctools.py to generate the new examples, an update to the Mission and Well Being Impact examples is included. (This is a carry over that was missed in Revise compound decision points documentation #428)

Documentation changes are limited to adding previous versions of the affected decision points to their corresponding reference pages.

I am deliberately treating this PR to address #311 as distinct from the formatting concern about safety impact as it appears in #380. Fixing both at the same time could make it harder to tell what changed.

Also, I am avoiding updating any additional documentation, including CSV files and trees. Decision models that include any of the safety decision points should be updated eventually, but again that seems like it could make this PR too big if we tried to tackle it all at once. My suggestion is that we leave a separate issue behind to update the safety-dependent decision models to reflect the new versions.

@ahouseholder ahouseholder self-assigned this Feb 6, 2024
@ahouseholder ahouseholder added enhancement New feature or request python Pull requests that update Python code labels Feb 6, 2024
@ahouseholder ahouseholder added this to the SSVC 202403 milestone Feb 6, 2024
HIGH_1 = SsvcDecisionPointValue(
name="High",
key="H",
description="Mission Prevalence:Essential OR Public Well-Being Impact:(Irreversible)",
)

VERY_HIGH_1 = SsvcDecisionPointValue(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was just reorganizing the file to group LOWs with LOWs, HIGHs with HIGHs, etc.

*Psychological*: Widespread emotional or psychological harm, sufficient to necessitate
counseling or therapy, impact populations of people.
""",
description="Any one or more of these conditions hold. "
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed formatting enough to make it look ok in markdown. Might still need attention in #380


*Psychological*: N/A
""",
description="Any one or more of these conditions hold. "
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed formatting enough to make it look ok in markdown. Might still need attention in #380

print(SAFETY_IMPACT_1.to_json(indent=2))
versions = (SAFETY_IMPACT_1, SAFETY_IMPACT_2)

print_versions_and_diffs(versions)
Copy link
Contributor Author

@ahouseholder ahouseholder Feb 6, 2024

Choose a reason for hiding this comment

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

Running this through print_versions_and_diffs confirmed it deserved a new major version

(patch) Safety Impact v2.0.0 description changed
Safety Impact v2.0.0 key did not change
Safety Impact v2.0.0 version changed from 1.0.0
(major) Safety Impact v2.0.0 removes value None
(major) Safety Impact v2.0.0 removes value Hazardous
(major) Safety Impact v2.0.0 removes value Major
(major) Safety Impact v2.0.0 removes value Minor
(major or minor) Safety Impact v2.0.0 adds value Critical
(major or minor) Safety Impact v2.0.0 adds value Negligible
(major or minor) Safety Impact v2.0.0 adds value Marginal
Safety Impact v2.0.0 value Catastrophic key did not change
(patch) Safety Impact v2.0.0 value Catastrophic description changed
Safety Impact v2.0.0 appears to be a major change

)
print_versions_and_diffs(versions)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running this through print_versions_and_diffs confirmed it deserved a new patch version

Public Safety Impact v2.0.1 description did not change
Public Safety Impact v2.0.1 key did not change
Public Safety Impact v2.0.1 version changed from 2.0.0
Public Safety Impact v2.0.1 value names did not change
Public Safety Impact v2.0.1 value Minimal key did not change
Public Safety Impact v2.0.1 value Significant key did not change
(patch) Public Safety Impact v2.0.1 value Minimal description changed
(patch) Public Safety Impact v2.0.1 value Significant description changed
Public Safety Impact v2.0.1 appears to be a patch change


def main():
versions = (MISSION_AND_WELL_BEING_IMPACT_1, HUMAN_IMPACT_2)
versions = (MISSION_AND_WELL_BEING_IMPACT_1, HUMAN_IMPACT_2, HUMAN_IMPACT_2_0_1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rationale for patch version increment:

Human Impact v2.0.1 description did not change
Human Impact v2.0.1 key did not change
Human Impact v2.0.1 version changed from 2.0.0
Human Impact v2.0.1 value names did not change
Human Impact v2.0.1 value Medium key did not change
Human Impact v2.0.1 value Very High key did not change
Human Impact v2.0.1 value High key did not change
Human Impact v2.0.1 value Low key did not change
(patch) Human Impact v2.0.1 value Medium description changed
Human Impact v2.0.1 value Very High description did not change
(patch) Human Impact v2.0.1 value High description changed
(patch) Human Impact v2.0.1 value Low description changed
Human Impact v2.0.1 appears to be a patch change

Copy link
Collaborator

@j--- j--- left a comment

Choose a reason for hiding this comment

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

Looks good. I'll make a new issue for the documentation changes to follow on.

@ahouseholder ahouseholder merged commit 524ad63 into main Feb 7, 2024
3 checks passed
@ahouseholder ahouseholder deleted the 311-realign-safety-dps-with-iec-61508 branch February 7, 2024 21:17
@ahouseholder ahouseholder modified the milestones: 2024.3, 1Q24 Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Realign Safety DPs with IEC 61508?
2 participants