Skip to content

Commit

Permalink
Merge pull request #155 from arc42/count-no-directly-related-requirem…
Browse files Browse the repository at this point in the history
…ents

Count no directly related requirements
  • Loading branch information
Per-Starke authored Jan 31, 2024
2 parents 1e5f9fb + 92e6865 commit 9166259
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
30 changes: 27 additions & 3 deletions _pages/80-about-this-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ permalink: /aboutthissite/
order: 80
---

<!-- Liquid to count number of qualities with no directly related requirements -->
{% assign qualities_with_no_directly_related_requirements = 0 %}
{% assign qualities_unsorted = site.posts | where: "categories", "qualities" %}
{% assign qualities = qualities_unsorted | sort %}
{% assign requirements_unsorted = site.posts | where: "categories", "requirements" %}
{% assign requirements = requirements_unsorted | sort %}
{% for quality in qualities %}
{% assign number = 0 %}
{% for requirement in requirements %}
{% assign check_title = quality.title | downcase %}
{% assign related = requirement.related | split: ", "%}
{% if related contains check_title %}
{% assign number = 1 %}
{% endif %}
{% endfor %}
{% if number == 0 %}
{% assign qualities_with_no_directly_related_requirements = qualities_with_no_directly_related_requirements | plus: 1 %}
{% endif %}
{% endfor %}




## Support

[INNOQ](https://innoq.com) <span class="innoq-text"><i class="fas fa-heart beat heart"></i></span> supports creation and maintenance of this site.
Expand Down Expand Up @@ -47,7 +70,7 @@ I'm:

* Thanx to Michael Mahlberg, Markus Meuten and Peter Hruschka for suggestions, bug fixes and moral support.
* Thanx to Steffen Späthe for his intense reviews and constructive comments concerning the content.
* Thanx to Per Starke for his awesome technical support in things around Liquid and Jekyll.
* Thanx to [Per Starke](https://perstarke-webdev.de/) for his awesome technical support in things around Liquid and Jekyll.
* Thanx to Remko Plantenga and Martin Weck for their contributions.

Find the current list of contributors [here](https://github.com/arc42/quality.arc42.org-site/graphs/contributors)
Expand All @@ -58,8 +81,9 @@ Find the current list of contributors [here](https://github.com/arc42/quality.ar
* The site was last built on {{ site.time | date: '%c' }}.
* It contains:
- {{ site.pages | size }} pages
- {{ site.posts | size }} posts (aka quality attributes and/or requirements)
- {{ site.articles | size }} articles
- {{ site.posts | size }} posts (aka quality attributes and/or requirements), of that {{ qualities_with_no_directly_related_requirements }} qualities with no directly related requirements
- {{ site.articles | size }} articles



<iframe plausible-embed src="https://plausible.io/share/quality.arc42.org?auth=cjoKlapPdw3czFugGy6jM&embed=true&theme=light" scrolling="no" frameborder="0" loading="lazy" style="width: 1px; min-width: 100%; height: 1600px;"></iframe>
Expand Down
35 changes: 35 additions & 0 deletions _pages/no-directly-related.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: page
title: Qualities with no directly related requirements
permalink: /no-directly-related/
hide: true
---

{% assign qualities_with_no_directly_related_requirements = 0 %}

{% assign qualities_unsorted = site.posts | where: "categories", "qualities" %}
{% assign qualities = qualities_unsorted | sort %}

{% assign requirements_unsorted = site.posts | where: "categories", "requirements" %}
{% assign requirements = requirements_unsorted | sort %}

{% for quality in qualities %}

<ul>
{% assign number = 0 %}
{% for requirement in requirements %}
{% assign check_title = quality.title | downcase %}
{% assign related = requirement.related | split: ", "%}
{% if related contains check_title %}
{% assign number = 1 %}
{% endif %}
{% endfor %}
{% if number == 0 %}
<li> {{quality.title}} </li>
{% assign qualities_with_no_directly_related_requirements = qualities_with_no_directly_related_requirements | plus: 1 %}
{% endif %}
</ul>

{% endfor %}

<h2> Number of qualities with no directly related requirements: {{qualities_with_no_directly_related_requirements}} </h2>

0 comments on commit 9166259

Please sign in to comment.