Repository navigation
chore: finaliza a migração pra uv + corrige drift no src/databasis_mcp - #10
Merged
Merged
Conversation
pyproject.toml e uv.lock commitados (antes existiam só localmente, não versionados). requirements.txt removido — ficava redundante e desatualizado (google-cloud-bigquery>=3.0 vs >=3.41.0 no pyproject). README.md: seção de instalação trocada de pip pra uv sync. Limpeza de lixo acumulado de comandos anteriores: =2.0 (redirect mal interpretado de um uv add sem aspas), main.py (scaffold padrão do uv init, nunca usado), .venv-pip/ (venv antigo criado com python -m venv, substituído pelo .venv do uv). Validado: uv sync roda limpo, src/databasis_mcp importa e registra as 43 tools, server.py da raiz continua com sintaxe válida.
Essa tool (#9) foi adicionada só no server.py monolítico da raiz — o pacote novo em src/databasis_mcp/ ficou com 43 tools em vez de 44. Portada 1:1 pra tools/prefect.py, importando URLS de _app (já existia lá, idêntico ao da raiz).
A tool run_deployment (server.py, commit 22ef7a4) foi adicionada direto em main antes da branch do refactor ser cortada, então nunca chegou no pacote novo — o merge do PR #8 uniu as duas histórias sem conflito textual, mas deixou essa lacuna. Copiada 1:1 pro src/databasis_mcp/tools/prefect.py, junto com _prefect_get (helper que ela usa e que também faltava no pacote).
aspeddro
pushed a commit
to aspeddro/basedosdados-mcp
that referenced
this pull request
Sep 27, 2026
basedosdados#11 landed the per-language `observations` arguments in the top-level `server.py`, which is what the deployed MCP actually runs (`claude mcp list` points at `Dropbox/BD/mcp/server.py`). It did not touch `src/databasis_mcp/tools/write.py`, which holds a second copy of the same three writers. That is exactly the drift basedosdados#10 had just finished correcting, so this ports the change verbatim: `bulk_upsert_columns` and `update_column` take `observations_pt`/`_en`/`_es`, `upload_columns_from_sheet` reads the `observations_en` and `observations_es` sheet columns, and all three write `observationsPt`/`En`/`Es` rather than the bare key. A lone `observations` still means Portuguese. `grep -n observations` now returns identical output for the two files. Verified against staging through `src.databasis_mcp.tools.write` — not the monolith — with the same round-trip used on basedosdados#11: all three fields written by both entry points, a lone `observations` still landing in Portuguese without touching English or Spanish, `order` and the descriptions untouched, and the original values restored at the end.
aspeddro
pushed a commit
to aspeddro/basedosdados-mcp
that referenced
this pull request
Sep 27, 2026
`create_update_table` in the monolith takes `auxiliary_files_url` and sends it as `auxiliaryFilesUrl`; the copy in `src/databasis_mcp/tools/write.py` never gained the argument. This drift predates basedosdados#11 — basedosdados#10 corrected the src tree but missed this one. It matters because the onboarding rules require the field: every table with a documentation bundle records its GCS URL there, and 84 production tables already carry one. On the package copy the argument simply does not exist, so the bundle would go unrecorded. Comparing every tool's source between the two trees now reports 45/45 identical, where main reported 41/45. Verified with the mutation stubbed, since `create_update_table` has no partial-update semantics and a live call would rewrite a real table record: the payload carries `auxiliaryFilesUrl` when the argument is passed, and omits the key entirely when it is not, so an update that leaves it out cannot blank a stored value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finaliza a migração pra uv + corrige drift entre server.py e src/databasis_mcp
Contexto
O repositório usava
requirements.txt. Uma migração prauvjá tinha sido feita localmente (junto com o refactor deserver.pyemsrc/databasis_mcp/, PR #8), maspyproject.toml/uv.locknunca foram commitados — existiam só na máquina de quem fez a migração.Além disso, esta branch também traz
mainatualizado (PR #9, toolset_deployment_schedule_active), que tinha sido adicionada só noserver.pymonolítico da raiz — o pacote novo emsrc/databasis_mcp/ficou defasado.Verificando a sincronia entre
server.pyesrc/databasis_mcp/emorigin/main, apareceu uma segunda lacuna mais antiga:run_deployment(commit22ef7a4, 29/07) foi adicionada direto emmainantes da branch do refactor ser cortada, então também nunca chegou no pacote novo — ficou faltando desde o merge do PR #8 (18/08), sem relação com o PR #9.O que muda
Migração pra uv
pyproject.tomleuv.lockcommitadosrequirements.txtremovido — ficava redundante e desatualizado (google-cloud-bigquery>=3.0, enquanto opyproject.tomljá pedia>=3.41.0)README.md: seção de instalação trocada depip install -r requirements.txtprauv sync=2.0(redirect mal interpretado de umuv addsem aspas),main.py(scaffold padrão douv init, nunca usado),.venv-pip/(venv antigo criado compython -m venv, 120MB, substituído pelo.venvdo uv)Porta
set_deployment_schedule_activepro pacote novoCopiada 1:1 de
server.pyprasrc/databasis_mcp/tools/prefect.py, importandoURLSde_app(já existia lá, idêntico ao da raiz).Porta
run_deploymente o helper_prefect_getpro pacote novoCopiada 1:1 de
server.py, junto com_prefect_get(helper que ela usa e que também faltava no pacote).Validado
uv syncroda limposrc/databasis_mcpimporta e registra as 45 tools (nenhuma perdida, incluindo as duas que estavam faltando)server.pyda raiz continua com sintaxe válida e também com 45 tools — os dois lados batem