nomic-ai / ts-nomic

Typescript bindings for Atlas
MIT License
5 stars 4 forks source link

feat: allow project_id to be optional in projection class #78

Closed rguo123 closed 2 months ago

rguo123 commented 2 months ago

First pass at making project_id optional in projection class. When fetching anything that requires project_id, check to see if undefined, if so, fetch it from atlas_cloud endpoint.

Needs to be timed with prod deploy of atlas_cloud that introduces this route https://github.com/nomic-ai/atlas_cloud/pull/1812


[!IMPORTANT] Make project_id optional in AtlasProjection, add datasetId() to fetch it if undefined, update methods, add tests, and coordinate with prod deploy.

  • Behavior:
    • Make project_id optional in AtlasProjection class.
    • Add datasetId() method to fetch project_id if undefined.
    • Remove error for missing project_id in constructor.
    • Update getTags(), getTagStatus(), updateTagMask(), and project() to use datasetId().
  • Testing:
    • Add test in project.test.js to verify datasetId() fetches project_id correctly.
  • Misc:
    • Bump version in package.json from 0.11.0 to 0.11.1.
    • Coordinate with prod deploy of atlas_cloud for new route.

This description was created by Ellipsis for 1863ca2507bca92df7c3ba3f828a7ca0a894eb90. It will automatically update as commits are pushed.

RLesser commented 2 months ago

When you merge this in, let's prefix the squashed commit with refactor: or feat:, as we're trying to adhere to semantic versioning