Skip to content

Commit

Permalink
fix: updating copyright (#66)
Browse files Browse the repository at this point in the history
chore: update copyright
  • Loading branch information
jtblack-aws authored Mar 5, 2024
1 parent 65ec8ad commit 057233e
Show file tree
Hide file tree
Showing 94 changed files with 150 additions and 81 deletions.
5 changes: 5 additions & 0 deletions .github/copyright.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
one_date_re: ' Copyright (?P<year>[0-9]{4})'
two_date_re: ' Copyright (?P<from>[0-9]{4})-(?P<to>[0-9]{4})'
one_date_format: ' Copyright {year}'
two_date_format: ' Copyright {from}-{to}'
license_file: LICENSE
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,37 @@ repos:
stages: [ manual ]
# uncomment the line below if using "finch" on MacOS
# args: [ "-f" ]

- repo: https://github.com/sbrunner/pre-commit-copyright
rev: 0.7.0
hooks:
- id: copyright
name: update copyright
exclude: |
(?x)^(
doc/.*|
^\..+|
.+\.md|
test/data/.*|
LICENSE|
tox.ini|
pyproject.toml|
setup.cfg|
setup.py|
py.typed
)$
- id: copyright-required
name: require copyright
exclude: |
(?x)^(
doc/.*|
^\..+|
.+\.md|
test/data/.*|
LICENSE|
tox.ini|
pyproject.toml|
setup.cfg|
setup.py|
py.typed
)$
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Stage 1: Build environment
FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal as build

Expand Down
2 changes: 1 addition & 1 deletion bin/oversightml-mr-entry-point.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import argparse
import logging
Expand Down
2 changes: 2 additions & 0 deletions environment-py311.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

name: osml_model_runner
channels:
- conda-forge
Expand Down
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

name: osml_model_runner
channels:
- conda-forge
Expand Down
2 changes: 1 addition & 1 deletion scripts/describe_image.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import re
import sys
Expand Down
2 changes: 2 additions & 0 deletions scripts/image_converter.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import os
from argparse import ArgumentParser
Expand Down
2 changes: 2 additions & 0 deletions scripts/requirements-scripts.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Added to support the KML visualization script
lxml==4.9.1
defusedxml==0.7.1
2 changes: 1 addition & 1 deletion scripts/run_container.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.
#

# This is a utility to run a local model runner container with an ENV imported from ECS.
Expand Down
2 changes: 1 addition & 1 deletion scripts/summarize_image.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import pathlib
import re
Expand Down
2 changes: 1 addition & 1 deletion scripts/tile_read_timer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import argparse
import time
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/api/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.


# API Exceptions
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/api/image_request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
from json import dumps, loads
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/api/inference.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from enum import auto

Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/api/region_request.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from typing import Any, Dict

Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/api/request_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from aws.osml.model_runner.common import VALID_IMAGE_COMPRESSION, VALID_IMAGE_FORMATS

Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/api/sink.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from enum import auto

Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import ast
import functools
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/app_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import os
from dataclasses import dataclass
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/auto_string_enum.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from enum import Enum

Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/credentials_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from typing import Dict

Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/endpoint_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import math
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.


# Common Exceptions
Expand Down
2 changes: 2 additions & 0 deletions src/aws/osml/model_runner/common/feature_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from typing import Optional, Tuple

import geojson
Expand Down
2 changes: 2 additions & 0 deletions src/aws/osml/model_runner/common/log_context.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import threading
from typing import List, Optional
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/metrics_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from aws_embedded_metrics.config import get_config

Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/mr_post_processing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from abc import ABC, ABCMeta, abstractmethod
from dataclasses import dataclass, field
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from dataclasses import dataclass, field
from enum import auto
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/timer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import time
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/common/typing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from enum import Enum, auto
from typing import Tuple
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/database/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/database/ddb_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import random
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
from dataclasses import dataclass
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/database/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.


# Database Exceptions
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/database/feature_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import random
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/database/job_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import time
from dataclasses import dataclass
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/database/region_request_table.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import time
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.


# ModelRunner Exceptions
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/inference/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/inference/detector.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import abc
from io import BufferedReader
Expand Down
2 changes: 2 additions & 0 deletions src/aws/osml/model_runner/inference/endpoint_builder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from abc import ABC, abstractmethod
from typing import Optional

Expand Down
2 changes: 2 additions & 0 deletions src/aws/osml/model_runner/inference/endpoint_factory.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from typing import Dict, Optional

from aws.osml.model_runner.api import ModelInvokeMode
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/inference/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/inference/feature_selection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

from collections import OrderedDict
from typing import List, Tuple
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/inference/feature_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
from datetime import datetime
Expand Down
2 changes: 2 additions & 0 deletions src/aws/osml/model_runner/inference/http_detector.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
from io import BufferedReader
from json import JSONDecodeError
Expand Down
4 changes: 1 addition & 3 deletions src/aws/osml/model_runner/inference/sm_detector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.

# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
from io import BufferedReader
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/queue/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/queue/request_queue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import json
import logging
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/sink/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/sink/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.


# SINK Exceptions
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/sink/kinesis_sink.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import sys
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/sink/s3_sink.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
import os
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/sink/sink.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import abc
from typing import List
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/sink/sink_factory.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

import logging
from typing import Any, Dict, List
Expand Down
2 changes: 1 addition & 1 deletion src/aws/osml/model_runner/status/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023 Amazon.com, Inc. or its affiliates.
# Copyright 2023-2024 Amazon.com, Inc. or its affiliates.

# Telling flake8 to not flag errors in this file. It is normal that these classes are imported but not used in an
# __init__.py file.
Expand Down
Loading

0 comments on commit 057233e

Please sign in to comment.