Skip to content

Commit 41da37a

Browse files
committed
Resolve todos and add local_data to clean command
1 parent 29676fe commit 41da37a

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ clean: ## Clean the temporary files.
1212
rm -rf .pytest_cache
1313
rm -rf tests/__pycache__
1414
rm -rf .coverage
15+
rm -rf local_data
1516

1617
.PHONY: black-check
1718
black-check: ## Run black for code formatting, without fixing.

docs/configuration.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,13 @@ This section contains feature flags that control which of the tool's features ar
2121

2222
#### `show_log_locally`
2323

24-
TODO: Confirm this section
25-
If set to `true`, the tool will output logs to a `debug.log` file at the root of the project directory. This is useful for debugging purposes. If set to `false`, logs will not be saved locally.
24+
If set to `true`, the tool will output logs to the terminal.
2625

2726
When deploying to AWS, this should be set to `false` to avoid files being written to the local filesystem.
2827

2928
#### `write_data_locally`
3029

31-
TODO: Update this section
32-
If set to `true`, the tool will use the local configuration file (`config.json`) for its settings (overriding any cloud configuration). If set to `false`, the tool will fetch the configuration from the cloud (S3 bucket).
30+
If set to `true`, the tool will skip writing to S3 and instead write data for copilot teams, historic usage, and teams history to `local_data`.
3331

3432
**When deploying to AWS, this must be set to `false` to ensure the tool writes to AWS.**
3533

@@ -48,9 +46,6 @@ When testing locally, you might set the `config.json` file as follows:
4846
}
4947
```
5048

51-
TODO: Confirm
52-
This will ensure that the local configuration is used, logs are saved to `debug.log`, and no notifications are created during testing.
53-
5449
### Example On AWS
5550

5651
When deploying to AWS, the `config.json` file should be set as follows:
@@ -64,6 +59,6 @@ When deploying to AWS, the `config.json` file should be set as follows:
6459
}
6560
```
6661

67-
This configuration ensures that the tool does not log or write data locally
62+
This configuration ensures that the tool does not log or write data locally.
6863

6964
**It is essential that `write_data_locally` is set to `false` when deploying to AWS.**

src/main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,13 @@ def create_dictionary(
267267
return list(existing_team_data_map.values())
268268

269269

270-
# TODO: refactor update_s3_object to accept write_data_locally to handle local writes logic
271270
def update_s3_object(
272271
s3_client: boto3.client,
273272
bucket_name: str,
274273
object_name: str,
275274
data: dict,
276-
write_data_locally: bool = False,
277275
) -> bool:
278-
"""Update an S3 object with new data or write locally based on the flag.
276+
"""Update an S3 object with new data.
279277
280278
Args:
281279
s3_client (boto3.client): The S3 client.

0 commit comments

Comments
 (0)