Skip to content

Align with spec-python-projects - #158

Merged
ehanson8 merged 4 commits into
mainfrom
spec-align-2026-07
Sep 3, 2026
Merged

ehanson8 merged 4 commits into
mainfrom
spec-align-2026-07

Conversation

@ehanson8

@ehanson8 ehanson8 commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Purpose and background context

Aligning this repo with our current best practices represented by our Python repo spec

How can a reviewer manually see the effects of these changes?

The updated ECR image was pushed to Stage (Dev1 can't connect to the Data Warehouse) and successfully tested on 2026-09-02, Cloudwatch logs.

Includes new or updated dependencies?

YES

Changes expectations for external applications?

NO

What are the relevant tickets?

  • NA

Code review

  • Code review best practices are documented here and you are encouraged to have a constructive dialogue with your reviewers about their preferences and expectations.

@ehanson8
ehanson8 requested a review from a team as a code owner July 7, 2026 13:28
@ehanson8
ehanson8 force-pushed the spec-align-2026-07 branch 2 times, most recently from e5ea28c to 3545331 Compare July 7, 2026 13:53
@ehanson8
ehanson8 marked this pull request as draft July 7, 2026 15:17
Why these changes are being introduced:
* Aligning this repo with our current best practices represented by spec-python-projects

How this addresses that need:
* Various updates produced by running the /mitlib-spec-align-project skills which were reviewed and successfully tested.

Side effects of this change:
* NA

Relevant ticket(s):
* NA
@ehanson8
ehanson8 marked this pull request as ready for review September 2, 2026 15:26

@ghukill ghukill 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.

Overall, looks great!

Requested one change in the Makefile that was not introduced by this PR, but seems like a good time to make the update.

With that change, approved! My running of a local audit passes as well (with some understandable warnings).

Comment thread patronload/patron.py
patron_dict["OFFICE_ADDRESS"]
if patron_dict["OFFICE_ADDRESS"]
else "NO ADDRESS ON FILE IN DATA WAREHOUSE"
patron_dict["OFFICE_ADDRESS"] or "NO ADDRESS ON FILE IN DATA WAREHOUSE"

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.

I remain kind of impressed how ruff linting will pickup stuff like this. Nice update!

Comment thread Makefile Outdated
@@ -10,85 +10,135 @@ DATETIME:=$(shell date -u +%Y%m%dT%H%M%SZ)
S3_BUCKET:=shared-files-$(shell aws sts get-caller-identity --query "Account" --output text)

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.

I know these code changes didn't introduce this, but I'd propose a change on this line that calls aws CLI.

As I was running make test and make lint, I was getting warnings about my AWS credentials being stale.

If we remove the colon in the assignment, it sounds like it is lazily evaluated (new to me!) and thus doesn't all the aws sts ... command unless the env var is used, which is only used by the make dependencies command.

Updated form:

S3_BUCKET=shared-files-$(shell aws sts get-caller-identity --query "Account" --output text)

I tested with a Makefile command like this:

test-lazy-env-vars:
	echo $(S3_BUCKET)
  • if no credentials set or they are stale, it fails
  • if credentials are present, it works

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, updated!

@ehanson8
ehanson8 requested a review from ghukill September 2, 2026 17:55
@ehanson8
ehanson8 merged commit aa8a1fb into main Sep 3, 2026
5 checks passed
@ehanson8
ehanson8 deleted the spec-align-2026-07 branch September 3, 2026 13:36
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