Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
606 commits
Select commit Hold shift + click to select a range
c2e7816
Removed module-level docstrings
bfoley12 Jun 15, 2026
52b504d
Setup app to use aioboto3 and load defaults from env
bfoley12 Jun 15, 2026
1072f87
Added dependencies for boto and S3
bfoley12 Jun 16, 2026
0f47dcd
Changed filename to authz to clarify that it is authorization
bfoley12 Jun 16, 2026
2895bb4
Added S3Dep and s3 reliance to download methods; modified auth import…
bfoley12 Jun 16, 2026
c492b89
Updated auth import to authz
bfoley12 Jun 16, 2026
7b42af3
Uncommented kong in settings
bfoley12 Jun 16, 2026
463d913
Modified S3Dep to return the client rather than a generator; moved ke…
bfoley12 Jun 16, 2026
8aef24c
Removed kong settings, since they are unused
bfoley12 Jun 17, 2026
fa2a4f7
Made a shared ComponentService to ensure deletion only occurs when no…
bfoley12 Jun 17, 2026
5593c2b
Added .claude/ to gitignore
bfoley12 Jun 17, 2026
93c4e93
Moved component repo and service logic into a shared service. Compone…
bfoley12 Jun 17, 2026
787a034
Added download tests, removed config test raising on creating Setting…
bfoley12 Jun 17, 2026
6b899f0
Reverted non-API changes to master versions
bfoley12 Jun 17, 2026
eecb716
upgrade dependencies for deployment
invalid-email-address Jun 2, 2026
89b12dc
Infra changes for rewrite
bfoley12 Jun 4, 2026
ce1d7a2
Stop tracking .claude/ directory
bfoley12 Jun 17, 2026
b5803c7
Revert changes to deployment of other submodules
bfoley12 Jun 17, 2026
82df4e7
Switched to standard docker image. Allows decoupling python versions …
bfoley12 Jun 18, 2026
753b233
Improved OTel instrumentation. Removed ddtrace references
bfoley12 Jun 18, 2026
52f3e55
Fixed uv build wheel building from old directory style
bfoley12 Jun 18, 2026
a3759d6
Added dependencies to routes that require users to be logged in
bfoley12 Jun 18, 2026
9e81230
Requests to contributions or their components are now scoped by the u…
bfoley12 Jun 18, 2026
a925345
Enforce contribution-scoped components at service level
bfoley12 Jun 18, 2026
d3ed0e4
Convert id str to objectid
bfoley12 Jun 18, 2026
1316cbd
Readded start_rq so supervisord doesnt fail
bfoley12 Jun 18, 2026
0b80821
Moved kwargs to new spec
bfoley12 Jun 18, 2026
3670041
Changed example kwargs to new specs
bfoley12 Jun 18, 2026
8c43253
Added back n start_rq.sh so build succeeds
bfoley12 Jun 18, 2026
983e5ee
Added lines to ignore build artifacts
bfoley12 Jun 18, 2026
236ecca
Modernized claude.md
bfoley12 Jun 18, 2026
16eb499
Pointed setuptools at the right repo - src
bfoley12 Jun 18, 2026
fd5ff41
Added and fixed tests
bfoley12 Jun 18, 2026
bf198ff
Formatting
bfoley12 Jun 18, 2026
e4a265b
Removing accidental commit of build artifacts
bfoley12 Jun 18, 2026
2eddd46
Unified deletion behavior by moving BaseDocumentWithInput to inherit …
bfoley12 Jun 18, 2026
939272c
Upsert now functions like bulk insert, allowing upserts to fail and r…
bfoley12 Jun 18, 2026
06bae18
Improved sensitivity of dict key validation
bfoley12 Jun 18, 2026
0e6031c
Simplified md5 check and improved patch_component_by_id
bfoley12 Jun 18, 2026
88cb475
Added a constant for how to handle encoding of polars.DataFrames to h…
bfoley12 Jun 18, 2026
eec7198
Improved dataframe handling to read and write dataframes
bfoley12 Jun 18, 2026
cdc7ad3
Made ComponentIn to clarify and unify input schema from storage schema
bfoley12 Jun 18, 2026
2721286
Modified tests to account for new handling
bfoley12 Jun 18, 2026
a4e3371
Added ty for typechecking
bfoley12 Jun 22, 2026
f78a402
Removed ty - not mature enough
bfoley12 Jun 22, 2026
05bf510
Changed docstring, imports, and added polars dep
bfoley12 Jun 22, 2026
2c79416
Commented out unused dependencies
bfoley12 Jun 23, 2026
2c7f9c9
Added custom Access logging in line with previous format.
bfoley12 Jun 24, 2026
8a7650e
pass exc_info through to logger on upsert error
bfoley12 Jun 24, 2026
811017f
Added log_level to errors
bfoley12 Jun 24, 2026
1c8b4f1
Moved healthcheck router to healthcheck instead of health
bfoley12 Jun 24, 2026
a295e27
Added 'version' to healthcheck for backwards compat
bfoley12 Jun 24, 2026
11f04e7
Added user to contribution service and threaded user into repo to che…
bfoley12 Jun 25, 2026
c4fc4ed
Added tests for user-contribution validation and modified healthcheck…
bfoley12 Jun 25, 2026
c7724a7
Brought user group checking logic onto user
bfoley12 Jun 25, 2026
0b4513c
Added redirects for old endpoints to their corresponding new ones, an…
bfoley12 Jun 25, 2026
6cbc276
Added libsnappy back for snappy compression
bfoley12 Jun 25, 2026
534d2c4
Added supervisor and python-snappy to deps
bfoley12 Jun 25, 2026
dcb2d98
Made the uv sync no-editable so .pth doesn't cause an error referenci…
bfoley12 Jun 25, 2026
2806d66
Added --workers parameterization
bfoley12 Jun 25, 2026
7293b63
Brought supervisor up to current use practices
bfoley12 Jun 25, 2026
681c741
Moved log headers into access log specification to avoid duplication …
bfoley12 Jun 25, 2026
91b9eda
Added jinja2 back to dependencies and sorted deps
bfoley12 Jun 26, 2026
bd7f811
Build uv venv outside of app so dependencies load properly
bfoley12 Jun 26, 2026
9c4fa9c
Fixed env var names to match new format
bfoley12 Jun 26, 2026
3e3974f
Added shared BaseFilter to convert from Beanie's aliased 'id' to real…
bfoley12 Jun 29, 2026
6792339
Pagination cursor pads b64 encoded cursor to safely decode
bfoley12 Jun 29, 2026
e9b2307
Removed response_model from router 'get_*' methods since that would o…
bfoley12 Jun 29, 2026
b21cef3
Contributions are now versioned. The server derives integer versions …
bfoley12 Jun 30, 2026
d37e82a
Added model and router to expose limits that well-behaved clients sho…
bfoley12 Jul 1, 2026
91430ba
Added custom exceptions and middleware to immediately detect oversize…
bfoley12 Jul 1, 2026
4f90230
Implementing limits endpoint, new exceptions & middleware, and added …
bfoley12 Jul 1, 2026
c41bab2
Added docstrings to Contribution classes
bfoley12 Jul 9, 2026
860b684
Changed default needs_build to False and removed from ContributionBas…
bfoley12 Jul 9, 2026
d65a5a2
Added deprecation annotations to needs_build
bfoley12 Jul 9, 2026
0360aa7
Added is_public=False to ContributionBase and ContributionPatch
bfoley12 Jul 9, 2026
e1b4103
Removed needs_build from ContributionOut.default_fields() and from Co…
bfoley12 Jul 9, 2026
e8b8b23
Removed user from Contribution repository since the authz is handled …
bfoley12 Jul 9, 2026
e35d6a2
Added manual specfication of username and groups when in dev context
bfoley12 Jul 13, 2026
4f9d4a8
Removed outdated tests
bfoley12 Jul 14, 2026
124b983
Removed unnecessary generic specification
bfoley12 Jul 14, 2026
beabcd6
Added DownloadError and default case to _shared/repo for downloads
bfoley12 Jul 14, 2026
d4c3158
StructurePatch requires all non-name fields specified for an update a…
bfoley12 Jul 14, 2026
1b72f07
Removed dead code
bfoley12 Jul 14, 2026
a9af194
Merge pull request #2071 from materialsproject/fastapi-conversion
bfoley12 Jul 15, 2026
6fcf82e
Ruff formatting and checking
bfoley12 Jun 1, 2026
767bc9c
Infra changes for rewrite
bfoley12 Jun 4, 2026
9cd35cb
upgrade dependencies for deployment
invalid-email-address Jun 2, 2026
70d7950
Revert changes to deployment of other submodules
bfoley12 Jun 17, 2026
5860ae0
Added Project.category to group together logically connected projects
bfoley12 Jun 24, 2026
e64f2f2
Removed stale 'old' directory
bfoley12 Jul 15, 2026
da7af78
Added custom str types to help with str validation (originally from c…
bfoley12 Jul 15, 2026
d47cb79
Generalized _shared/repo methods over model-defined identifiers
bfoley12 Jul 15, 2026
b136c41
Created ProjectGroups to model collections of projects
bfoley12 Jul 15, 2026
cc5cc16
Added project_groups service to coordinate manipulation of projects w…
bfoley12 Jul 16, 2026
91055fa
Created ProjectGroupServiceDep
bfoley12 Jul 16, 2026
a4a4188
Added logic for manipulation of group membership of projects
bfoley12 Jul 16, 2026
e5d715d
Added routes for individual project group operations
bfoley12 Jul 16, 2026
7b6400d
Added tests
bfoley12 Jul 16, 2026
376037e
Added __contains filter operator
bfoley12 Jul 16, 2026
38cf31f
Renamed 'category' to 'tags' for clearer terminology
bfoley12 Jul 16, 2026
859f017
Formatting
bfoley12 Jul 16, 2026
4aba4fd
Added is_public field to ProjectGroup models and fixed scope
bfoley12 Jul 16, 2026
cec41ad
ProjectGroup converts from input model and ProjectGroupIn has proper …
bfoley12 Jul 16, 2026
76fb5d3
Resolved issue where POST/PUT did not return a document with server-d…
bfoley12 Jul 16, 2026
b040ad0
Improved error catching on _shared/repo insert_one
bfoley12 Jul 16, 2026
0355ea5
Improved index structure: unique key is now minimal
bfoley12 Jul 16, 2026
0a7a2ff
Added tests for project-group duplication
bfoley12 Jul 16, 2026
6258968
Made inserting ProjectGroups a service-level concern by requiring tha…
bfoley12 Jul 16, 2026
ff4ba2c
Added settings for controlling initiative permissions
bfoley12 Jul 16, 2026
66a784e
Added flexibility to roles, allowing prefixing with resource
bfoley12 Jul 16, 2026
1d1b71a
Added Initiative domain, for a canonical grouping of projects (ie ALab)
bfoley12 Jul 16, 2026
2d1c361
Added initiative as a field on models and implemented logic for manag…
bfoley12 Jul 16, 2026
aced4c1
Removed user from repo fields
bfoley12 Jul 17, 2026
ccfd1f9
Automatically set caller as owner of ProjectGroup on Insert
bfoley12 Jul 17, 2026
b4ff3b0
Require users inserting components to have at least one project assig…
bfoley12 Jul 17, 2026
4e175e7
require_writer requires a user have at least one project assigned to …
bfoley12 Jul 17, 2026
5fe29d3
Added parsing user roles for project-group:<oid> strings
bfoley12 Jul 17, 2026
bd8ac13
Improved handling of user roles and permissions along with informativ…
bfoley12 Jul 17, 2026
4db1894
Initatives and ProjectGroup testing
bfoley12 Jul 17, 2026
6c1b1d3
Added mp_category for MP defined categories. Improve ProjectIn to exc…
bfoley12 Jul 17, 2026
e3c3f16
Exclude server-managed fields from patching
bfoley12 Jul 17, 2026
20961e7
Syncing tests with new Project models and methods
bfoley12 Jul 17, 2026
975fe9d
Switched tags to be SearchStr to improve usability
bfoley12 Jul 17, 2026
22207a9
Tests for tags as SearchStr
bfoley12 Jul 17, 2026
fbe2a5e
Fixed bug in role parsing resulting in improper roles
bfoley12 Jul 17, 2026
47eec4f
Removed requirements/
bfoley12 Jul 17, 2026
e6a648b
Undid non-mpcontribs-api changes
bfoley12 Jul 17, 2026
6b24b35
Removed .claude
bfoley12 Jul 17, 2026
54229cd
Synced start.sh with dev
bfoley12 Jul 17, 2026
77cc809
Moved Slug type into types.py
bfoley12 Jul 17, 2026
48a9112
Added quota settings to config
bfoley12 Jun 22, 2026
8550193
Added check for max_projects in upsert_project_by_id and insert_project
bfoley12 Jun 23, 2026
de5ff4a
Added check for column length onto Project and ProjectPatch models
bfoley12 Jun 23, 2026
391f0f1
Added unapproved contribution limits
bfoley12 Jun 24, 2026
d91c870
Added tests
bfoley12 Jun 24, 2026
81f79e3
Added logging for insert event exceeding unapproved contribution limits
bfoley12 Jun 24, 2026
1b68664
Test that going over unapproved contribution limit emits a log
bfoley12 Jun 24, 2026
3959f2c
Reimplemented the contribution quota handling.
bfoley12 Jul 20, 2026
0c80fa8
Fixed N+1 projects being allowed
bfoley12 Jul 20, 2026
94d2506
Legacy docs that exceed current column limits are able to be returned…
bfoley12 Jul 22, 2026
4927a84
Fixed bug where users could insert a contribution into a project they…
bfoley12 Jul 22, 2026
b09ad55
Added comments denoting potentials for race-conditions exceeding quot…
bfoley12 Jul 23, 2026
932d11f
Added models and logic to support updates of Contributions and Contri…
bfoley12 Jul 23, 2026
54e1882
Refactored project models and updated repo and tests to respect new f…
bfoley12 Jul 23, 2026
c69efca
Updated references to old 'patch_pivot_row' to 'update_contribution_b…
bfoley12 Jul 23, 2026
9beef12
Fixed bug where inserting a document via upsert_contribution_by_id ca…
bfoley12 Jul 23, 2026
03f6d56
Added can_write check on upsert_contribution_by_id to prevent user fr…
bfoley12 Jul 23, 2026
4d52ead
Removed display and added precision to Contribution.data leaves. Also…
bfoley12 Jul 24, 2026
8207cf7
Extracted Contributions.data specific functions to contributions/data
bfoley12 Jul 24, 2026
5d0a4b9
Updated tests to reference contributions/data
bfoley12 Jul 24, 2026
aa00697
Only add input_* fields to leaf if we modified fields from their inpu…
bfoley12 Jul 24, 2026
60f3686
Implemented user-defined 'unique_value' to deduplicate contributions …
bfoley12 Jul 27, 2026
f019918
Created 'Identity' to unify Contribution identity handling logic
bfoley12 Jul 27, 2026
60e61b0
Added validation to contribution id fields
bfoley12 Jul 27, 2026
466aff7
Contribution identifiers now follow a hierarchy (chem_sys_id < formul…
bfoley12 Jul 27, 2026
d9fef19
Ignore build dirs from basedpyright
bfoley12 Jul 27, 2026
5f861d2
Extracted identifier hierarchy check to Identity
bfoley12 Jul 27, 2026
d3a640e
Caught error in contribution/repositry:update_contribution_by_id wher…
bfoley12 Jul 27, 2026
36fb5cc
Removed unused find_one_contribution method and associated tests
bfoley12 Jul 27, 2026
c07a934
Catch DuplicateKeyErrors in bulk scenarios
bfoley12 Jul 27, 2026
d514e2e
Added HIERARCHY_FIELDS to Identity and removed unused from_/to_tuple …
bfoley12 Jul 27, 2026
27d03b6
Set Project.owner to the caller that created the Project
bfoley12 Jul 27, 2026
e6212f7
_fields arguments in routers now accept None (default fields), [] (id…
bfoley12 Jul 28, 2026
644b6a5
Encoded Structure.lattice.matrix as a 3x3 matrix rather than a polars…
bfoley12 Jul 28, 2026
73acc5e
Removed 'needs_build' from Contributions
bfoley12 Jul 28, 2026
fab2f2b
Added BulkUpdateSummary to handle the bulk update of Contributions, w…
bfoley12 Jul 28, 2026
a17069c
Restored out-of-scope diffs to origin/dev
bfoley12 Jul 28, 2026
f28bd77
Merged dev into this branch to fix merge conflicts
bfoley12 Jul 30, 2026
0b410dd
Renamed UserSettings to QuotaSettings to better reflect intent
bfoley12 Jul 30, 2026
fbbb649
Added dependency for admin users
bfoley12 Jul 30, 2026
acc2b8d
Removed __future__ annotations imports
bfoley12 Jul 31, 2026
c76a5ef
feat(Consumer): consumer is used to define mpcontribs user-specific c…
bfoley12 Jul 31, 2026
88fcce0
refactor(Implement-Consumer): wiring Consumer throughout code, replac…
bfoley12 Jul 31, 2026
a28a6d8
build(commitizen): tooling to use commitizen
bfoley12 Jul 31, 2026
f4fc003
test(Consumer-tests): added tests for consumer and modified tests to …
bfoley12 Jul 31, 2026
a5ffdba
test(conftest-edits): added autouse and scope to conftests
bfoley12 Jul 31, 2026
02f0034
docs(consumer-filter): changed prefix to reflect the right model
bfoley12 Jul 31, 2026
4294c0c
perf(MongoDbContributionRepository): removed _id from projection in i…
bfoley12 Aug 3, 2026
aaebd0a
perf(ContributionService): removed duplicate logging of exceeding quo…
bfoley12 Aug 3, 2026
bc3de1e
style(check_column_limit): renamed check_column_limit -> validate_col…
bfoley12 Aug 3, 2026
08126db
docs(ContributionService-and-authz): corrected documentation of logs …
bfoley12 Aug 3, 2026
f7341c4
Merge pull request #2115 from materialsproject/quota-limits
bfoley12 Aug 3, 2026
c5f1274
build(deployments.txt): restored deployments.txt from submodules to t…
bfoley12 Aug 3, 2026
bb1dcd5
Merge remote-tracking branch 'origin/dev' into api-server-ci
bfoley12 Aug 3, 2026
c70bb45
build(uv.lock): sync with new pyproject.toml
bfoley12 Aug 3, 2026
4198628
ci(.github/workflows): added 'smart' ci for submodules on a new tool …
bfoley12 Aug 4, 2026
2cb90b6
merge: 'origin/master' into dev
bfoley12 Aug 4, 2026
969c803
ci(ci.yml): removed both push pull_request ci steps from running when…
bfoley12 Aug 4, 2026
12b229a
Merge pull request #2079 from materialsproject/api-server-ci
bfoley12 Aug 4, 2026
9f16b0d
test(test_healthcheck): fixed 'test_body_reports_healthy" test versio…
bfoley12 Aug 4, 2026
1c982e5
docs(main.py): silenced basedpyright warning of proper boto3 client u…
bfoley12 Aug 4, 2026
35a1c2a
ci(testing.yml): testing.yml no longer runs on mpcontribs-api, since …
bfoley12 Aug 4, 2026
8ebd82c
ci(rulesets): added json ruleset specs to protect dev and master
bfoley12 Aug 5, 2026
9c31f06
Merge pull request #2122 from materialsproject/old-ci-fixes
bfoley12 Aug 5, 2026
4ecedc5
fix(ContributionBase): added `version` to identifier_fields
bfoley12 Aug 5, 2026
e5457e6
docs(InitiativeRepository): modified documentation
bfoley12 Aug 5, 2026
4f38f9d
refactor(MongoDbRepository): unified patching logic and removed _reso…
bfoley12 Aug 5, 2026
296dafc
refactor(MongoDbProjectRepository): deduplicated patch logic
bfoley12 Aug 5, 2026
3a14ca2
test(tests): removed unnecessary tests and corrected test that checks…
bfoley12 Aug 5, 2026
b6f0d34
refactor(MongoDbRepository): removed useless abstraction of NotFoundE…
bfoley12 Aug 5, 2026
96d1842
feat(types): materialid now accepts both alphaid and mpid formats - n…
bfoley12 Aug 12, 2026
c3f5a40
perf(types): chemical system ids now normalize tokens to first char u…
bfoley12 Aug 13, 2026
ebc371c
perf(Formula): formulas now accept fractional subscripts
bfoley12 Aug 13, 2026
5006178
perf(BulkFailure): creating a bulkfailure now automatically emits an …
bfoley12 Aug 13, 2026
2dc81c5
refactor(Identity): moved identity to be a shared type and abstract l…
bfoley12 Aug 14, 2026
400c96d
Merge remote-tracking branch 'origin/dev' into contribution-identifiers
bfoley12 Aug 14, 2026
410c72a
refactor(Identity): moved check_hierarchy() from Identity to Contribu…
bfoley12 Aug 14, 2026
939a2a0
refactor(ContributionIn): renamed identifiers -> identity_dict to cla…
bfoley12 Aug 14, 2026
47fe799
Merge pull request #2116 from materialsproject/contribution-identifiers
bfoley12 Aug 14, 2026
723c00b
Merge remote-tracking branch 'origin/dev' into contrib-data-handling
bfoley12 Aug 14, 2026
304a355
refactor(ContributionService): removed _partition_bulk_write_error an…
bfoley12 Aug 14, 2026
8ee1848
feat(Identity): added 'model_fields' method to return a frozenset of …
bfoley12 Aug 17, 2026
a9b75be
feat(BulkUpdateSummary): added 'failed' field to track failures durin…
bfoley12 Aug 17, 2026
41191a9
refactor(consumers/router.py): moved default fields for get methods i…
bfoley12 Aug 17, 2026
d911e2c
refactor(units.py): renamed 'AnnotatedData' to 'QuantityLeaf' to clar…
bfoley12 Aug 17, 2026
69d975c
refactor(QuantityLeaf): further consolidated leaf-related logic
bfoley12 Aug 17, 2026
7069e1d
refactor(contributions/models.py): added project filters to Contribut…
bfoley12 Aug 17, 2026
1f97112
refactor(pivot.py-and-stats.py): use QuantityLeaf
bfoley12 Aug 17, 2026
b4652d9
refactor(ContributionMongoDbRepository): patching Contribution.data d…
bfoley12 Aug 17, 2026
a0c2c58
refactor(ContributionRouter): wiring in changes to patching contribut…
bfoley12 Aug 17, 2026
4db3ac3
feat(ContributionService): service-level changes to allow for non-des…
bfoley12 Aug 17, 2026
1a150f6
test(tests): tests for Contribution and unit.py refactors
bfoley12 Aug 17, 2026
aaffc32
docs(_shared/filters.py): Removed verbose docstrings
bfoley12 Aug 17, 2026
dbe2a09
refactor(ContributionStoredData): made a type alias for Contribution.…
bfoley12 Aug 17, 2026
03f483c
docs(contributions/models.py): removed excessive comments
bfoley12 Aug 17, 2026
6182ade
docs(pivot.py): removed reference to old concept of 'version
bfoley12 Aug 17, 2026
2f071d9
refactor(contributions): refactored coercion and handling of data keys
bfoley12 Aug 17, 2026
ab739d1
refactor(MongoDbContributionRepository): refactored how (list_)refern…
bfoley12 Aug 18, 2026
44056c8
docs(ContributionService): reduced verbose docstrings
bfoley12 Aug 18, 2026
55e41f4
refactor(ContributionService): inlined _log_quota_exceeded as it was …
bfoley12 Aug 18, 2026
448e122
build(requirements/): restored requirements to their status on dev
bfoley12 Aug 18, 2026
4e0a47f
docs(ContributionService): finished revising long docstrings
bfoley12 Aug 18, 2026
6debe79
docs(projects/models.py): modified documentation and docstrings
bfoley12 Aug 18, 2026
93dfd8a
test(many): fixed failing tests
bfoley12 Aug 18, 2026
9d9cb2b
Merge pull request #2117 from materialsproject/contrib-data-handling
bfoley12 Aug 18, 2026
ed21335
refactor(multiple): brought logic into higher level classes and simpl…
bfoley12 Aug 18, 2026
518397c
Merge remote-tracking branch 'origin/dev' into project-category
bfoley12 Aug 19, 2026
4f28a5e
build(pyproject.toml): removed commented out packages
bfoley12 Aug 19, 2026
c72dda4
docs(MongoDbRepository): removed some long docstrings
bfoley12 Aug 19, 2026
22ca3d2
refactor(MongoDbContributionRepository): removed redundant subclass-s…
bfoley12 Aug 19, 2026
977672d
refactor(Stats): removed empty() classmethod in favor of idiomatic py…
bfoley12 Aug 19, 2026
d784e0a
refactor(Project): removed repeated class Settings that improperly ov…
bfoley12 Aug 19, 2026
3ed1bc1
refactor(MongoDbProjectRepository): removed patch_project_with_initia…
bfoley12 Aug 19, 2026
5afc70d
refactor(MongoDbRepository): added `extra_sets` as an argument in `pa…
bfoley12 Aug 19, 2026
71b04b1
fix(Initiative): added from_input_model and fixed return type of defa…
bfoley12 Aug 19, 2026
12e5f72
refactor(MongoDbInitiativeRepository): removed `is_visible` asa usele…
bfoley12 Aug 19, 2026
176f222
Merge pull request #2112 from materialsproject/project-category
bfoley12 Aug 19, 2026
065ed6a
Merge remote-tracking branch 'origin' into dev
bfoley12 Aug 19, 2026
04a1fb9
refactor(multiple): unified crud grammar for domains
bfoley12 Aug 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 54 additions & 28 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,56 @@
version: 2
updates:
- package-ecosystem: docker
directory: "/mpcontribs-kernel-gateway"
schedule:
interval: weekly
time: '08:00'
timezone: US/Pacific
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: "/mpcontribs-portal"
schedule:
interval: weekly
time: '08:00'
timezone: US/Pacific
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/mpcontribs-portal"
schedule:
interval: weekly
time: '08:00'
timezone: US/Pacific
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/mpcontribs-api"
schedule:
interval: weekly
time: '08:00'
timezone: US/Pacific
open-pull-requests-limit: 10
# --- GitHub Actions: keep workflow action versions current ---
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
time: "08:00"
timezone: US/Pacific
groups:
actions:
patterns: ["*"]
open-pull-requests-limit: 10

# --- Python via uv: monitors pyproject.toml + uv.lock --------
- package-ecosystem: uv
directory: "/mpcontribs-api"
schedule:
interval: weekly
time: "08:00"
timezone: US/Pacific
groups:
python-minor-patch:
patterns: ["*"]
update-types: ["minor", "patch"]
open-pull-requests-limit: 10

# --- Existing entries ----------------------------------------
- package-ecosystem: docker
directory: "/mpcontribs-kernel-gateway"
schedule:
interval: weekly
time: "08:00"
timezone: US/Pacific
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: "/mpcontribs-portal"
schedule:
interval: weekly
time: "08:00"
timezone: US/Pacific
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/mpcontribs-portal"
schedule:
interval: weekly
time: "08:00"
timezone: US/Pacific
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/mpcontribs-api"
schedule:
interval: weekly
time: "08:00"
timezone: US/Pacific
open-pull-requests-limit: 10
48 changes: 48 additions & 0 deletions .github/rulesets/dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "Protect dev",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"include": ["refs/heads/dev"],
"exclude": []
}
},
"rules": [
{ "type": "deletion" },
{ "type": "non_fast_forward" },
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 0,
"dismiss_stale_reviews_on_push": false,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_review_thread_resolution": false,
"allowed_merge_methods": ["squash", "merge", "rebase"]
}
},
{
"type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": false,
"do_not_enforce_on_create": false,
"required_status_checks": [
{ "context": "ci-success" }
]
}
},
{
"type": "merge_queue",
"parameters": {
"check_response_timeout_minutes": 60,
"grouping_strategy": "ALLGREEN",
"max_entries_to_build": 5,
"max_entries_to_merge": 5,
"merge_method": "SQUASH",
"min_entries_to_merge": 1,
"min_entries_to_merge_wait_minutes": 5
}
}
]
}
48 changes: 48 additions & 0 deletions .github/rulesets/master.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "Protect master",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"include": ["refs/heads/master"],
"exclude": []
}
},
"rules": [
{ "type": "deletion" },
{ "type": "non_fast_forward" },
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 0,
"dismiss_stale_reviews_on_push": false,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_review_thread_resolution": false,
"allowed_merge_methods": ["squash", "merge", "rebase"]
}
},
{
"type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": false,
"do_not_enforce_on_create": false,
"required_status_checks": [
{ "context": "ci-success" }
]
}
},
{
"type": "merge_queue",
"parameters": {
"check_response_timeout_minutes": 60,
"grouping_strategy": "ALLGREEN",
"max_entries_to_build": 5,
"max_entries_to_merge": 5,
"merge_method": "SQUASH",
"min_entries_to_merge": 1,
"min_entries_to_merge_wait_minutes": 5
}
}
]
}
86 changes: 86 additions & 0 deletions .github/workflows/_python_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Reusable CI runner.
#
# The `test` job always runs the suite named by `test-suite`
# The `lint` and `typecheck` jobs only run when `run-quality` is true — the caller
# sets that for pushes/PRs to dev or master, and leaves it false for feature-branch
# pushes (which only get the fast unit suite).
name: _python-ci

on:
workflow_call:
inputs:
package:
description: "Package directory, e.g. mpcontribs-api"
required: true
type: string
python-version:
description: "Override Python version; empty = use the package's .python-version pin"
required: false
type: string
default: ""
test-suite:
description: "Suite passed to `just test <suite>` (e.g. u = unit, all = everything)"
required: false
type: string
default: "u"
run-quality:
description: "Run the lint/format/lock and typecheck gates (dev/master only)"
required: false
type: boolean
default: false

permissions:
contents: read

jobs:
lint:
if: ${{ inputs.run-quality }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.package }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "${{ inputs.package }}/uv.lock"
- uses: extractions/setup-just@v4
- run: uv python install ${{ inputs.python-version }}
- run: just install
- run: just lint
- run: just format-check
- run: just lock-check

typecheck:
if: ${{ inputs.run-quality }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.package }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "${{ inputs.package }}/uv.lock"
- uses: extractions/setup-just@v4
- run: uv python install ${{ inputs.python-version }}
- run: just install
- run: just typecheck

test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.package }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "${{ inputs.package }}/uv.lock"
- uses: extractions/setup-just@v4
- run: uv python install ${{ inputs.python-version }}
- run: just install
- run: just test ${{ inputs.test-suite }}
112 changes: 112 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Adding a package: once it has a uv-based justfile contract (install/lint/
# format-check/typecheck/lock-check/test), add it to BOTH the paths-filter
# `filters` below AND the `config` map in the discover step. Until a package is
# migrated, leave it out - it stays covered by the legacy testing.yml instead.
#
# Gate levels (see the `full` flag in discover):
# - pull_request into dev/master -> unit only (`just test u`), on every push
# - merge_group (PR entered the -> full gate: lint + format + typecheck +
# merge queue via "merge when `just test`. This is the real pre-merge
# ready") gate and runs once, at merge time.
# - push to dev/master (post-merge) -> full gate (safety net).

name: ci

on:
pull_request:
branches: [dev, master]
merge_group:
push:
branches: [dev, master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
discover:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.build.outputs.packages }}
full: ${{ steps.level.outputs.full }}
steps:
- name: Determine gate level
id: level
# "full" = the lint/format/typecheck + whole-suite gate. It runs for
# merge_group (a PR entering the merge queue) and for direct pushes to
# dev/master. A plain pull_request stays unit-only so open-PR pushes are
# cheap; the full suite only fires when the PR is queued to merge.
run: |
if [ "${{ github.event_name }}" = "merge_group" ] \
|| [ "${{ github.ref }}" = "refs/heads/dev" ] \
|| [ "${{ github.ref }}" = "refs/heads/master" ]; then
echo "full=true" >> "$GITHUB_OUTPUT"
else
echo "full=false" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
mpcontribs-api:
- 'mpcontribs-api/**'
- '.github/workflows/ci.yml'
- '.github/workflows/_python_ci.yml'
- name: Build matrix of changed (migrated) packages
id: build
env:
CHANGES: ${{ toJSON(steps.filter.outputs) }}
run: |
# Map of migrated package -> optional python-version override
# ("" = use the package's .python-version pin). Only packages whose
# filter reported a change are emitted into the matrix.
python3 - "$CHANGES" <<'PY' >> "$GITHUB_OUTPUT"
import json, sys
changes = json.loads(sys.argv[1])
config = {
"mpcontribs-api": {"python-version": ""},
# "mpcontribs-client": {"python-version": ""}, # add when migrated
}
include = [
{"package": pkg, **cfg}
for pkg, cfg in config.items()
if changes.get(pkg) == "true"
]
print("packages=" + json.dumps(include))
PY

ci:
needs: discover
if: ${{ needs.discover.outputs.packages != '[]' }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.discover.outputs.packages) }}
uses: ./.github/workflows/_python_ci.yml
with:
package: ${{ matrix.package }}
python-version: ${{ matrix.python-version }}
test-suite: ${{ needs.discover.outputs.full == 'true' && 'all' || 'u' }}
run-quality: ${{ needs.discover.outputs.full == 'true' }}

# Always-reporting aggregate gate. Make ONLY this a required status check
gate:
name: ci-success
if: always()
needs: [discover, ci]
runs-on: ubuntu-latest
steps:
- name: Verify CI result
run: |
result="${{ needs.ci.result }}"
# 'skipped' is success here: it means no migrated package needed checking.
if [ "$result" = "success" ] || [ "$result" = "skipped" ]; then
echo "CI gate passed (ci job: $result)"
exit 0
fi
echo "CI gate failed (ci job: $result)"
exit 1
Loading
Loading