From 2eebe8485100193f08810b1ab6c679bf0302148a Mon Sep 17 00:00:00 2001 From: Zach Lasiuk Date: Tue, 20 Feb 2024 17:22:20 -0600 Subject: [PATCH] working on package display --- build_steps/update_recently_added_json.py | 6 +- data/recently_added_packages.yaml | 246 +++++++++--------- .../layouts/index.html | 22 +- .../package-display/_date-formating.html | 32 +++ .../partials/package-display/row-main.html | 46 ++++ .../partials/package-display/row-sub.html | 0 .../partials/package-display/table.html | 26 ++ 7 files changed, 240 insertions(+), 138 deletions(-) create mode 100644 themes/arm-design-system-hugo-theme/layouts/partials/package-display/_date-formating.html create mode 100644 themes/arm-design-system-hugo-theme/layouts/partials/package-display/row-main.html create mode 100644 themes/arm-design-system-hugo-theme/layouts/partials/package-display/row-sub.html create mode 100644 themes/arm-design-system-hugo-theme/layouts/partials/package-display/table.html diff --git a/build_steps/update_recently_added_json.py b/build_steps/update_recently_added_json.py index 1d1de621..dd0c5493 100644 --- a/build_steps/update_recently_added_json.py +++ b/build_steps/update_recently_added_json.py @@ -26,7 +26,9 @@ def get_all_package_metadata(package_path): content = f.read() # Get the metadata between '---' by splitting the content by '---' and grabbing the middle part metadata = content.split('---')[1] - return yaml.safe_load(metadata) + metadata_dic = yaml.safe_load(metadata) + metadata_mirror_hugo_page = {"Params": metadata_dic} + return metadata_mirror_hugo_page @@ -78,7 +80,7 @@ def get_all_package_metadata(package_path): print() print('Adding these packages in order to data/recently_added_packages.yaml:') for c in recent_content_with_all_metadata: - print(' '+c['name']) + print(c) print() # Write to YAML diff --git a/data/recently_added_packages.yaml b/data/recently_added_packages.yaml index 922ac09f..71470a9a 100644 --- a/data/recently_added_packages.yaml +++ b/data/recently_added_packages.yaml @@ -1,119 +1,127 @@ -- category: Storage - description: The Storage Performance Development Kit (SPDK) provides a set of tools - and libraries for writing high performance, scalable, user-mode storage applications. - download_url: https://github.com/spdk/spdk/releases - name: SPDK - optional_hidden_info: - other_info: No ARM64 specific release notes and binaries are available. Need to - build and install it from source from git repository. - release_notes__recommended_minimum: null - release_notes__supported_minimum: null - optional_info: - alternative_options: null - arm_recommended_minimum_version: - release_date: null - version_number: null - getting_started_resources: - arm_content: null - official_docs: https://spdk.io/doc/getting_started.html - partner_content: null - homepage_url: https://spdk.io/ - support_caveats: null - supported_minimum_version: - release_date: 30/12/2022 - version_number: 22.09 - works_on_arm: true -- category: AI/ML - description: TensorFlow is an end-to-end open-source platform for machine learning. - download_url: https://pypi.org/project/tensorflow/2.15.0/#files - name: Tensorflow - optional_hidden_info: - other_info: From TensorFlow 2.10 onwards, Linux CPU-builds for Aarch64/ARM64 processors - are built, maintained, tested and released by a third party "AWS". Installing - the tensorflow package on an ARM machine installs AWS's tensorflow-cpu-aws package. - release_notes__recommended_minimum: null - release_notes__supported_minimum: https://www.tensorflow.org/install/pip#linux - optional_info: - alternative_options: null - arm_recommended_minimum_version: - release_date: null - version_number: null - getting_started_resources: - arm_content: https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/aarch64-docker-images-for-tensorflow-and-pytorch - official_docs: https://www.tensorflow.org/lite/guide/build_arm - partner_content: https://docs.aws.amazon.com/dlami/latest/devguide/tutorial-graviton-tensorflow.html - homepage_url: https://www.tensorflow.org/ - support_caveats: null - supported_minimum_version: - release_date: 7/9/2022 - version_number: 2.10.0 - works_on_arm: true -- category: Databases - description: Data lakehouse is a new, open data management architecture that combines - the flexibility, cost-efficiency, and scale of data lakes with the data management - and ACID transactions of data warehouses, enabling business intelligence (BI) - and machine learning (ML) on all data. - name: Data-Lakehouse - optional_hidden_info: - other_info: null - release_notes__arm_supported: https://www.databricks.com/blog/2022/04/18/announcing-databricks-support-for-aws-graviton2-with-up-to-3x-better-price-performance.html - optional_info: - alternative_options: null - getting_started_resources: - arm_content: null - official_docs: https://docs.databricks.com/en/compute/graviton.html - partner_content: https://www.databricks.com/blog/2022/04/18/announcing-databricks-support-for-aws-graviton2-with-up-to-3x-better-price-performance.html - homepage_url: https://www.databricks.com/product/data-lakehouse - support_caveats: null - product_url: https://www.databricks.com/product/data-lakehouse - release_date_on_arm: 01/09/2022 - vendor: Databricks - works_on_arm: true -- category: Container Registry - description: Dragonfly is an open source P2P-based file distribution and image acceleration - system. - download_url: https://github.com/dragonflyoss/Dragonfly2/releases - name: Dragonfly - optional_hidden_info: - other_info: No ARM64 specific release notes are available. The first binary for - ARM64 was released from v2.0.5 version. - release_notes__recommended_minimum: null - release_notes__supported_minimum: https://github.com/dragonflyoss/Dragonfly2/releases/tag/v2.0.5 - optional_info: - alternative_options: null - arm_recommended_minimum_version: - release_date: null - version_number: null - getting_started_resources: - arm_content: null - official_docs: https://d7y.io/docs/next/getting-started/quick-start/ - partner_content: null - homepage_url: https://d7y.io/ - support_caveats: null - supported_minimum_version: - release_date: 4/8/2022 - version_number: 2.0.5 - works_on_arm: true -- category: Security & Compliance - description: Falco is a cloud native runtime security tool for Linux operating systems. - download_url: https://falco.org/docs/install-operate/download/ - name: Falco - optional_hidden_info: - other_info: null - release_notes__recommended_minimum: null - release_notes__supported_minimum: https://falco.org/blog/falco-0-32-1/ - optional_info: - alternative_options: null - arm_recommended_minimum_version: - release_date: null - version_number: null - getting_started_resources: - arm_content: null - official_docs: https://falco.org/docs/install-operate/installation/ - partner_content: https://aws.amazon.com/blogs/containers/implementing-runtime-security-in-amazon-eks-using-cncf-falco/ - homepage_url: https://falco.org/ - support_caveats: null - supported_minimum_version: - release_date: 11/07/2022 - version_number: 0.32.1 - works_on_arm: true +- Params: + category: Storage + description: The Storage Performance Development Kit (SPDK) provides a set of + tools and libraries for writing high performance, scalable, user-mode storage + applications. + download_url: https://github.com/spdk/spdk/releases + name: SPDK + optional_hidden_info: + other_info: No ARM64 specific release notes and binaries are available. Need + to build and install it from source from git repository. + release_notes__recommended_minimum: null + release_notes__supported_minimum: null + optional_info: + alternative_options: null + arm_recommended_minimum_version: + release_date: null + version_number: null + getting_started_resources: + arm_content: null + official_docs: https://spdk.io/doc/getting_started.html + partner_content: null + homepage_url: https://spdk.io/ + support_caveats: null + supported_minimum_version: + release_date: 30/12/2022 + version_number: 22.09 + works_on_arm: true +- Params: + category: AI/ML + description: TensorFlow is an end-to-end open-source platform for machine learning. + download_url: https://pypi.org/project/tensorflow/2.15.0/#files + name: Tensorflow + optional_hidden_info: + other_info: From TensorFlow 2.10 onwards, Linux CPU-builds for Aarch64/ARM64 + processors are built, maintained, tested and released by a third party "AWS". + Installing the tensorflow package on an ARM machine installs AWS's tensorflow-cpu-aws + package. + release_notes__recommended_minimum: null + release_notes__supported_minimum: https://www.tensorflow.org/install/pip#linux + optional_info: + alternative_options: null + arm_recommended_minimum_version: + release_date: null + version_number: null + getting_started_resources: + arm_content: https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/aarch64-docker-images-for-tensorflow-and-pytorch + official_docs: https://www.tensorflow.org/lite/guide/build_arm + partner_content: https://docs.aws.amazon.com/dlami/latest/devguide/tutorial-graviton-tensorflow.html + homepage_url: https://www.tensorflow.org/ + support_caveats: null + supported_minimum_version: + release_date: 7/9/2022 + version_number: 2.10.0 + works_on_arm: true +- Params: + category: Databases + description: Data lakehouse is a new, open data management architecture that combines + the flexibility, cost-efficiency, and scale of data lakes with the data management + and ACID transactions of data warehouses, enabling business intelligence (BI) + and machine learning (ML) on all data. + name: Data-Lakehouse + optional_hidden_info: + other_info: null + release_notes__arm_supported: https://www.databricks.com/blog/2022/04/18/announcing-databricks-support-for-aws-graviton2-with-up-to-3x-better-price-performance.html + optional_info: + alternative_options: null + getting_started_resources: + arm_content: null + official_docs: https://docs.databricks.com/en/compute/graviton.html + partner_content: https://www.databricks.com/blog/2022/04/18/announcing-databricks-support-for-aws-graviton2-with-up-to-3x-better-price-performance.html + homepage_url: https://www.databricks.com/product/data-lakehouse + support_caveats: null + product_url: https://www.databricks.com/product/data-lakehouse + release_date_on_arm: 01/09/2022 + vendor: Databricks + works_on_arm: true +- Params: + category: Container Registry + description: Dragonfly is an open source P2P-based file distribution and image + acceleration system. + download_url: https://github.com/dragonflyoss/Dragonfly2/releases + name: Dragonfly + optional_hidden_info: + other_info: No ARM64 specific release notes are available. The first binary + for ARM64 was released from v2.0.5 version. + release_notes__recommended_minimum: null + release_notes__supported_minimum: https://github.com/dragonflyoss/Dragonfly2/releases/tag/v2.0.5 + optional_info: + alternative_options: null + arm_recommended_minimum_version: + release_date: null + version_number: null + getting_started_resources: + arm_content: null + official_docs: https://d7y.io/docs/next/getting-started/quick-start/ + partner_content: null + homepage_url: https://d7y.io/ + support_caveats: null + supported_minimum_version: + release_date: 4/8/2022 + version_number: 2.0.5 + works_on_arm: true +- Params: + category: Security & Compliance + description: Falco is a cloud native runtime security tool for Linux operating + systems. + download_url: https://falco.org/docs/install-operate/download/ + name: Falco + optional_hidden_info: + other_info: null + release_notes__recommended_minimum: null + release_notes__supported_minimum: https://falco.org/blog/falco-0-32-1/ + optional_info: + alternative_options: null + arm_recommended_minimum_version: + release_date: null + version_number: null + getting_started_resources: + arm_content: null + official_docs: https://falco.org/docs/install-operate/installation/ + partner_content: https://aws.amazon.com/blogs/containers/implementing-runtime-security-in-amazon-eks-using-cncf-falco/ + homepage_url: https://falco.org/ + support_caveats: null + supported_minimum_version: + release_date: 11/07/2022 + version_number: 0.32.1 + works_on_arm: true diff --git a/themes/arm-design-system-hugo-theme/layouts/index.html b/themes/arm-design-system-hugo-theme/layouts/index.html index be50f7cf..4a746c00 100644 --- a/themes/arm-design-system-hugo-theme/layouts/index.html +++ b/themes/arm-design-system-hugo-theme/layouts/index.html @@ -23,27 +23,18 @@ {{ $packages_opensource := where (.Site.GetPage "/opensource_packages").Pages "Type" "opensource_packages" }} {{ $packages_commercial := where (.Site.GetPage "/commercial_packages").Pages "Type" "commercial_packages" }} {{ $packages_all := $packages_opensource | union $packages_commercial }} -{{ $sorted := $packages_all.ByDate.Reverse }} - -{{ range first 5 $sorted }} -
-

{{ .Title }}

-

{{ .Date.Format "January 2, 2006" }}

-

{{ .Summary }}

-
-{{ end }} +{{ $packages_alphabetical_order := sort $packages_all ".Params.name" }} - -{{ $filter_categories := .Site.Data.active_categories }} + +{{ $recent_packages := $.Site.Data.recently_added_packages }} - + {{ $filter_categories := .Site.Data.active_categories }} {{/******************************************************* *******************************************************/}} -
{{ partial "eco-dashboard/title-top.html" .}} @@ -84,11 +75,8 @@

{{ .Title }}

- diff --git a/themes/arm-design-system-hugo-theme/layouts/partials/package-display/_date-formating.html b/themes/arm-design-system-hugo-theme/layouts/partials/package-display/_date-formating.html new file mode 100644 index 00000000..aeafd19e --- /dev/null +++ b/themes/arm-design-system-hugo-theme/layouts/partials/package-display/_date-formating.html @@ -0,0 +1,32 @@ +{{/* + + Takes in a date in format dd/mm/yyyy and tranlates to '2021 January' format. + +*/}} + + + +{{ $monthNumberToName := dict + "01" "January" "1" "January" + "02" "February" "2" "February" + "03" "March" "3" "March" + "04" "April" "4" "April" + "05" "May" "5" "May" + "06" "June" "6" "June" + "07" "July" "7" "July" + "08" "August" "8" "August" + "09" "September" "9" "September" + "10" "October" + "11" "November" + "12" "December" }} + +{{ $date := split . "/" }} +{{ $yyyy := index $date 2 }} +{{ $mm := index $date 1 }} + +{{ $monthName := index $monthNumberToName $mm }} +{{ $dateFormatted := print $yyyy " " $monthName }} + + +{{ $dateFormatted }} + diff --git a/themes/arm-design-system-hugo-theme/layouts/partials/package-display/row-main.html b/themes/arm-design-system-hugo-theme/layouts/partials/package-display/row-main.html new file mode 100644 index 00000000..a6b75ee5 --- /dev/null +++ b/themes/arm-design-system-hugo-theme/layouts/partials/package-display/row-main.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/themes/arm-design-system-hugo-theme/layouts/partials/package-display/row-sub.html b/themes/arm-design-system-hugo-theme/layouts/partials/package-display/row-sub.html new file mode 100644 index 00000000..e69de29b diff --git a/themes/arm-design-system-hugo-theme/layouts/partials/package-display/table.html b/themes/arm-design-system-hugo-theme/layouts/partials/package-display/table.html new file mode 100644 index 00000000..f967b32b --- /dev/null +++ b/themes/arm-design-system-hugo-theme/layouts/partials/package-display/table.html @@ -0,0 +1,26 @@ +
+ {{/* Icon space */}} + +
+ {{ .metadata.Params.name }} +
+
+
+ {{if .metadata.Params.works_on_arm}} + {{if .metadata.Params.release_date_on_arm}} + {{ partial "package-display/_date-formating.html" .metadata.Params.release_date_on_arm }} + {{else}} + {{ partial "package-display/_date-formating.html" .metadata.Params.supported_minimum_version.release_date}} + {{end}} + {{else}} + Not yet supported + {{end}} +
+
+ +
+ + + + + + + + + + {{ $id_index := 0}} + {{ range . }} + + {{ $id_index = add $id_index 1 }} + {{ $temp := replace .Params.category "/" "__" }} {{/* URLIZE with changing / to - of category names */}} + {{ $category_urlized := $temp | urlize }} + + {{ partial "package-display/row-main.html" (dict "metadata" . "id_index" $id_index "category" $category_urlized)}} + {{/* {{ partial "package-display/row-sub.html" $recent_packages}} */}} + + {{end}} + + + + +
{{/* Save space for commercial icon */}}Package nameSupported sinceDownload link
\ No newline at end of file