Skip to content

chore: rewrite project structure#108

Open
jjfrench wants to merge 2 commits into
mainfrom
restructure
Open

chore: rewrite project structure#108
jjfrench wants to merge 2 commits into
mainfrom
restructure

Conversation

@jjfrench

@jjfrench jjfrench commented Jun 19, 2026

Copy link
Copy Markdown
Member

Description

Rewrites the project structure in python rather than TypeScript and Node - aims to not change any of the infrastructure

(would close open dependabot security issues for javascript)

@jjfrench jjfrench deployed to synthtest June 19, 2026 04:17 — with GitHub Actions Active
Comment on lines +135 to +136
vpc=props.vpc,
vpc_subnets=props.subnet_selection,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seemed to be missing from the existing construct, not sure if that was intentional but it showed up in the cdk diff

@jjfrench jjfrench requested a review from hrodmn June 19, 2026 04:25

@hrodmn hrodmn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjfrench thanks for taking this on! I have a few ideas for you to consider but don't have any very strong opinions here.

I think the most actionable one might be to consider breaking the big global Config class into smaller specific configs for various components. Right now we take the big Config and construct things like PgstacDbConfig directly from the Config properties. I think it would be cleaner and easier to maintain if we did not need to pass properties through the global Config to the lower level configs. That way if we change things or add a property we would only need to add it in one place rather than adding it to Config and adding it to XXXConfig.

We don't need to do it in this PR but it is probably time to break PgstacInfra into some smaller constructs! That thing is a beast.

Comment thread cdk/pgstac_infra.py
Comment thread cdk/config.py
Comment thread cdk/pgstac_infra.py
Comment thread app.py
Comment on lines +92 to +109
pgstac_db_config=PgStacDbConfig(
instance_type=config.db_instance_type,
pgstac_version=config.pgstac_version,
allocated_storage=config.db_allocated_storage,
subnet_public=False,
),
stac_api_config=StacApiConfig(
custom_domain_name=config.user_stac_stac_api_custom_domain_name,
transactions=(
config.user_stac_collection_transactions # type: ignore[arg-type]
),
),
titiler_pgstac_config=TitilerPgstacConfig(
mosaic_host=config.mosaic_host,
buckets_path="./titiler_buckets.yaml",
custom_domain_name=config.user_stac_titiler_pgstac_api_custom_domain_name,
data_access_role_arn=config.titiler_data_access_role_arn,
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at how we are passing so many config.* objects through to these other classes makes me wonder if we should just define classes like TitilerPgstacConfig in config.py directly. Or maybe define these lower level config objects as properties of the larger config class.

Co-authored-by: Henry Rodman <henry.rodman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants