Closed mesozoic closed 10 months ago
Merging #311 (1bbaad6) into main (308c269) will increase coverage by
3.49%
. Report is 2 commits behind head on main. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #311 +/- ##
==========================================
+ Coverage 96.11% 99.60% +3.49%
==========================================
Files 21 24 +3
Lines 1157 1791 +634
==========================================
+ Hits 1112 1784 +672
+ Misses 45 7 -38
Files | Coverage Δ | |
---|---|---|
pyairtable/__init__.py | 100.00% <100.00%> (ø) |
|
pyairtable/_compat.py | 100.00% <ø> (+37.50%) |
:arrow_up: |
pyairtable/api/api.py | 100.00% <100.00%> (+2.43%) |
:arrow_up: |
pyairtable/api/base.py | 100.00% <100.00%> (+12.19%) |
:arrow_up: |
pyairtable/api/enterprise.py | 100.00% <100.00%> (ø) |
|
pyairtable/api/params.py | 100.00% <ø> (ø) |
|
pyairtable/api/retrying.py | 100.00% <ø> (ø) |
|
pyairtable/api/table.py | 100.00% <100.00%> (+1.83%) |
:arrow_up: |
pyairtable/api/types.py | 100.00% <ø> (ø) |
|
pyairtable/api/workspace.py | 100.00% <100.00%> (ø) |
|
... and 10 more |
This branch builds upon the
AirtableModel
base class (see #282) to add support for base, table, and field metadata. It supports reading many common metadata endpoints (though not all yet).This branch has limited support for making schema changes: it exposes APIs which accept raw
dict
data structures, but does not validate the input or offer a clean way to construct complex schema changes in-memory. Such support could be added in future, but it seemed unnecessary for now because the API will reject invalid values and their construction is straightforward.New API endpoints and classes introduced:
Api.bases()
Api.create_base()
Api.enterprise()
Api.workspace()
Base.collaborators()
Base.create_table()
Base.delete()
Base.name
Base.schema()
Base.shares()
Base.tables()
Enterprise
Enterprise.group()
Enterprise.info()
Enterprise.user()
Enterprise.users()
Table.create_field()
Table.id
Table.schema()
Workspace
Workspace.bases()
Workspace.collaborators()
Workspace.create_base()
Workspace.delete()
Workspace.move_base()
Workspace.name
There are quite a few new classes introduced in
pyairtable.models.schema
that I won't enumerate here. The API documentation generated for the pull request lists them all in detail.Other changes:
@enterprise_only
decorator that will annotate API error responses with a warning to developers that the error is likely due to not having an enterprise plan. Airtable does not appear to return a specific error code for that; instead, it returns either a 403 or a 404, depending on the circumstance.pyairtable.metadata
module.coverage
so we can inch closer to 100%.Breakdown of commits:
aiText
(see #310)Base.shares()
Base.tables()
from adict
to alist
, for simplicityFieldSchema.save()
andTableSchema.save()
for changing names and descriptionsBase.delete()
andWorkspace.delete()
Workspace.move_base()
Resolves #208, resolves #235, resolves #237.