Skip to content

Commit

Permalink
Merge pull request #171 from ArmDeveloperEcosystem/main
Browse files Browse the repository at this point in the history
Production push for analytics and regression tests
  • Loading branch information
zachlasiuk authored Mar 28, 2024
2 parents d39c2af + 864e525 commit 2f6562e
Show file tree
Hide file tree
Showing 30 changed files with 467 additions and 198 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/content-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ name: content-deploy

# Controls when the workflow will run
on:

# Triggers the workflow on push to production branch
push:
branches: [ production ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/link-checker.yml
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
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ jobs:
hugo-version: '0.98.0'
extended: true

# Runs pre-processing python scripts to ensure (1) date accuracy, and (2) category descriptions are always up-to-date
# Runs pre-processing python scripts to ensure (1) date accuracy, and (2) category descriptions are always up-to-date, and (3) the packages have valid categories
- name: Python pre-processing
run: |
python --version
python ./build_steps/update_category_mappings.py
python ./build_steps/update_recently_added_json.py
python ./build_steps/validate_package_catagories.py
# Builds arm-software-developer repo
- name: Build
Expand Down
8 changes: 8 additions & 0 deletions .linkcheckerrc
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Software Ecosystem Dashboard for Arm is available at https://www.arm.com/dev
This repository is maintained by Arm and contains the source files for the Arm Software Ecosystem Dashboard, providing information on software packages that work on Arm.
This data is sourced from Arm and third parties. While Arm uses reasonable efforts to keep this dashboard accurate, Arm does not warrant (express or implied) or provide any guarantee of data correctness due to the ever-evolving software landscape.

# How To Contribute:
# How To Contribute and Request:

* To contribute new package data (or improve existing package data):
* Fork this repo and submit pull requests; follow the step by step instructions in [Contribution guidelines](/contrib.md).
Expand Down
28 changes: 14 additions & 14 deletions archetypes/commercial_packages/index.md
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.

---
34 changes: 17 additions & 17 deletions archetypes/opensource_packages/index.md
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.

---
1 change: 1 addition & 0 deletions assets/css/eco-dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@

}


#recently-added-note {
margin: auto;
padding-bottom: 16px;
Expand Down
56 changes: 0 additions & 56 deletions build_steps/update_active_categories.py

This file was deleted.

116 changes: 116 additions & 0 deletions build_steps/validate_package_catagories.py
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.")


23 changes: 23 additions & 0 deletions content/commercial_packages/chef_infra_client_progress.md
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:

---
Loading

0 comments on commit 2f6562e

Please sign in to comment.