Skip to content

Commit

Permalink
clean up commmets; bump release date;
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbc committed Jul 22, 2024
1 parent f3684d0 commit 44af32c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Changelog

## [0.9.0] - 2024-07-10
## [0.9.0] - 2024-07-22

### Changed
- Composite archive now loaded from data_store package (reduces deployment footprint)
- data_store package provides the PynamoDB model BinaryLargeObject and a wrapper
that class that provides manages the blob storage with S3.

### Added
- new cli script for uploading CompositeSolution archives
- a cli script for uploading CompositeSolution archives

## [0.8.7] - 2024-07-04
### Changed
Expand Down
1 change: 0 additions & 1 deletion data_store/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ def get(
cls,
object_type: str,
object_id: str,
# hash_key: Any,
range_key: Optional[Any] = None,
consistent_read: bool = False,
attributes_to_get: Optional[Sequence[str]] = None,
Expand Down
32 changes: 12 additions & 20 deletions solvis_graphql_api/scripts/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
import solvis
from solvis.inversion_solution.inversion_solution import BranchInversionSolution, InversionSolution

# DEPLOYMENT_STAGE = os.getenv('DEPLOYMENT_STAGE', 'LOCAL').upper()
# REGION = os.getenv('REGION', 'ap-southeast-2') # SYDNEY

log = logging.getLogger()
# logging.basicConfig(level=logging.INFO)
logging.getLogger('data_store.model').setLevel(logging.DEBUG)
logging.getLogger('botocore').setLevel(logging.INFO)

Expand Down Expand Up @@ -64,22 +60,18 @@ def cli(archive, model_id, ensure_table, read_back):
click.echo(f'archive: {archive}')
click.echo(f'model : {model_id}')

# if ensure_table:
# log.debug(f'creds {s3_client_args}')

# # _s3 = boto3.resource('s3', region_name=REGION, client=)
# # _s3.create_bucket(Bucket=S3_BUCKET_NAME)
# try:
# s3_client = boto3.client('s3', **s3_client_args)
# res = s3_client.create_bucket(Bucket=S3_BUCKET_NAME)
# log.info(res)
# except (botocore.exceptions.ClientError) as err:
# pass

# click.echo("bucket created")
# if not data_store.model.BinaryLargeObject.exists():
# data_store.model.BinaryLargeObject.create_table()
# click.echo("created table")
if ensure_table:
log.debug(f'creds {s3_client_args}')
if not data_store.model.BinaryLargeObject.exists():
data_store.model.BinaryLargeObject.create_table()
click.echo("created table")
# try:
# s3_client = boto3.client('s3', **s3_client_args)
# res = s3_client.create_bucket(Bucket=S3_BUCKET_NAME)
# log.info(res)
# click.echo("bucket created")
# except (botocore.exceptions.ClientError) as err:
# pass

model = nm.get_model_version(model_id)
solution = solvis.CompositeSolution.from_archive(archive, model.source_logic_tree)
Expand Down

0 comments on commit 44af32c

Please sign in to comment.