From 5ec9d092cd13c315352bd212e5b29a00848b26a6 Mon Sep 17 00:00:00 2001 From: Jaak Laineste Date: Sun, 10 May 2026 19:32:23 +0300 Subject: [PATCH 1/2] ci: run SDK and MCP tests with proper dependencies --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd658b4..d3c52c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,12 +19,12 @@ jobs: with: python-version: '3.10' - - name: Install dependencies + - name: Install SDK dependencies run: | python -m pip install --upgrade pip pip install -e .[dev] - - name: Run tests + - name: Run SDK tests run: pytest -q - name: Regenerate method coverage report @@ -32,3 +32,23 @@ jobs: - name: Ensure coverage report is committed run: git diff --exit-code reports/method_test_coverage.md + + mcp-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install SDK + MCP dependencies + run: | + python -m pip install --upgrade pip + pip install -e ./merit_api + pip install -e ./mcp[dev] + + - name: Run MCP tests + run: pytest -q mcp/tests From 8641370ef8fea81670f1d9452dbdb6f4b3894689 Mon Sep 17 00:00:00 2001 From: Jaak Laineste Date: Sun, 10 May 2026 23:38:28 +0300 Subject: [PATCH 2/2] chore: refresh SDK method coverage report for CI --- merit_api/reports/method_test_coverage.md | 58 ++++++++++++++++++----- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/merit_api/reports/method_test_coverage.md b/merit_api/reports/method_test_coverage.md index 88d354e..cf609cf 100644 --- a/merit_api/reports/method_test_coverage.md +++ b/merit_api/reports/method_test_coverage.md @@ -3,46 +3,78 @@ This report is generated by static inspection of namespace methods and tests. A method is marked covered if tests reference the namespace call or matching `_post` endpoint. -Overall coverage: **18/28 (64.3%)** +Overall coverage: **51/60 (85.0%)** ## Read capabilities -Coverage: **17/17 (100.0%)** +Coverage: **45/46 (97.8%)** | Method | Endpoint | Version | Covered by tests | Evidence | |---|---|---|---|---| | `Assets.get_fixed_assets` | `getfixassets` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Assets.get_locations` | `getfalocations` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Assets.get_responsible_persons` | `getfaresppersons` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Customers.get_groups` | `getcustomergroups` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | | `Customers.get_list` | `getcustomers` | `v1` | ✅ | test_integration_read.py, test_phase0_foundation.py, test_read_methods.py, test_send_invoice.py | -| `Dimensions.get_list` | `dimensionslist` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Dimensions.get_list` | `getdimensions` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Financial.get_accounts` | `getaccounts` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | | `Financial.get_banks` | `getbanks` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | | `Financial.get_costs` | `getcostcenters` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Financial.get_departments` | `getdepartments` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Financial.get_financial_years` | `getaccperiods` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Financial.get_gl_batch` | `getglbatch` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | | `Financial.get_gl_batches` | `getglbatches` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Financial.get_gl_batches_full` | `GetGLBatchesFull` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Financial.get_payment_types` | `getpaymenttypes` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | | `Financial.get_payments` | `getpayments` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | | `Financial.get_projects` | `getprojects` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Inventory.get_locations` | `getlocations` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | | `Inventory.get_movements` | `getinvmovements` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Items.get_groups` | `getitemgroups` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | | `Items.get_list` | `getitems` | `v1` | ✅ | test_integration_read.py, test_read_methods.py, test_send_invoice.py | -| `Purchases.get_invoices` | `getpurchorders` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Pricing.get_discounts` | `getdiscounts` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Pricing.get_price` | `getprice` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Pricing.get_prices` | `getprices` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Purchases.get_invoice` | `getpurchorder` | `v1` | ✅ | test_integration_read.py, test_purchase_invoice_integration.py, test_read_methods.py | +| `Purchases.get_invoices` | `getpurchorders` | `v1` | ✅ | test_integration_read.py, test_purchase_invoice_integration.py, test_read_methods.py | +| `Purchases.get_orders` | `GetPOrders` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `ReferenceData.get_units` | `getunits` | `v1` | ❌ | — | +| `Reports.get_balance` | `getbalancerep` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Reports.get_customer_debts` | `getcustdebtrep` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Reports.get_customer_payments` | `getcustpaymrep` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Reports.get_inventory` | `getinventoryreport` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Reports.get_more_data` | `getmoredata` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Reports.get_profit` | `getprofitrep` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Reports.get_purchases` | `getpurchrep` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Reports.get_sales` | `getsalesrep` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | | `Sales.get_invoice` | `getinvoice` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | -| `Sales.get_invoices` | `getinvoices` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Sales.get_invoices` | `getinvoices` | `v2` | ✅ | test_integration_read.py, test_priority1_integration.py, test_read_methods.py | +| `Sales.get_offer` | `getoffer` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | | `Sales.get_offers` | `getoffers` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Sales.get_recurring_invoice` | `getperinvoice` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Sales.get_recurring_invoice_addresses` | `getpershaddress` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | | `Sales.get_recurring_invoices` | `getperinvoices` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | | `Taxes.get_list` | `gettaxes` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | -| `Vendors.get_list` | `getvendors` | `v1` | ✅ | test_integration_read.py, test_read_methods.py | +| `Vendors.get_groups` | `getvendorgroups` | `v2` | ✅ | test_integration_read.py, test_read_methods.py | +| `Vendors.get_list` | `getvendors` | `v1` | ✅ | test_integration_read.py, test_purchase_invoice_integration.py, test_read_methods.py | ## Write capabilities -Coverage: **1/11 (9.1%)** +Coverage: **6/14 (42.9%)** | Method | Endpoint | Version | Covered by tests | Evidence | |---|---|---|---|---| | `Customers.send` | `sendcustomer` | `v1` | ❌ | — | -| `Dimensions.add` | `adddimensions` | `v2` | ❌ | — | -| `Financial.create_payment` | `createpayment` | `v1` | ❌ | — | -| `Items.add` | `additems` | `v1` | ❌ | — | +| `Dimensions.add` | `senddimensions` | `v2` | ❌ | — | +| `Financial.create_payment` | `sendPaymentV` | `v1` | ✅ | test_purchase_invoice_integration.py | +| `Items.add` | `senditems` | `v2` | ❌ | — | | `Items.update` | `updateitem` | `v1` | ❌ | — | -| `Purchases.send_invoice` | `sendpurchaseinvoice` | `v1` | ❌ | — | +| `Purchases.send_invoice` | `sendpurchinvoice` | `v1` | ✅ | test_purchase_invoice_integration.py | | `Sales.delete_invoice` | `deleteinvoice` | `v1` | ❌ | — | -| `Sales.send_credit_invoice` | `sendcreditinvoice` | `v1` | ❌ | — | -| `Sales.send_invoice` | `sendinvoice` | `v1` | ✅ | test_phase0_foundation.py, test_send_invoice.py | +| `Sales.send_credit_invoice` | `sendinvoice` | `v1` | ✅ | test_phase0_foundation.py, test_priority1_invoice_delivery.py, test_send_invoice.py | +| `Sales.send_invoice` | `sendinvoice` | `v1` | ✅ | test_phase0_foundation.py, test_priority1_invoice_delivery.py, test_send_invoice.py | +| `Sales.send_invoice_by_einvoice` | `sendinvoiceaseinv` | `v2` | ✅ | test_priority1_integration.py, test_priority1_invoice_delivery.py | +| `Sales.send_invoice_by_email` | `sendinvoicebyemail` | `v2` | ✅ | test_priority1_integration.py, test_priority1_invoice_delivery.py | | `Taxes.send` | `sendtax` | `v2` | ❌ | — | | `Vendors.send` | `sendvendor` | `v1` | ❌ | — | +| `Vendors.update` | `updatevendor` | `v2` | ❌ | — |