chore: rewrite project structure#108
Conversation
| vpc=props.vpc, | ||
| vpc_subnets=props.subnet_selection, |
There was a problem hiding this comment.
this seemed to be missing from the existing construct, not sure if that was intentional but it showed up in the cdk diff
hrodmn
left a comment
There was a problem hiding this comment.
@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.
| 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, | ||
| ), |
There was a problem hiding this comment.
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>
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)