Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,36 @@ 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
run: python scripts_report_method_test_coverage.py

- 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
58 changes: 45 additions & 13 deletions merit_api/reports/method_test_coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` | ❌ | — |
Loading