Skip to content

Commit

Permalink
Fixing broken dependencies
Browse files Browse the repository at this point in the history
- Upped the version to 1.0.2
- Updated the `tests/starfleet_included_plugins/account_index_generator/generatedIndex.json` file to account for newer regions
- Reformatted to latest standards
  • Loading branch information
Mike Grima committed Mar 27, 2024
1 parent b9093b4 commit aefaa85
Show file tree
Hide file tree
Showing 75 changed files with 126 additions and 32 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
{name = "Gemini", email = "careers@gemini.com"},
{name = "Mike Grima", email = "michael.grima@gemini.com"},
]
version = "1.0.1"
version = "1.0.2"
dynamic = ["dependencies"]

[tool.setuptools]
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:Module: setup
:Author: Mike Grima <michael.grima@gemini.com>
"""

from setuptools import setup

setup()
12 changes: 6 additions & 6 deletions src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
iambic-core==0.11.97
cloudaux-lite==1.0.0
click==8.1.7
PyYAML==6.0.1
marshmallow==3.20.1
marshmallow==3.21.1
retry==0.9.2
pyjwt==2.8.0
requests==2.31.0
cryptography==41.0.7
botocore==1.34.11
boto3==1.34.11
slack-sdk==3.26.1
# cryptography==42.0.5 Handled by iambic-core
botocore==1.34.71
boto3==1.34.71
slack-sdk==3.27.1
deepdiff==6.7.1
iambic-core==0.11.97
1 change: 1 addition & 0 deletions src/starfleet/account_index/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import starfleet.account_index.plugins
from starfleet.account_index.schematics import AccountIndex, AccountIndexInstance
from starfleet.utils.configuration import STARFLEET_CONFIGURATION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from starfleet.account_index.plugins.starfleet_default_index.ship import StarfleetDefaultAccountIndex

ACCOUNT_INDEX_PLUGINS = [StarfleetDefaultAccountIndex]
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

# pylint: disable=too-many-locals,too-many-statements
import json
from typing import Any, Dict, Optional, Set
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/account_index/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from typing import Any, Dict, Set

from starfleet.account_index.loader import ACCOUNT_INDEX
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/account_index/schematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from typing import Set, Dict, Optional, TypeVar


Expand Down
1 change: 1 addition & 0 deletions src/starfleet/cli/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from typing import Any, List

import click
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/starbase/entrypoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import json
from typing import Any, Dict

Expand Down
1 change: 1 addition & 0 deletions src/starfleet/starbase/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import json
from typing import Any, Dict, Tuple, Optional
from urllib.parse import unquote_plus
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/starbase/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import json
from typing import Any, Dict, List, Type, Generator

Expand Down
1 change: 1 addition & 0 deletions src/starfleet/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from starfleet.utils.logging import LOGGER # noqa pylint: disable=W0611
from starfleet.utils.configuration import STARFLEET_CONFIGURATION
from starfleet.account_index.loader import ACCOUNT_INDEX
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/utils/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from typing import Any, Dict

from marshmallow import Schema, fields, INCLUDE, validate, validates_schema, ValidationError
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/utils/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import logging
import os
from typing import Any, Dict
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import logging

LOGGER = logging.getLogger("starfleet")
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/utils/niceties.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from typing import Set

import boto3
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/utils/plugin_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

# from importlib.metadata import entry_points
import importlib
from pkgutil import iter_modules
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/utils/secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import json
from typing import Any, Dict

Expand Down
1 change: 1 addition & 0 deletions src/starfleet/utils/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from typing import Any, Dict, List

from slack_sdk import WebClient
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/base_payload_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from typing import List, Any, Dict, TypeVar

from marshmallow import Schema, fields, INCLUDE, validates, ValidationError, validate, validates_schema
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from io import TextIOWrapper
from typing import Dict, Any

Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/lambda_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import os
from functools import wraps
from typing import Callable, Dict, Type, Any
Expand Down
5 changes: 4 additions & 1 deletion src/starfleet/worker_ships/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from typing import Dict

import starfleet.worker_ships.plugins
Expand Down Expand Up @@ -53,7 +54,9 @@ def load_all_plugins(self):
# If there is a configuration entry, then we need to validate the correct configuration:
errors = plugin.configuration_template_class().validate(worker_ship_config) # noqa
if errors:
raise BadConfigurationError(f"[💥] Worker ship: {plugin.get_worker_ship_name()} has an invalid configuration. {str(errors)}") # noqa
raise BadConfigurationError(
f"[💥] Worker ship: {plugin.get_worker_ship_name()} has an invalid configuration. {str(errors)}"
) # noqa

# Check that the worker ship is enabled:
if not worker_ship_config["Enabled"]:
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/niceties.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import datetime
import json
from typing import Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from starfleet.worker_ships.plugins.account_index_generator.ship import AccountIndexGeneratorShip, account_inventory

WORKER_SHIP_PLUGINS = [AccountIndexGeneratorShip]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from datetime import datetime
import json
from typing import Dict, Any, TypeVar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import asyncio
from asyncio import AbstractEventLoop
from concurrent.futures import ThreadPoolExecutor
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/aws_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from starfleet.worker_ships.plugins.aws_config.ship import AwsConfigWorkerShip, aws_config

WORKER_SHIP_PLUGINS = [AwsConfigWorkerShip]
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/aws_config/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import json
from difflib import Differ
from enum import Enum
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/aws_config/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from enum import Enum
from typing import Any, Dict

Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/aws_config/ship.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import json
import traceback
from typing import Dict, Any, TypeVar
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/github_sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from starfleet.worker_ships.plugins.github_sync.ship import GitHubSyncWorkerShip, sync_github

WORKER_SHIP_PLUGINS = [GitHubSyncWorkerShip]
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/github_sync/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from datetime import datetime, timezone
from functools import wraps
from typing import Dict, Any, Callable
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/github_sync/ship.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

# pylint: disable=too-many-locals,too-many-statements
import json
import tempfile
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/github_sync/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import hashlib
import os
import re
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/iam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import click

from starfleet.worker_ships.plugins.iam.role_ship import IamRoleWorkerShip, role
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/plugins/iam/iambic_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

# pylint: disable=unused-import,wrong-import-position,wrong-import-order
from unittest import mock

Expand Down
3 changes: 2 additions & 1 deletion src/starfleet/worker_ships/plugins/iam/role_ship.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

# pylint: disable=too-many-locals,too-many-statements,too-many-branches
import asyncio
import json
Expand Down Expand Up @@ -64,7 +65,7 @@ def render_iambic_template(self, commit: bool = False) -> Dict[str, Any]:
"""This will render the iambic template and return it back out."""
return render_iambic_template(self.payload, IambicTemplateTypes.IAM_ROLE, commit)

def prepare_iambic_template(self, rendered_template: Dict[str, Any]) -> "AwsIamRoleTemplate":
def prepare_iambic_template(self, rendered_template: Dict[str, Any]) -> "AwsIamRoleTemplate": # noqa
"""This will perform the additional validation that is needed to load and generate the iambic template."""
from starfleet.worker_ships.plugins.iam.iambic_imports import AwsIamRoleTemplate

Expand Down
5 changes: 3 additions & 2 deletions src/starfleet/worker_ships/plugins/iam/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

import copy
from enum import Enum
from typing import Any, Dict, List
Expand Down Expand Up @@ -68,7 +69,7 @@ def render_iambic_template(template: Dict[str, Any], template_type: IambicTempla
return rendered_template


def make_iambic_variables(template_variables: List[Dict[str, str]]) -> List["Variable"]:
def make_iambic_variables(template_variables: List[Dict[str, str]]) -> List["Variable"]: # noqa
"""This will make the iambic variable objects from the Starfleet template variables."""
from starfleet.worker_ships.plugins.iam.iambic_imports import Variable

Expand All @@ -79,7 +80,7 @@ def make_iambic_variables(template_variables: List[Dict[str, str]]) -> List["Var
return iambic_variables


def render_iambic_stanza(template_stanza: Any) -> Any: # pylint: disable=too-many-branches
def render_iambic_stanza(template_stanza: Any) -> Any: # noqa # pylint: disable=too-many-branches
"""This is going to recursively iterate over the iambic template and render out the stanzas as appropriate."""
# Is this a dictionary?
if isinstance(template_stanza, dict):
Expand Down
1 change: 1 addition & 0 deletions src/starfleet/worker_ships/ship_schematics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

from enum import Enum
from typing import Any, Dict, Type, TypeVar

Expand Down
1 change: 1 addition & 0 deletions tests/account_index/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

# pylint: disable=unused-argument
from typing import Generator, Any, Dict

Expand Down
1 change: 1 addition & 0 deletions tests/account_index/test_account_index_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:License: See the LICENSE file for details
:Author: Mike Grima <michael.grima@gemini.com>
"""

# pylint: disable=unused-argument
from typing import Any, Dict
from unittest import mock
Expand Down
Loading

0 comments on commit aefaa85

Please sign in to comment.