Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Utils] Add script to create attribution document. #653

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

gmarciani
Copy link
Contributor

Description of changes

Add script to create attribution document.
This script is taken from the CLI one (https://github.com/aws/aws-parallelcluster/blob/develop/util/create-attribution-doc.sh), plus some changes required to make it work with the node package.

The goal of this Pr is not to improve the script, but to simply make the existing script work for the node package.
We will improve (if needed) in a follow up PR.

Here are the diff between the current script and the one in the CLI:

(pcluster-dev) ➜  aws-parallelcluster-node git:(wip/mgiacomo/3130/attribution-docs-0212-1) ✗ diff /Volumes/workplace/aws-parallelcluster-dev/aws-parallelcluster-node/util/create-attribution-doc.sh /Volumes/workplace/aws-parallelcluster-dev/aws-parallelcluster/util/create-attribution-doc.sh
43,44c43
<   # install via source
<   pip3 install -e "$(dirname $ATTR_SCRIPT_DIR )"
---
>   # install pcluster via source
45a45,47
>   pip3 install -e "$(dirname $ATTR_SCRIPT_DIR )/cli"
>   #pip3 install -r requirements.txt
>   
47a50,53
>   # Create a list of aws cdk Sub-packages we want to ignore 
>   aws_cdk_ignore_subpackages=$(pip list | grep cdk | awk '{print $1}') 
>   aws_cdk_version=$(pip list | grep cdk | awk '{print $2}'| head -n 1)
>   
49,50c55,57
<   pip-licenses -i aws-parallelcluster-node pip-licenses --format=plain-vertical --with-license-file --with-urls --no-license-path --with-authors --output-file=$final_license_file
< 
---
>   pip-licenses -i $aws_cdk_ignore_subpackages aws-parallelcluster pip-licenses --format=plain-vertical --with-license-file --with-urls --no-license-path --with-authors --output-file=$final_license_file
>   
>   
52c59,63
<   cpy_version=$(python -V |  grep -Eo '([0-9]+)(\.?[0-9]+)' | head -1)
---
>   cpy_version=$(python -V |  grep -Eo '([0-9]+)(\.?[0-9]+)' | head -1) 
> 
> 
>   # aws-cdk 
>   append_package_details_to_final_license_file "aws-cdk" $aws_cdk_version "Apache License" "https://raw.githubusercontent.com/aws/aws-cdk/main/LICENSE" "https://raw.githubusercontent.com/aws/aws-cdk/main/LICENSE"

Tests

Run the script to generate attribution doc.

References

  • Link to impacted open issues.
  • Link to related PRs in other packages (i.e. cookbook, node).
  • Link to documentation useful to understand the changes.

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant