-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from zachlasiuk/main
Midpoint in most recent implementation
- Loading branch information
Showing
9 changed files
with
341 additions
and
8 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import os, sys | ||
from pathlib import Path | ||
import yaml | ||
from datetime import datetime | ||
|
||
|
||
# Get the absolute path to this python file's directory | ||
script_dir = Path(__file__).parent.absolute() | ||
|
||
# Relative path to content from script, then tet absolute path to content by combining, and use Resolve to handle backwards".." | ||
opensource_relative_path = Path('../content/opensource_packages') | ||
opensource_absolute_path = (script_dir / opensource_relative_path).resolve() | ||
|
||
commercial_relative_path = Path('../content/commercial_packages') | ||
commercial_absolute_path = (script_dir / commercial_relative_path).resolve() | ||
|
||
# Same process for the YAML data file: | ||
yaml_relative_path = Path('../data/recently_added_packages.yaml') | ||
yaml_absolute_path = (script_dir / yaml_relative_path).resolve() | ||
|
||
|
||
|
||
|
||
def get_all_package_metadata(package_path): | ||
with open(package_path, 'r') as f: | ||
content = f.read() | ||
# Get the metadata between '---' by splitting the content by '---' and grabbing the middle part | ||
metadata = content.split('---')[1] | ||
metadata_dic = yaml.safe_load(metadata) | ||
metadata_mirror_hugo_page = {"Params": metadata_dic} | ||
return metadata_mirror_hugo_page | ||
|
||
|
||
|
||
|
||
|
||
# List to store recent content, in order | ||
recent_content_with_all_metadata = [] | ||
|
||
content_directories = [opensource_absolute_path, commercial_absolute_path] | ||
|
||
# Obtain all content and make them orderable by date | ||
recent_content = [] | ||
for content_directory in content_directories: | ||
for f in os.listdir(content_directory): | ||
if f.endswith(".md"): | ||
file_path_full = os.path.join(content_directory, f) | ||
with open(file_path_full, 'r') as file: | ||
lines = file.readlines() | ||
# Initalize date string to keep track of dates, depending on data format | ||
date_str = None | ||
for line in lines: | ||
if 'release_date_on_arm:' in line: | ||
date_str = line.split('release_date_on_arm:')[1].strip() | ||
elif 'release_date:' in line: | ||
date_str = line.split('release_date:')[1].strip() | ||
if date_str: | ||
try: | ||
date = datetime.strptime(date_str, '%d/%m/%Y') | ||
recent_content.append({'file_path_full': file_path_full, 'date': date}) | ||
break | ||
except ValueError: | ||
print('ERROR---------------------') | ||
print(f"Date format error in file: {file_path_full}") | ||
print('----------------') | ||
break | ||
|
||
# Sort the content by date | ||
recent_content.sort(key=lambda d: d['date'], reverse=True) | ||
|
||
# Take the 5 most recent | ||
recent_content = recent_content[:5] | ||
|
||
# Get full metadata to fill out each file | ||
for content in recent_content: | ||
content_metadata = get_all_package_metadata(content['file_path_full']) | ||
recent_content_with_all_metadata.append(content_metadata) | ||
|
||
# Fill out full metadata for this content | ||
print() | ||
print('Adding these packages in order to data/recently_added_packages.yaml:') | ||
for c in recent_content_with_all_metadata: | ||
print(c) | ||
print() | ||
|
||
# Write to YAML | ||
with open(yaml_absolute_path, 'w', encoding='utf-8') as yaml_file: | ||
yaml.dump(recent_content_with_all_metadata, yaml_file, allow_unicode=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
themes/arm-design-system-hugo-theme/layouts/partials/package-display/_date-formating.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{/* | ||
|
||
Takes in a date in format dd/mm/yyyy and tranlates to '2021 January' format. | ||
|
||
*/}} | ||
|
||
|
||
<!-- Lookup table --> | ||
{{ $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 }} <!-- Translate month number to Name --> | ||
{{ $dateFormatted := print $yyyy " " $monthName }} <!-- Format the date --> | ||
|
||
<!-- Return --> | ||
{{ $dateFormatted }} | ||
|
46 changes: 46 additions & 0 deletions
46
themes/arm-design-system-hugo-theme/layouts/partials/package-display/row-main.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
<tr id="row-{{.id_index}}" | ||
class="c-table-row main-sw-row search-div tag-{{.category}}" | ||
{{/* Need to translate date into sortable format string like data-date="20210101" data-date="{{if .metadata.Params.release_date_on_arm}} {{.metadata.Params.release_date_on_arm}} {{else}} {{.metadata.Params.}}" */}} | ||
data-title="{{.metadata.Params.name}}" | ||
onclick="rowClickHandler(this);"> | ||
|
||
|
||
<td> | ||
{{/* Icon space */}} | ||
</td> | ||
|
||
|
||
<td class="search-title"> | ||
<div class="package-name"> | ||
{{ .metadata.Params.name }} | ||
</div> | ||
</td> | ||
|
||
|
||
<td> | ||
<div class="date-supported"> | ||
{{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}} | ||
</div> | ||
</td> | ||
|
||
|
||
<td> | ||
<div class="download-link"> | ||
{{if .metadata.Params.download_url}} | ||
{{ .metadata.Params.download_url}} | ||
{{else}} | ||
{{.metadata.Params.product_url}} | ||
{{end}} | ||
</div> | ||
</td> | ||
|
||
</tr> |
Empty file.
26 changes: 26 additions & 0 deletions
26
themes/arm-design-system-hugo-theme/layouts/partials/package-display/table.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<table class="c-table is-selectable" cellspacing="0"> | ||
<thead> | ||
<tr> | ||
<th>{{/* Save space for commercial icon */}}</th> | ||
<th>Package name</th> | ||
<th>Supported since</th> | ||
<th>Download link</th> | ||
</tr> | ||
</thead> | ||
<tbody id="sw-tablebody"> | ||
{{ $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}} | ||
|
||
|
||
|
||
</tbody> | ||
</table> |