pyairtable icon indicating copy to clipboard operation
pyairtable copied to clipboard

Roadmap for future releases

Open mesozoic opened this issue 2 years ago • 12 comments

The following is a rough proposal for which features we plan to add to pyAirtable, loosely grouped into releases. Priorities can shift over time, and anyone who wants to see a particular feature implemented faster is welcome to submit pull requests for review. I'm comfortable with the scope of the 1.5.0 and 2.0.0 releases; everything past there is a bit more speculative, but I have proofs of concept for at least some of it.

This document assumes we are using semantic versioning, and that existing APIs can only be broken if there is a major version number change. As such, we may be more cautious about implementing new endpoints (or accepting PRs for new endpoints) if the design of that API merits discussion, because we'll commit to supporting new APIs for at least one major version.

Tagging other recent code contributors for input. @bapcon @goksan @larsakerson @nicohood

1.5 (released May '23)

This release will focus on bug fixes, quick wins, and reducing the open issue count.

  • [x] Documentation typos and fixes (see 197)
  • [x] Implement continuous integration with type checking (see 195, 217, 239, 240, 241, 242)
  • [x] #243
  • [x] #182
  • [x] #250 (see 190)
  • [x] #247 (see 203, 210, 222)
  • [x] #255 (see 209, 216)
  • [x] #194

2.0 (July '23)

This release will be our chance to make any breaking API changes, such as changes to default behavior or return types. We will also implement stricter typing across the library, which might break CI for downstream code that does its own type checking, and support every field type in the ORM.

  • [x] #261
  • [x] #260
  • [x] #262
  • [x] Remove (or fully implement) validate_type= parameter to Field constructor
  • [x] #263 (see 202)
  • [x] Use dataclasses or TypedDict on all return values
  • [x] #251
  • [x] #267
  • [x] #272
  • [x] #273 for Get user ID & scopes
  • [x] #274
  • [x] #277
  • [x] #281
  • [x] #282
  • [x] #268
  • [x] ORM: Support passing LinkField by name (see 176, 200)

2.1

Just a plain ol' feature release.

2.2

Build a sustainable pattern for retrieving with Airtable metadata, which involves a lot of deeply nested object structures.

2.3

3.0

Next major version bump after 2.0 can be for bigger ideas.

  • [x] Revisit the DSL for building Airtable formulas.
  • [x] Command-line interface for retrieving (or modifying?) Airtable data and metadata.
  • [x] Auto-generate ORM models from Airtable base metadata.
  • [ ] Testing utilities for library users to safely mock the pyAirtable API in their own tests.

4.0

Won't do

The following wound up being a lot more work than we'd anticipated.

  • [ ] Run doctests in pyairtable and docs/source on build.

The following seem like uncommon use cases and we'll wait for another contributor to need them.

SCIM is a standard API specification that is already implemented by any vendors which need to support it, so implementing it in pyAirtable doesn't seem like a priority.

mesozoic avatar May 03 '23 00:05 mesozoic

Thanks for putting this together @mesozoic; this looks like a great plan.

Would 2.x be a good time to also move ORM package out of experimental and make it officially supported?

Auto-generate ORM models from Airtable base metadata 😍

gtalarico avatar May 03 '23 04:05 gtalarico

Would 2.x be a good time to also move ORM package out of experimental and make it officially supported?

Totally! Though guessing from the comments, it seems like plenty of folks are using it already, supported or otherwise 😁 so I'm still inclined to do a major version bump before changing the semantics, return types, etc.

mesozoic avatar May 03 '23 05:05 mesozoic

I am so hyped for test-related features in 3.0.0 😍

walkingpendulum avatar May 07 '23 14:05 walkingpendulum

I am so hyped for test-related features in 3.0.0 😍

Great! Can you share a bit more about your use case (or existing solutions) to help inform what direction we take it?

mesozoic avatar May 08 '23 21:05 mesozoic

we have dozen of tables, couple of them having up to 200 fields, most of which are lookups, rollups and formulas.

major issues with Airtable development, exploitation and testing:

  • no table-schema-as-a-code. people mess up with field names in UI and it break our python scripts and JS automations. things get worse when link field is renamed, it breaks all the downstream lookups and rollups. we are also continuously discovering and fixing discrepancies between table schemes jn prod and dev tables
  • generally we prefer stubs to mocks in tests. for example, we spin MongoDB, RabbitMQ, and Moto (as a drop-in replacement for s3) containers in tests. this approach is not working for pyairtable, there is no stub for Airtable rest api available. which is really inconvenient, because our typical unit of logic deals with 5-10 fields, most of which are lookups and rollups (this is why I am also happy for close ORM features release), and it is a nightmare to mock, test and assert
  • ORM mode (soon to be released) will cone very handy. as I mentioned, there are tons of lookups and rollups, which lead to spaghetti code without ORM mode

walkingpendulum avatar May 12 '23 11:05 walkingpendulum

@walkingpendulum Your use case sounds pretty complicated! So far we've avoided the field name issues by locking down Creator privileges for the bases where we've built a lot of heavy integrations. Sounds like that might not be feasible for you.

We haven't really come up with a great solution to testing; we have a minimal "fake Airtable" that mocks out the API's basic behaviors in-memory, and for integration testing we have a "partitioning shim" that injects some extra formulas/fields into every API call so that multiple test runners can operate on a single base without interfering w/ each other (as long as there's a text field where they can store a unique ID per test run). Both are utilities we'd like to move from our repos into upstream.

mesozoic avatar May 14 '23 23:05 mesozoic

hello, guys! it's been a long time :)

I'd like to touch base on the 3.0 feature "Testing utilities for library users to safely mock the pyAirtable API in their own tests". do you still aim for it? I am as hyped to see it as I was a year ago.

also - great job done! we have moved from one-fits-all connector component that isolates AT API calls to ad-hoc pyairtable calls, because we realized how simple and powerful pyairtable is, and never looked back. thank you for your work.

walkingpendulum avatar Feb 18 '24 19:02 walkingpendulum

@walkingpendulum I'd still like to move what we have upstream at some point, but it's not a high priority at the moment. I'm glad some of the other improvements to the library have worked out for you!

mesozoic avatar Apr 16 '24 03:04 mesozoic

Is it possible for Table.all() functions to return the label/value of a Lookup field as well as the record id? (This is all dynamic and I can not use the ORM)

acmeguy avatar May 11 '24 07:05 acmeguy

Is it possible to enable passing parameters to the underlying request implementation when creating the Api(token) instance? For example, I need to pass in a path to a pem file. With the requests library, I do this with a verify=path_to_pem parameter.

d717an avatar May 23 '24 16:05 d717an