Skip to content

dev: add mongodb script to count active projects - #4040

Open
marksvc wants to merge 2 commits into
masterfrom
task/mau
Open

dev: add mongodb script to count active projects#4040
marksvc wants to merge 2 commits into
masterfrom
task/mau

Conversation

@marksvc

@marksvc marksvc commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Open in Devin Review


This change is Reviewable

@marksvc
marksvc marked this pull request as draft August 12, 2026 21:43
@marksvc
marksvc deployed to screenshot_diff August 12, 2026 21:51 — with GitHub Actions Active
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.10%. Comparing base (fc2eb4b) to head (a055c2f).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4040   +/-   ##
=======================================
  Coverage   81.10%   81.10%           
=======================================
  Files         661      661           
  Lines       43060    43060           
  Branches     7059     7059           
=======================================
  Hits        34925    34925           
- Misses       6962     6977   +15     
+ Partials     1173     1158   -15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@marksvc
marksvc marked this pull request as ready for review August 12, 2026 21:55

@Nateowami Nateowami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Nateowami made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on marksvc).


mongodb/Projects/annotate-test-project-reasons.py line 1 at r1 (raw file):

#!/usr/bin/env python3

Why python? I understand every language has its positives and negatives, but at least the languages one is most familiar with will be, well, more familiar and easier to reason about. I would prefer not to introduce another language the team has to work with without a good reason (I know there are already like 5 Python files in the project).

@marksvc

marksvc commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

@Nateowami It's because determine-project-metadata.py actually runs on the remote server. It could be written in bash, but Python has XML processing. I suppose we could compile a Deno script and run it on the server, but it feels light and clean to run the Python file.

annotate-test-project-reasons.py was originally part of the same Python script, but I split it out to reduce the amount of code being run on the server. It runs locally, and could be re-written for Deno. Actually, it could even be incorporated into the ActiveProjects.mongodb.js file and handled there. I think I'll do that.

@marksvc
marksvc marked this pull request as draft August 13, 2026 20:57

@Nateowami Nateowami left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's actually a completely fair reason I didn't think of. Though if we can limit it to just the script to be run on the server that's probably preferable.

@Nateowami made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on marksvc).

@github-actions

Copy link
Copy Markdown
Contributor

📸 Screenshot diff deployed! (11 changes)

View the visual diff at: https://pr-4040--sf-screenshot-diffs.netlify.app

The determine- processing could not be moved into the mongodb script
at this time since the DB does not reliably state project visibility.
@marksvc
marksvc marked this pull request as ready for review August 19, 2026 20:00
@marksvc

marksvc commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

I rolled one of the 2 python scripts into the mongodb script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants