Skip to content

Commit

Permalink
add spdx headers
Browse files Browse the repository at this point in the history
  • Loading branch information
tvansteenburgh committed Sep 20, 2023
1 parent c9ab3a2 commit 35b143d
Show file tree
Hide file tree
Showing 32 changed files with 98 additions and 6 deletions.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ name = "stacklet.client.platform"
version = "0.1.3"
description = "Stacklet Platform Client"
readme = "README.md"
authors = [ "Sonny Shi <sonny@stacklet.io>",]
authors = ["Sonny Shi <sonny@stacklet.io>"]
maintainers = ["Stacklet <hello@stacklet.io>"]
license = "Apache-2.0"
include = [ "stacklet/client/platform/vendored/auth_landing_pages/ok.html", "stacklet/client/platform/vendored/auth_landing_pages/fail.html",]
[[tool.poetry.packages]]
include = "stacklet"
Expand Down
3 changes: 3 additions & 0 deletions scripts/upgrade.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import sys

# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import click

# in python 3.11 we should switch out to tomllib
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

# https://stackoverflow.com/a/74540217
from charset_normalizer import md__mypyc # noqa
2 changes: 2 additions & 0 deletions stacklet/client/platform/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0
3 changes: 3 additions & 0 deletions stacklet/client/platform/cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import json
import os
import pathlib
Expand Down
4 changes: 3 additions & 1 deletion stacklet/client/platform/client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

# platform client using cli

import jmespath
Expand Down Expand Up @@ -65,7 +68,6 @@ class PlatformTokenExpired(PlatformApiError):


def _method(executor, function_name, snippet, pager, expr):

doc = []
if snippet.required:
doc.append("required: ")
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/cognito.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import logging

import boto3
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

from .account import account
from .accountgroup import account_group
from .binding import binding
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/account.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import click
import json

Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/accountgroup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import click

from stacklet.client.platform.executor import _run_graphql
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/binding.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import click

from stacklet.client.platform.executor import _run_graphql
Expand Down
4 changes: 3 additions & 1 deletion stacklet/client/platform/commands/cube.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

from datetime import datetime
import io
import sys
Expand Down Expand Up @@ -48,7 +51,6 @@ def meta(ctx):
@cubejs.command()
@click.pass_context
def resource_counts(ctx):

response = _run_query(ctx, _resource_counts)
data = response["data"]
for row in data:
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/graphql.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import io
import sys

Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/policy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import click

from stacklet.client.platform.exceptions import InvalidInputException
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/policycollection.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import click

from stacklet.client.platform.executor import _run_graphql
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/repository.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import click
import os

Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/commands/user.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import click

from stacklet.client.platform.utils import click_group_entry, default_options
Expand Down
4 changes: 3 additions & 1 deletion stacklet/client/platform/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

"""
Handle configuration for the CLI
"""
Expand All @@ -11,7 +14,6 @@


class StackletConfig:

schema = {
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/context.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import os
from stacklet.client.platform.config import StackletConfig

Expand Down
4 changes: 4 additions & 0 deletions stacklet/client/platform/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0


class ConfigValidationException(Exception):
pass

Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/executor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import json
import logging

Expand Down
4 changes: 3 additions & 1 deletion stacklet/client/platform/formatter.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import json

import yaml
from stacklet.client.platform.registry import PluginRegistry


class Formatter:

registry = PluginRegistry("formats")


Expand Down
4 changes: 4 additions & 0 deletions stacklet/client/platform/graphql.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0


class StackletGraphqlSnippet:
"""
A resusable Graphql Snippet
Expand Down
4 changes: 4 additions & 0 deletions stacklet/client/platform/registry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0


class PluginRegistry:
def __init__(self, plugin_type):
self.plugin_type = plugin_type
Expand Down
3 changes: 3 additions & 0 deletions stacklet/client/platform/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import logging
import os

Expand Down
3 changes: 3 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import json
import os
from tempfile import NamedTemporaryFile
Expand Down
3 changes: 3 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

from unittest.mock import patch

from stacklet.client.platform.client import platform_client
Expand Down
4 changes: 3 additions & 1 deletion tests/test_cognito.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import boto3
import pytest
from click.testing import CliRunner
Expand All @@ -9,7 +12,6 @@


class TestCognitoUserManager:

runner = CliRunner()
cli = cli

Expand Down
3 changes: 3 additions & 0 deletions tests/test_graphql.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import json
import yaml
from unittest.mock import patch
Expand Down
3 changes: 3 additions & 0 deletions tests/test_repository.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import json
from unittest.mock import patch

Expand Down
3 changes: 3 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

import os
from tempfile import NamedTemporaryFile
from unittest import TestCase
Expand Down
3 changes: 3 additions & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright Stacklet, Inc.
# SPDX-License-Identifier: Apache-2.0

from unittest import TestCase
from unittest.mock import MagicMock

Expand Down

0 comments on commit 35b143d

Please sign in to comment.