-
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 #171 from ArmDeveloperEcosystem/main
Production push for analytics and regression tests
- Loading branch information
Showing
30 changed files
with
467 additions
and
198 deletions.
There are no files selected for viewing
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,38 @@ | ||
name: link-checker | ||
|
||
# Controls when the workflow will run | ||
on: | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
check-external-links: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11.3 | ||
|
||
- name: Ignored URLs here | ||
run: | | ||
echo "These URLs are ignored. Please check them manually every so often to ensure their validity." | ||
cat .linkcheckerrc | ||
- name: Run linkchecker | ||
run: | | ||
pip install linkchecker | ||
linkchecker --no-robots --no-warnings --config .linkcheckerrc --user-agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" --check-extern https://www.arm.com/developer-hub/ecosystem-dashboard/servers-and-cloud-computing |
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,8 @@ | ||
[filtering] | ||
ignore= | ||
github.com | ||
# Explicitly allowed URLs that cause linkchecker to fail, but do work when manually checked. | ||
https://releases.crossplane.io/stable/ | ||
https://demoa.heimdalldata.com/docs/basics/install.html | ||
https://docs.aviatrix.com/documentation/latest/release-notes/copilot-image-release-notes/copilot-image-release-notes.html#copilot-image-version-2-0-4-06-july-2022-aws-arm | ||
https://docs.aviatrix.com/documentation/latest/index.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
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 |
---|---|---|
@@ -1,24 +1,24 @@ | ||
--- | ||
name: | ||
vendor: | ||
category: | ||
description: | ||
product_url: | ||
works_on_arm: | ||
release_date_on_arm: | ||
name: # The short name of the package. Examples: 'Docker', 'CoreDNS', or 'Snyk Container'. | ||
vendor: # The company name that offers this package. Examples: 'Snyk', or 'Oracle'. | ||
category: # The category this package belongs in. Must select a category (not the group name) from the package_category_list.yml at the top of the directory structure. Examples: 'Operating System', or 'Databases - noSQL'. | ||
description: # One complete sentence description of what this package is, ending in a period. If it has an open source equivalent, include what makes this commercial package different. | ||
product_url: # The URL that acts as the homepage for this product. Must start with 'https://'. | ||
works_on_arm: # Boolean. It is 'true' if this package works on arm, and 'false' if not. | ||
release_date_on_arm: # The date, in DD/MM/YYYY format, when this package first worked on Arm. Example: '21/04/2024'. | ||
|
||
|
||
optional_info: | ||
homepage_url: | ||
support_caveats: | ||
alternative_options: | ||
homepage_url: # The URL that brings the reader to the package homepage to learn more high-level info about it. Must start with 'https://'. | ||
support_caveats: # If the package requires anything out of the ordinary to work on Arm, such as extra library installs or varying support across common Linux OSes, explain here. | ||
alternative_options: # Only valid if 'works_on_arm' is false. Provide the name of one or more packages that address the same problem a developer is trying to solve. | ||
getting_started_resources: | ||
arm_content: | ||
vendor_announcement: | ||
official_docs: | ||
arm_content: # URL of a getting started resource that lives on an Arm digital domain such as learn.arm.com or community.arm.com. Must start with 'https://'. | ||
vendor_announcement: # URL of the blog / support notes from the vendor that announced Arm support. Must start with 'https://'. | ||
official_docs: # URL to a section of the docs that specifies installing on Arm if present, otherwise list the general 'getting started' docs. | ||
|
||
|
||
optional_hidden_info: | ||
other_info: | ||
other_info: # Not displayed on the website. Use this to list comments that will make package maintenance easier. | ||
|
||
--- |
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 |
---|---|---|
@@ -1,30 +1,30 @@ | ||
--- | ||
name: | ||
category: | ||
description: | ||
download_url: | ||
works_on_arm: | ||
name: # The short name of the package. Examples: 'Docker', 'CoreDNS', or 'Snyk Container'. | ||
category: # The category this package belongs in. Must select a category (not the group name) from the package_category_list.yml at the top of the directory structure. Examples: 'Operating System', or 'Databases - noSQL'. | ||
description: # One complete sentence description of what this package is, ending in a period. If it has an open source equivalent, include what makes this commercial package different. | ||
download_url: # The URL where a developer can download the most recent version of this package. Must start with 'https://'. | ||
works_on_arm: # Boolean. It is 'true' if this package works on arm, and 'false' if not. | ||
supported_minimum_version: | ||
version_number: | ||
release_date: | ||
version_number: # The first version that enabled support for Arm, often found in package release notes or news. | ||
release_date: # The date, in DD/MM/YYYY format, when this package first worked on Arm. Example: '21/04/2024'. | ||
|
||
|
||
optional_info: | ||
homepage_url: | ||
support_caveats: | ||
alternative_options: | ||
homepage_url: # The URL that brings the reader to the package homepage to learn more high-level info about it. Must start with 'https://'. | ||
support_caveats: # If the package requires anything out of the ordinary to work on Arm, such as extra library installs or varying support across common Linux OSes, explain here. | ||
alternative_options: # Only valid if 'works_on_arm' is false. Provide the name of one or more packages that address the same problem a developer is trying to solve. | ||
getting_started_resources: | ||
arm_content: | ||
arm_content: # URL of a getting started resource that lives on an Arm digital domain such as learn.arm.com or community.arm.com. Must start with 'https://'. | ||
partner_content: | ||
official_docs: | ||
official_docs: # URL to a section of the docs that specifies installing on Arm if present, otherwise list the general 'getting started' docs. | ||
arm_recommended_minimum_version: | ||
version_number: | ||
release_date: | ||
version_number: # Leave blank, populated by Arm internal only. | ||
release_date: # Leave blank, populated by Arm internal only. | ||
|
||
|
||
optional_hidden_info: | ||
release_notes__supported_minimum: | ||
release_notes__recommended_minimum: | ||
other_info: | ||
release_notes__supported_minimum: # Not displayed on the website. Store the URL of the release notes that first listed Arm support that justifies the listed minimum supported version above. | ||
release_notes__recommended_minimum: # Leave blank, populated by Arm internal only. | ||
other_info: # Not displayed on the website. Use this to list comments that will make package maintenance easier. | ||
|
||
--- |
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 |
---|---|---|
|
@@ -63,6 +63,7 @@ | |
|
||
} | ||
|
||
|
||
#recently-added-note { | ||
margin: auto; | ||
padding-bottom: 16px; | ||
|
This file was deleted.
Oops, something went wrong.
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,116 @@ | ||
import os, sys | ||
from pathlib import Path | ||
import yaml | ||
|
||
|
||
|
||
def isCategoryValid(string, dictionary): | ||
# Check if any key in the dictionary matches the string | ||
for key in dictionary: | ||
if string in key: | ||
return True | ||
return False | ||
|
||
|
||
if __name__ == "__main__": | ||
|
||
# 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".." | ||
category_data_yml_relative_path = Path('../data/category_data.yml') | ||
category_data_yaml = (script_dir / category_data_yml_relative_path).resolve() | ||
|
||
|
||
# content dirs | ||
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() | ||
|
||
content_directories = [opensource_absolute_path, commercial_absolute_path] | ||
|
||
|
||
|
||
|
||
# Read in category data into a dictionary, which maps {'category': 'group'}. | ||
with open(category_data_yaml, 'r') as file: | ||
data = yaml.safe_load(file) | ||
category_dict = data["subcategory_mapping"] | ||
|
||
|
||
|
||
# Loop over all packages | ||
invalid_packages = [] | ||
valid_packages = [] | ||
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() | ||
packages_type = 'Open source' | ||
for line in lines: | ||
if 'name:' in line: | ||
packages_name = line.split('name:')[1].strip() | ||
if 'category:' in line: | ||
packages_category = line.split('category:')[1].strip() | ||
if 'vendor:' in line: | ||
packages_type = 'Commercial' | ||
|
||
# check if packages_category matches a key in category_dict | ||
is_valid = isCategoryValid(packages_category,category_dict) | ||
if is_valid: | ||
valid_packages.append({ | ||
"name": packages_name, | ||
"category": packages_category, | ||
"group": category_dict[packages_category] | ||
}) | ||
else: | ||
invalid_packages.append({ | ||
"name": packages_name, | ||
"file": f, | ||
"type": packages_type, | ||
"category": packages_category, | ||
}) | ||
|
||
|
||
|
||
|
||
|
||
|
||
if invalid_packages: | ||
# Maximum width for columns | ||
max_package_name_width = max(len(max(invalid_packages, key=lambda x: len(x['name']))['name']), len('Package Name')) | ||
max_category_width = max(len(max(invalid_packages, key=lambda x: len(x['category']))['category']), len('Wrong Category')) | ||
max_type_width = max(len(max(invalid_packages, key=lambda x: len(x['type']))['type']), len('Type')) | ||
max_file_width = max(len(max(invalid_packages, key=lambda x: len(x['file']))['file']), len('File')) | ||
|
||
|
||
print("ERROR: The following packages have invalid categories:") | ||
print(" ","Package Name".ljust(max_package_name_width), "Wrong Category".ljust(max_category_width), "Type".ljust(max_type_width), "File".ljust(max_file_width)) | ||
print(" ","-" * max_package_name_width, "-" * max_category_width, "-" * max_type_width, "-" * max_file_width) | ||
|
||
# Print data rows | ||
for package in invalid_packages: | ||
print(" ",package['name'].ljust(max_package_name_width), package['category'].ljust(max_category_width), package['type'].ljust(max_type_width), package['file'].ljust(max_file_width)) | ||
sys.exit(1) | ||
|
||
|
||
else: | ||
# Maximum width for columns | ||
max_package_name_width = max(len(max(valid_packages, key=lambda x: len(x['name']))['name']), len('Package Name')) | ||
max_category_width = max(len(max(valid_packages, key=lambda x: len(x['category']))['category']), len('Category')) | ||
max_group_width = max(len(max(valid_packages, key=lambda x: len(x['group']))['group']), len('Group')) | ||
|
||
print("Success! Report of all packages:") | ||
print(" ","Package Name".ljust(max_package_name_width), "Group".ljust(max_group_width), "Category".ljust(max_category_width)) | ||
print(" ","-" * max_package_name_width, "-" * max_group_width, "-" * max_category_width) | ||
|
||
for package in valid_packages: | ||
print(" ",package['name'].ljust(max_package_name_width), package['group'].ljust(max_group_width), package['category'].ljust(max_category_width)) | ||
|
||
print("Success! See above report.") | ||
|
||
|
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,23 @@ | ||
--- | ||
name: Chef Infra Client | ||
vendor: Progress (Chef) | ||
category: DevOps | ||
description: Chef Infra Client requests all the cookbook files (including recipes, templates, resources, providers, attributes, and libraries) that it needs for every action identified in the run-list from the Chef Infra Server. | ||
product_url: https://docs.chef.io/ctl_chef_client/ | ||
works_on_arm: true | ||
release_date_on_arm: 01/02/2021 | ||
|
||
|
||
optional_info: | ||
homepage_url: https://docs.chef.io/ctl_chef_client/ | ||
support_caveats: | ||
alternative_options: | ||
getting_started_resources: | ||
arm_content: | ||
vendor_announcement: https://www.chef.io/docs/cheflibraries/product-and-user-guides/chef-infra-client-16_product-guide.pdf?sfvrsn=6595b433_4 | ||
official_docs: https://docs.chef.io/quick_start/ | ||
|
||
optional_hidden_info: | ||
other_info: | ||
|
||
--- |
Oops, something went wrong.