Skip to content

Commit

Permalink
Update license tool and markings (#4)
Browse files Browse the repository at this point in the history
* Pulling in license marking script

* Apply license marking script
  • Loading branch information
BrianSipos authored Aug 8, 2024
1 parent 4653403 commit aa879be
Show file tree
Hide file tree
Showing 40 changed files with 380 additions and 160 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
##
## Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
## Laboratory LLC.
##
## This file is part of the AMM CODEC Engine (ACE) under the
## DTN Management Architecture (DTNMA) reference implementaton set from APL.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
## http://www.apache.org/licenses/LICENSE-2.0
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## Portions of this work were performed for the Jet Propulsion Laboratory,
## California Institute of Technology, sponsored by the United States Government
## under the prime contract 80NM0018D0004 between the Caltech and NASA under
## subcontract 1658085.
##
name: Build and run unit tests
on: [push]

Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
##
## Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
## Laboratory LLC.
##
## This file is part of the AMM CODEC Engine (ACE) under the
## DTN Management Architecture (DTNMA) reference implementaton set from APL.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
## http://www.apache.org/licenses/LICENSE-2.0
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## Portions of this work were performed for the Jet Propulsion Laboratory,
## California Institute of Technology, sponsored by the United States Government
## under the prime contract 80NM0018D0004 between the Caltech and NASA under
## subcontract 1658085.
##

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
##
## Copyright (c) 2023 The Johns Hopkins University Applied Physics
## Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
## Laboratory LLC.
##
## This file is part of the Asynchronous Network Managment System (ANMS).
## This file is part of the AMM CODEC Engine (ACE) under the
## DTN Management Architecture (DTNMA) reference implementaton set from APL.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
Expand All @@ -14,9 +15,9 @@
## See the License for the specific language governing permissions and
## limitations under the License.
##
## This work was performed for the Jet Propulsion Laboratory, California
## Institute of Technology, sponsored by the United States Government under
## the prime contract 80NM0018D0004 between the Caltech and NASA under
## Portions of this work were performed for the Jet Propulsion Laboratory,
## California Institute of Technology, sponsored by the United States Government
## under the prime contract 80NM0018D0004 between the Caltech and NASA under
## subcontract 1658085.
##

Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
# Editor files
*~
*.bak
.project
.pydevproject

# Python intermediates
__pycache__
*.egg-info
requirements.txt
build
dist
.venv*/

# Test outputs
testresults.xml
.coverage
coverage.xml
/.pytest_cache/
11 changes: 6 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
##
## Copyright (c) 2023 The Johns Hopkins University Applied Physics
## Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
## Laboratory LLC.
##
## This file is part of the Asynchronous Network Managment System (ANMS).
## This file is part of the AMM CODEC Engine (ACE) under the
## DTN Management Architecture (DTNMA) reference implementaton set from APL.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
Expand All @@ -14,9 +15,9 @@
## See the License for the specific language governing permissions and
## limitations under the License.
##
## This work was performed for the Jet Propulsion Laboratory, California
## Institute of Technology, sponsored by the United States Government under
## the prime contract 80NM0018D0004 between the Caltech and NASA under
## Portions of this work were performed for the Jet Propulsion Laboratory,
## California Institute of Technology, sponsored by the United States Government
## under the prime contract 80NM0018D0004 between the Caltech and NASA under
## subcontract 1658085.
##
default:
Expand Down
23 changes: 23 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
##
## Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
## Laboratory LLC.
##
## This file is part of the AMM CODEC Engine (ACE) under the
## DTN Management Architecture (DTNMA) reference implementaton set from APL.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
## http://www.apache.org/licenses/LICENSE-2.0
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## Portions of this work were performed for the Jet Propulsion Laboratory,
## California Institute of Technology, sponsored by the United States Government
## under the prime contract 80NM0018D0004 between the Caltech and NASA under
## subcontract 1658085.
##

# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
version: 2
Expand Down
22 changes: 22 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
<!--
Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
Laboratory LLC.
This file is part of the AMM CODEC Engine (ACE) under the
DTN Management Architecture (DTNMA) reference implementaton set from APL.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Portions of this work were performed for the Jet Propulsion Laboratory,
California Institute of Technology, sponsored by the United States Government
under the prime contract 80NM0018D0004 between the Caltech and NASA under
subcontract 1658085.
-->
# Code of Conduct - ARI CODEC Engine (ACE)

## Our Pledge
Expand Down
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
<!--
Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
Laboratory LLC.
This file is part of the AMM CODEC Engine (ACE) under the
DTN Management Architecture (DTNMA) reference implementaton set from APL.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Portions of this work were performed for the Jet Propulsion Laboratory,
California Institute of Technology, sponsored by the United States Government
under the prime contract 80NM0018D0004 between the Caltech and NASA under
subcontract 1658085.
-->

<!-- omit in toc -->
# Contributing to AMM CODEC Engine (ACE)

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<!--
Copyright (c) 2023 The Johns Hopkins University Applied Physics
Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
Laboratory LLC.
This file is part of the Asynchronous Network Managment System (ANMS).
This file is part of the AMM CODEC Engine (ACE) under the
DTN Management Architecture (DTNMA) reference implementaton set from APL.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -14,9 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This work was performed for the Jet Propulsion Laboratory, California
Institute of Technology, sponsored by the United States Government under
the prime contract 80NM0018D0004 between the Caltech and NASA under
Portions of this work were performed for the Jet Propulsion Laboratory,
California Institute of Technology, sponsored by the United States Government
under the prime contract 80NM0018D0004 between the Caltech and NASA under
subcontract 1658085.
-->
# ACE Tools
Expand Down
51 changes: 51 additions & 0 deletions apply_license.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/bin/bash
##
## Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
## Laboratory LLC.
##
## This file is part of the AMM CODEC Engine (ACE) under the
## DTN Management Architecture (DTNMA) reference implementaton set from APL.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
## http://www.apache.org/licenses/LICENSE-2.0
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## Portions of this work were performed for the Jet Propulsion Laboratory,
## California Institute of Technology, sponsored by the United States Government
## under the prime contract 80NM0018D0004 between the Caltech and NASA under
## subcontract 1658085.
##

# Apply copyright and license markings to source files.
#
# Requires installation of:
# pip3 install licenseheaders
# Run as:
# ./apply_license.sh {--dry} {-vv}
#
set -e

SELFDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))

LICENSEOPTS="${LICENSEOPTS} --tmpl ${SELFDIR}/apply_license.tmpl"
LICENSEOPTS="${LICENSEOPTS} --years 2020-$(date +%Y)"
# Excludes only apply to directory (--dir) mode and not file mode
#LICENSEOPTS="${LICENSEOPTS} --exclude *.yml *.yaml *.min. "


# Specific paths
if [ "$#" -gt 0 ]
then
echo "Applying markings to selected $@ ..."
licenseheaders ${LICENSEOPTS} --dir $@
exit 0
fi

echo "Applying markings to source..."
licenseheaders ${LICENSEOPTS} --dir ${SELFDIR}
20 changes: 20 additions & 0 deletions apply_license.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) ${years} The Johns Hopkins University Applied Physics
Laboratory LLC.

This file is part of the AMM CODEC Engine (ACE) under the
DTN Management Architecture (DTNMA) reference implementaton set from APL.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Portions of this work were performed for the Jet Propulsion Laboratory,
California Institute of Technology, sponsored by the United States Government
under the prime contract 80NM0018D0004 between the Caltech and NASA under
subcontract 1658085.
11 changes: 6 additions & 5 deletions build_docs.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
##
## Copyright (c) 2023 The Johns Hopkins University Applied Physics
## Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
## Laboratory LLC.
##
## This file is part of the Asynchronous Network Managment System (ANMS).
## This file is part of the AMM CODEC Engine (ACE) under the
## DTN Management Architecture (DTNMA) reference implementaton set from APL.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
Expand All @@ -15,9 +16,9 @@
## See the License for the specific language governing permissions and
## limitations under the License.
##
## This work was performed for the Jet Propulsion Laboratory, California
## Institute of Technology, sponsored by the United States Government under
## the prime contract 80NM0018D0004 between the Caltech and NASA under
## Portions of this work were performed for the Jet Propulsion Laboratory,
## California Institute of Technology, sponsored by the United States Government
## under the prime contract 80NM0018D0004 between the Caltech and NASA under
## subcontract 1658085.
##

Expand Down
11 changes: 6 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#
# Copyright (c) 2023 The Johns Hopkins University Applied Physics
# Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
# Laboratory LLC.
#
# This file is part of the Asynchronous Network Managment System (ANMS).
# This file is part of the AMM CODEC Engine (ACE) under the
# DTN Management Architecture (DTNMA) reference implementaton set from APL.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,9 +15,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This work was performed for the Jet Propulsion Laboratory, California
# Institute of Technology, sponsored by the United States Government under
# the prime contract 80NM0018D0004 between the Caltech and NASA under
# Portions of this work were performed for the Jet Propulsion Laboratory,
# California Institute of Technology, sponsored by the United States Government
# under the prime contract 80NM0018D0004 between the Caltech and NASA under
# subcontract 1658085.
#
import os
Expand Down
11 changes: 6 additions & 5 deletions src/ace/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#
# Copyright (c) 2023 The Johns Hopkins University Applied Physics
# Copyright (c) 2020-2024 The Johns Hopkins University Applied Physics
# Laboratory LLC.
#
# This file is part of the Asynchronous Network Managment System (ANMS).
# This file is part of the AMM CODEC Engine (ACE) under the
# DTN Management Architecture (DTNMA) reference implementaton set from APL.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,9 +15,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This work was performed for the Jet Propulsion Laboratory, California
# Institute of Technology, sponsored by the United States Government under
# the prime contract 80NM0018D0004 between the Caltech and NASA under
# Portions of this work were performed for the Jet Propulsion Laboratory,
# California Institute of Technology, sponsored by the United States Government
# under the prime contract 80NM0018D0004 between the Caltech and NASA under
# subcontract 1658085.
#
''' A package for converting ADMs from JSON and checking them, and
Expand Down
Loading

0 comments on commit aa879be

Please sign in to comment.