notasbr 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- notasbr-0.4.1/.dockerignore +24 -0
- notasbr-0.4.1/.env.example +133 -0
- notasbr-0.4.1/.gitattributes +12 -0
- notasbr-0.4.1/.github/CODE_OF_CONDUCT.md +126 -0
- notasbr-0.4.1/.github/ISSUE_TEMPLATE/bug_report.yml +94 -0
- notasbr-0.4.1/.github/ISSUE_TEMPLATE/config.yml +11 -0
- notasbr-0.4.1/.github/ISSUE_TEMPLATE/feature_request.yml +76 -0
- notasbr-0.4.1/.github/PULL_REQUEST_TEMPLATE.md +33 -0
- notasbr-0.4.1/.github/dependabot.yml +75 -0
- notasbr-0.4.1/.github/workflows/ci.yml +152 -0
- notasbr-0.4.1/.github/workflows/release-please.yml +88 -0
- notasbr-0.4.1/.gitignore +108 -0
- notasbr-0.4.1/.release-please-manifest.json +3 -0
- notasbr-0.4.1/CHANGELOG.md +782 -0
- notasbr-0.4.1/CITATION.cff +39 -0
- notasbr-0.4.1/CONTRIBUTING.md +216 -0
- notasbr-0.4.1/Dockerfile +34 -0
- notasbr-0.4.1/GOVERNANCE.md +74 -0
- notasbr-0.4.1/IMPROVEMENTS.md +135 -0
- notasbr-0.4.1/LICENSE +21 -0
- notasbr-0.4.1/PKG-INFO +666 -0
- notasbr-0.4.1/PLANO.md +148 -0
- notasbr-0.4.1/README.md +607 -0
- notasbr-0.4.1/SECURITY.md +91 -0
- notasbr-0.4.1/alembic/env.py +76 -0
- notasbr-0.4.1/alembic/script.py.mako +26 -0
- notasbr-0.4.1/alembic/versions/0001_estrutura_inicial.py +678 -0
- notasbr-0.4.1/alembic/versions/0002_frete_credenciais.py +55 -0
- notasbr-0.4.1/alembic/versions/0003_calculo_audit.py +77 -0
- notasbr-0.4.1/alembic/versions/0004_municipios_nfse.py +72 -0
- notasbr-0.4.1/alembic/versions/0005_webservices_sefaz.py +54 -0
- notasbr-0.4.1/alembic/versions/0006_credenciais_municipais.py +67 -0
- notasbr-0.4.1/alembic/versions/0007_dlq.py +64 -0
- notasbr-0.4.1/alembic/versions/0008_alarga_versao_soap.py +47 -0
- notasbr-0.4.1/alembic/versions/0009_modelo_webservices.py +61 -0
- notasbr-0.4.1/alembic/versions/0010_modelos_cte_mdfe.py +31 -0
- notasbr-0.4.1/alembic/versions/0011_alinhar_defaults_e_indice_frete.py +70 -0
- notasbr-0.4.1/alembic/versions/0012_certificado_usos.py +54 -0
- notasbr-0.4.1/alembic/versions/0013_chave_expira_revoga.py +38 -0
- notasbr-0.4.1/alembic/versions/0014_escopos_chave.py +33 -0
- notasbr-0.4.1/alembic/versions/0015_proveniencia_parametros.py +39 -0
- notasbr-0.4.1/alembic.ini +43 -0
- notasbr-0.4.1/app/__init__.py +1 -0
- notasbr-0.4.1/app/api/__init__.py +1 -0
- notasbr-0.4.1/app/api/deps.py +135 -0
- notasbr-0.4.1/app/api/v1/__init__.py +1 -0
- notasbr-0.4.1/app/api/v1/admin.py +103 -0
- notasbr-0.4.1/app/api/v1/apuracoes.py +140 -0
- notasbr-0.4.1/app/api/v1/auditoria.py +84 -0
- notasbr-0.4.1/app/api/v1/certificados.py +229 -0
- notasbr-0.4.1/app/api/v1/cnpj.py +90 -0
- notasbr-0.4.1/app/api/v1/consulta.py +61 -0
- notasbr-0.4.1/app/api/v1/credenciais.py +114 -0
- notasbr-0.4.1/app/api/v1/emissoes.py +729 -0
- notasbr-0.4.1/app/api/v1/fretes.py +313 -0
- notasbr-0.4.1/app/api/v1/health.py +160 -0
- notasbr-0.4.1/app/api/v1/integracoes.py +213 -0
- notasbr-0.4.1/app/api/v1/lotes.py +246 -0
- notasbr-0.4.1/app/api/v1/municipios.py +99 -0
- notasbr-0.4.1/app/api/v1/observabilidade.py +48 -0
- notasbr-0.4.1/app/api/v1/representacoes.py +112 -0
- notasbr-0.4.1/app/api/v1/router.py +50 -0
- notasbr-0.4.1/app/api/v1/tax.py +182 -0
- notasbr-0.4.1/app/api/v1/tenants.py +268 -0
- notasbr-0.4.1/app/api/v1/transportes.py +121 -0
- notasbr-0.4.1/app/api/v1/transportes_status.py +158 -0
- notasbr-0.4.1/app/assessment/__init__.py +5 -0
- notasbr-0.4.1/app/assessment/providers.py +202 -0
- notasbr-0.4.1/app/assessment/schemas.py +62 -0
- notasbr-0.4.1/app/assessment/service.py +233 -0
- notasbr-0.4.1/app/batches/__init__.py +1 -0
- notasbr-0.4.1/app/batches/csv.py +193 -0
- notasbr-0.4.1/app/batches/service.py +242 -0
- notasbr-0.4.1/app/catalogo/__init__.py +279 -0
- notasbr-0.4.1/app/cep/__init__.py +1 -0
- notasbr-0.4.1/app/cep/client.py +148 -0
- notasbr-0.4.1/app/cep/service.py +83 -0
- notasbr-0.4.1/app/certificates/__init__.py +5 -0
- notasbr-0.4.1/app/certificates/cofre.py +321 -0
- notasbr-0.4.1/app/certificates/schemas.py +45 -0
- notasbr-0.4.1/app/certificates/service.py +333 -0
- notasbr-0.4.1/app/cnpj/__init__.py +5 -0
- notasbr-0.4.1/app/cnpj/client.py +265 -0
- notasbr-0.4.1/app/cnpj/service.py +178 -0
- notasbr-0.4.1/app/core/__init__.py +1 -0
- notasbr-0.4.1/app/core/circuit.py +88 -0
- notasbr-0.4.1/app/core/config.py +231 -0
- notasbr-0.4.1/app/core/crypto.py +79 -0
- notasbr-0.4.1/app/core/errors.py +192 -0
- notasbr-0.4.1/app/core/fiscal.py +31 -0
- notasbr-0.4.1/app/core/logging.py +99 -0
- notasbr-0.4.1/app/core/metrics.py +151 -0
- notasbr-0.4.1/app/core/middleware_ratelimit.py +89 -0
- notasbr-0.4.1/app/core/ratelimit.py +181 -0
- notasbr-0.4.1/app/core/redis.py +60 -0
- notasbr-0.4.1/app/core/schemas.py +134 -0
- notasbr-0.4.1/app/core/security.py +68 -0
- notasbr-0.4.1/app/core/vault.py +32 -0
- notasbr-0.4.1/app/cte/__init__.py +97 -0
- notasbr-0.4.1/app/cte/consulta.py +58 -0
- notasbr-0.4.1/app/cte/consulta_situacao.py +56 -0
- notasbr-0.4.1/app/cte/evento.py +101 -0
- notasbr-0.4.1/app/cte/gerador.py +198 -0
- notasbr-0.4.1/app/cte/schemas.py +98 -0
- notasbr-0.4.1/app/cte/transmissao.py +41 -0
- notasbr-0.4.1/app/danfe/__init__.py +32 -0
- notasbr-0.4.1/app/danfe/a4.py +528 -0
- notasbr-0.4.1/app/danfe/base.py +78 -0
- notasbr-0.4.1/app/danfe/cte.py +411 -0
- notasbr-0.4.1/app/danfe/etiquetas.py +380 -0
- notasbr-0.4.1/app/danfe/mdfe.py +376 -0
- notasbr-0.4.1/app/danfe/nfce.py +340 -0
- notasbr-0.4.1/app/danfe/nfe.py +415 -0
- notasbr-0.4.1/app/danfse/__init__.py +5 -0
- notasbr-0.4.1/app/danfse/model.py +157 -0
- notasbr-0.4.1/app/danfse/parser.py +259 -0
- notasbr-0.4.1/app/danfse/render.py +299 -0
- notasbr-0.4.1/app/danfse/service.py +28 -0
- notasbr-0.4.1/app/db/__init__.py +1 -0
- notasbr-0.4.1/app/db/base.py +53 -0
- notasbr-0.4.1/app/db/models/__init__.py +58 -0
- notasbr-0.4.1/app/db/models/certificado_uso.py +54 -0
- notasbr-0.4.1/app/db/models/credencial_municipal.py +67 -0
- notasbr-0.4.1/app/db/models/dlq.py +68 -0
- notasbr-0.4.1/app/db/models/enums.py +111 -0
- notasbr-0.4.1/app/db/models/frete.py +52 -0
- notasbr-0.4.1/app/db/models/invoice.py +224 -0
- notasbr-0.4.1/app/db/models/municipio.py +149 -0
- notasbr-0.4.1/app/db/models/ops.py +189 -0
- notasbr-0.4.1/app/db/models/tax.py +58 -0
- notasbr-0.4.1/app/db/models/tenant.py +207 -0
- notasbr-0.4.1/app/db/models/webservice_sefaz.py +88 -0
- notasbr-0.4.1/app/db/session.py +160 -0
- notasbr-0.4.1/app/frete/__init__.py +1 -0
- notasbr-0.4.1/app/frete/client.py +253 -0
- notasbr-0.4.1/app/frete/constants.py +63 -0
- notasbr-0.4.1/app/frete/oauth.py +210 -0
- notasbr-0.4.1/app/frete/service.py +228 -0
- notasbr-0.4.1/app/integrations/__init__.py +1 -0
- notasbr-0.4.1/app/integrations/base.py +82 -0
- notasbr-0.4.1/app/integrations/brizu/__init__.py +1 -0
- notasbr-0.4.1/app/integrations/brizu/conector.py +58 -0
- notasbr-0.4.1/app/integrations/dz23/__init__.py +1 -0
- notasbr-0.4.1/app/integrations/dz23/conector.py +57 -0
- notasbr-0.4.1/app/main.py +428 -0
- notasbr-0.4.1/app/mdfe/__init__.py +50 -0
- notasbr-0.4.1/app/mdfe/consulta.py +55 -0
- notasbr-0.4.1/app/mdfe/gerador.py +152 -0
- notasbr-0.4.1/app/mdfe/schemas.py +93 -0
- notasbr-0.4.1/app/mdfe/transmissao.py +34 -0
- notasbr-0.4.1/app/nfe/__init__.py +1 -0
- notasbr-0.4.1/app/nfe/assinatura.py +88 -0
- notasbr-0.4.1/app/nfe/autorizacao.py +111 -0
- notasbr-0.4.1/app/nfe/base.py +177 -0
- notasbr-0.4.1/app/nfe/gerador.py +188 -0
- notasbr-0.4.1/app/nfe/lote.py +115 -0
- notasbr-0.4.1/app/nfe/retorno.py +128 -0
- notasbr-0.4.1/app/nfe/soap.py +140 -0
- notasbr-0.4.1/app/nfe/transporte.py +187 -0
- notasbr-0.4.1/app/nfse/__init__.py +5 -0
- notasbr-0.4.1/app/nfse/adapter.py +724 -0
- notasbr-0.4.1/app/nfse/assinatura_rps.py +101 -0
- notasbr-0.4.1/app/nfse/cancelamento.py +217 -0
- notasbr-0.4.1/app/nfse/constants.py +142 -0
- notasbr-0.4.1/app/nfse/credenciais.py +140 -0
- notasbr-0.4.1/app/nfse/documento_autorizado.py +28 -0
- notasbr-0.4.1/app/nfse/dps.py +482 -0
- notasbr-0.4.1/app/nfse/drivers.py +162 -0
- notasbr-0.4.1/app/nfse/drivers_abrasf.py +277 -0
- notasbr-0.4.1/app/nfse/drivers_factory.py +171 -0
- notasbr-0.4.1/app/nfse/errors.py +307 -0
- notasbr-0.4.1/app/nfse/evento.py +194 -0
- notasbr-0.4.1/app/nfse/eventos.py +249 -0
- notasbr-0.4.1/app/nfse/eventos_tipos.py +352 -0
- notasbr-0.4.1/app/nfse/factory.py +27 -0
- notasbr-0.4.1/app/nfse/injecao.py +75 -0
- notasbr-0.4.1/app/nfse/resiliencia.py +109 -0
- notasbr-0.4.1/app/nfse/roteamento.py +159 -0
- notasbr-0.4.1/app/nfse/schemas.py +105 -0
- notasbr-0.4.1/app/nfse/servico.py +550 -0
- notasbr-0.4.1/app/nfse/signer.py +202 -0
- notasbr-0.4.1/app/nfse/transport.py +248 -0
- notasbr-0.4.1/app/tax/__init__.py +5 -0
- notasbr-0.4.1/app/tax/auditoria.py +154 -0
- notasbr-0.4.1/app/tax/auditoria_service.py +119 -0
- notasbr-0.4.1/app/tax/classificacoes.py +145 -0
- notasbr-0.4.1/app/tax/data/classificacoes_ibscbs.json +1857 -0
- notasbr-0.4.1/app/tax/integracao_emissao.py +69 -0
- notasbr-0.4.1/app/tax/rtc.py +266 -0
- notasbr-0.4.1/app/tax/schemas.py +99 -0
- notasbr-0.4.1/app/tenants/__init__.py +1 -0
- notasbr-0.4.1/app/tenants/repository.py +112 -0
- notasbr-0.4.1/app/tenants/schemas.py +148 -0
- notasbr-0.4.1/app/tenants/service.py +191 -0
- notasbr-0.4.1/app/versao.py +18 -0
- notasbr-0.4.1/app/webhooks/__init__.py +1 -0
- notasbr-0.4.1/app/webhooks/assinatura.py +103 -0
- notasbr-0.4.1/app/webhooks/service.py +351 -0
- notasbr-0.4.1/app/worker/__init__.py +1 -0
- notasbr-0.4.1/app/worker/dlq.py +116 -0
- notasbr-0.4.1/app/worker/healthcheck.py +48 -0
- notasbr-0.4.1/app/worker/main.py +139 -0
- notasbr-0.4.1/app/worker/tarefas.py +102 -0
- notasbr-0.4.1/data/endpoints_nfe_acbr.json +8642 -0
- notasbr-0.4.1/data/endpoints_sefaz.json +1802 -0
- notasbr-0.4.1/data/exemplos/endpoints_sefaz.exemplo.json +12 -0
- notasbr-0.4.1/data/fontes/ACBrCTeServicos.ini +1118 -0
- notasbr-0.4.1/data/fontes/ACBrMDFeServicos.ini +203 -0
- notasbr-0.4.1/data/fontes/ACBrNFSeXServicos.ini +36211 -0
- notasbr-0.4.1/data/fontes/ACBrNFeServicos.ini +1395 -0
- notasbr-0.4.1/data/fontes/MANIFESTO.json +14 -0
- notasbr-0.4.1/data/ibge_municipios.json +27857 -0
- notasbr-0.4.1/data/xsd_manifest.json +117 -0
- notasbr-0.4.1/docker-compose.yml +130 -0
- notasbr-0.4.1/docs/ARQUITETURA.md +148 -0
- notasbr-0.4.1/docs/CATALOGO-FISCAL.md +469 -0
- notasbr-0.4.1/docs/DECISOES.md +194 -0
- notasbr-0.4.1/docs/DOCUMENTOS-FISCAIS.md +144 -0
- notasbr-0.4.1/docs/ESCOPO-NEGATIVO.md +44 -0
- notasbr-0.4.1/docs/ESCOPO.md +101 -0
- notasbr-0.4.1/docs/MATRIZ-COBERTURA.md +195 -0
- notasbr-0.4.1/docs/MODOS-DE-OPERACAO.md +111 -0
- notasbr-0.4.1/docs/ONBOARDING-HOSPEDADO.md +123 -0
- notasbr-0.4.1/docs/OPERACAO.md +163 -0
- notasbr-0.4.1/docs/PAINEL.md +63 -0
- notasbr-0.4.1/docs/REFERENCIAS.md +973 -0
- notasbr-0.4.1/docs/RELATORIO-FINAL.md +184 -0
- notasbr-0.4.1/docs/REQUISITOS-FONTES.md +368 -0
- notasbr-0.4.1/docs/ROADMAP.md +439 -0
- notasbr-0.4.1/docs/adr/0001-admin-auth.md +76 -0
- notasbr-0.4.1/docs/adr/0002-dependencias.md +67 -0
- notasbr-0.4.1/docs/adr/0003-traces.md +56 -0
- notasbr-0.4.1/docs/adr/0005-titularidade-e-representacao.md +97 -0
- notasbr-0.4.1/docs/auditoria_inicial.md +6505 -0
- notasbr-0.4.1/docs/cte-ide-ordem.md +131 -0
- notasbr-0.4.1/docs/integrations/README.md +38 -0
- notasbr-0.4.1/docs/integrations/brizu.md +60 -0
- notasbr-0.4.1/docs/integrations/dz23.md +69 -0
- notasbr-0.4.1/docs/integrations/melhor-envio.md +82 -0
- notasbr-0.4.1/docs/integrations/sefaz-go.md +73 -0
- notasbr-0.4.1/docs/maintainers/enable_discussions.md +61 -0
- notasbr-0.4.1/docs/maintainers/good_first_issues.md +140 -0
- notasbr-0.4.1/docs/maintainers/launch_checklist.md +116 -0
- notasbr-0.4.1/docs/maintainers/publish-pypi.md +86 -0
- notasbr-0.4.1/docs/postman_collection.json +2283 -0
- notasbr-0.4.1/docs/runbooks/autorizador-indisponivel.md +24 -0
- notasbr-0.4.1/docs/runbooks/dlq-replay.md +22 -0
- notasbr-0.4.1/docs/runbooks/emissao-travada.md +24 -0
- notasbr-0.4.1/docs/runbooks/erro-5xx.md +20 -0
- notasbr-0.4.1/docs/runbooks/lentidao.md +19 -0
- notasbr-0.4.1/docs/runbooks/restore-backup.md +26 -0
- notasbr-0.4.1/docs/runbooks/worker-parado.md +42 -0
- notasbr-0.4.1/examples/README.md +54 -0
- notasbr-0.4.1/examples/quickstart.ipynb +335 -0
- notasbr-0.4.1/openapi.json +7714 -0
- notasbr-0.4.1/ops/observability/README.md +50 -0
- notasbr-0.4.1/ops/observability/alertmanager.yml +27 -0
- notasbr-0.4.1/ops/observability/alerts.test.yml +169 -0
- notasbr-0.4.1/ops/observability/alerts.yml +123 -0
- notasbr-0.4.1/ops/observability/docker-compose.observability.yml +34 -0
- notasbr-0.4.1/ops/observability/gerar_teste_alertas.py +215 -0
- notasbr-0.4.1/ops/observability/prometheus.yml +29 -0
- notasbr-0.4.1/pyproject.toml +158 -0
- notasbr-0.4.1/release-please-config.json +57 -0
- notasbr-0.4.1/scripts/__init__.py +0 -0
- notasbr-0.4.1/scripts/atualizar_manifesto_revisao.py +113 -0
- notasbr-0.4.1/scripts/atualizar_municipios_acbr.py +163 -0
- notasbr-0.4.1/scripts/baixar_fontes.py +76 -0
- notasbr-0.4.1/scripts/benchmark_mock.py +177 -0
- notasbr-0.4.1/scripts/bootstrap_dev.sh +230 -0
- notasbr-0.4.1/scripts/check_ci.py +107 -0
- notasbr-0.4.1/scripts/cobertura_fiscal.py +74 -0
- notasbr-0.4.1/scripts/converter_acbr_nfe.py +180 -0
- notasbr-0.4.1/scripts/converter_wsurls.py +115 -0
- notasbr-0.4.1/scripts/demo_e2e.py +335 -0
- notasbr-0.4.1/scripts/extrair_classificacoes.py +138 -0
- notasbr-0.4.1/scripts/extrair_ordem_cte.py +61 -0
- notasbr-0.4.1/scripts/gerar_manifesto_xsd.py +78 -0
- notasbr-0.4.1/scripts/gerar_painel.py +179 -0
- notasbr-0.4.1/scripts/gerar_postman.py +183 -0
- notasbr-0.4.1/scripts/importar_catalogo.py +87 -0
- notasbr-0.4.1/scripts/instalar_hook.py +48 -0
- notasbr-0.4.1/scripts/preparar_banco_migracoes.py +49 -0
- notasbr-0.4.1/scripts/receptor_webhook.py +73 -0
- notasbr-0.4.1/scripts/registrar_fontes_rtc.py +163 -0
- notasbr-0.4.1/scripts/rotacionar_chave_mestra.py +242 -0
- notasbr-0.4.1/scripts/seed_municipios.py +152 -0
- notasbr-0.4.1/scripts/verificar_segredos.py +177 -0
- notasbr-0.4.1/sources/adendos/adendo-3-evidencias-oficiais-2026-11-27.md +113 -0
- notasbr-0.4.1/sources/manifest.yaml +253 -0
- notasbr-0.4.1/sources/oficiais/anexo-b-nbs2-v1.01-20260122.xlsx +0 -0
- notasbr-0.4.1/sources/oficiais/anexo-c-indop-ibscbs-v1.01-20260122.xlsx +0 -0
- notasbr-0.4.1/sources/oficiais/anexo-i-dps-nfse-prodrest-v1.01-20261124.xlsx +0 -0
- notasbr-0.4.1/sources/oficiais/anexo-vi-leiautes-rn-rtc-ibscbs-v1.04.01-nt009.xlsx +0 -0
- notasbr-0.4.1/sources/oficiais/anexo-vii-indop-ibscbs-v1.03.00-nt009.xlsx +0 -0
- notasbr-0.4.1/sources/oficiais/anexo-viii-v01.02.00-20261026.xlsx +0 -0
- notasbr-0.4.1/sources/oficiais/comunicado-release-2-20261125.html +3129 -0
- notasbr-0.4.1/sources/oficiais/documentacao-atual.html +3062 -0
- notasbr-0.4.1/sources/oficiais/esquemas-oficiais-1.01 +318 -0
- notasbr-0.4.1/sources/oficiais/esquemas-xsd-producao-restrita-20261124.zip +0 -0
- notasbr-0.4.1/sources/oficiais/esquemas-xsd-v1.01-20260209.zip +0 -0
- notasbr-0.4.1/sources/oficiais/esquemas-xsd.html +3007 -0
- notasbr-0.4.1/sources/oficiais/faq-nfse-v1.5-20261123.html +5111 -0
- notasbr-0.4.1/sources/oficiais/implementacao-adn.html +3009 -0
- notasbr-0.4.1/sources/oficiais/manual-contribuintes-api-adn-snnfse-v1-1-20261103.pdf +0 -0
- notasbr-0.4.1/sources/oficiais/nt-009-se-cgnfs-e-v1.01-20261001.pdf +0 -0
- notasbr-0.4.1/sources/oficiais/portarias-e-resolucoes-cgnfs-e.html +3101 -0
- notasbr-0.4.1/sources/oficiais/schemas_v1-01_atualizado.zip +0 -0
- notasbr-0.4.1/src/notasbr/__init__.py +45 -0
- notasbr-0.4.1/src/notasbr/api.py +116 -0
- notasbr-0.4.1/src/notasbr/auditor.py +269 -0
- notasbr-0.4.1/src/notasbr/cadastros.py +160 -0
- notasbr-0.4.1/src/notasbr/chave.py +256 -0
- notasbr-0.4.1/src/notasbr/cli.py +267 -0
- notasbr-0.4.1/src/notasbr/erros.py +27 -0
- notasbr-0.4.1/src/notasbr/modelos.py +171 -0
- notasbr-0.4.1/src/notasbr/regras/__init__.py +25 -0
- notasbr-0.4.1/src/notasbr/regras/assinatura.py +211 -0
- notasbr-0.4.1/src/notasbr/regras/base.py +245 -0
- notasbr-0.4.1/src/notasbr/regras/chave_regras.py +274 -0
- notasbr-0.4.1/src/notasbr/regras/estrutura.py +200 -0
- notasbr-0.4.1/src/notasbr/regras/totais.py +221 -0
- notasbr-0.4.1/src/notasbr/regras/tributos.py +260 -0
- notasbr-0.4.1/src/notasbr/versao.py +8 -0
- notasbr-0.4.1/src/notasbr/xml_util.py +186 -0
- notasbr-0.4.1/tests/__init__.py +1 -0
- notasbr-0.4.1/tests/conftest.py +113 -0
- notasbr-0.4.1/tests/construir.py +556 -0
- notasbr-0.4.1/tests/fixtures/evidencias/sefaz_go_status_homolog_2026-11-26.xml +1 -0
- notasbr-0.4.1/tests/fixtures/ibge_3.json +5 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/DFeTiposBasicos_v1.00.xsd +1841 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/GTVe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/ORIGEM.md +34 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/consSitCTeTiposBasico_v4.00.xsd +123 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/consSitCTe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/consStatServCTe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/consStatServTiposBasico_v4.00.xsd +115 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteModalAereo_v4.00.xsd +240 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteModalAquaviario_v4.00.xsd +207 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteModalDutoviario_v4.00.xsd +92 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteModalFerroviario_v4.00.xsd +231 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteModalRodoviarioOS_v4.00.xsd +193 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteModalRodoviario_v4.00.xsd +102 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteMultiModal_v4.00.xsd +100 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteOS_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteSimp_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cteTiposBasico_v4.00.xsd +8366 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/cte_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evApropriaCredPres_v4.00.xsd +99 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evCCeCTe_v4.00.xsd +98 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evCECTe_v4.00.xsd +108 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evCancCECTe_v4.00.xsd +36 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evCancCTe_v4.00.xsd +36 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evCancIECTe_v4.00.xsd +36 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evCancPrestDesacordo_v4.00.xsd +32 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evCancTributacaoSN_v1.00.xsd +37 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evCancVincPgto_v4.00.xsd +36 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evEPECCTe_v4.00.xsd +161 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evGTV_v4.00.xsd +255 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evIECTe_v4.00.xsd +126 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evPrestDesacordo_v4.00.xsd +49 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evRegMultimodal_v4.00.xsd +51 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evTributacaoSN_v1.00.xsd +42 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/evVincPgto_v4.00.xsd +45 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/eventoCTeTiposBasico_v4.00.xsd +331 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/eventoCTe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/procCTeOS_v4.00.xsd +37 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/procCTeSimp_v4.00.xsd +37 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/procCTe_v4.00.xsd +37 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/procEventoCTe_v4.00.xsd +15 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/procGTVe_v4.00.xsd +37 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/retCTeOS_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/retCTeSimp_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/retCTe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/retConsSitCTe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/retConsStatServCTe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/retEventoCTe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/retGTVe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/tiposGeralCTe_v4.00.xsd +638 -0
- notasbr-0.4.1/tests/fixtures/schemas/cte-4.00/xmldsig-core-schema_v1.01.xsd +98 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/ORIGEM.md +31 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/consMDFeNaoEncTiposBasico_v3.00.xsd +107 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/consMDFeNaoEnc_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/consReciMDFeTiposBasico_v3.00.xsd +169 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/consReciMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/consSitMDFeTiposBasico_v3.00.xsd +137 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/consSitMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/consStatServMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/consStatServTiposBasico_v3.00.xsd +104 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/distMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/enviMDFe_v3.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/evAlteracaoPagtoServMDFe_v3.00.xsd +257 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/evCancMDFe_v3.00.xsd +38 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/evConfirmaServMDFe_v3.00.xsd +34 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/evEncMDFe_v3.00.xsd +59 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/evIncCondutorMDFe_v3.00.xsd +49 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/evInclusaoDFeMDFe_v3.00.xsd +81 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/evPagtoOperMDFe_v3.00.xsd +289 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/eventoMDFeTiposBasico_v3.00.xsd +300 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/eventoMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/leiauteDistMDFe_v3.00.xsd +136 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/mdfeConsultaDFeTiposBasico_v3.00.xsd +99 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/mdfeConsultaDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/mdfeModalAereo_v3.00.xsd +83 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/mdfeModalAquaviario_v3.00.xsd +287 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/mdfeModalFerroviario_v3.00.xsd +145 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/mdfeModalRodoviario_v3.00.xsd +927 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/mdfeTiposBasico_v3.00.xsd +2525 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/mdfe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/procEventoMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/procMDFe_v3.00.xsd +37 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retConsMDFeNaoEnc_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retConsReciMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retConsSitMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retConsStatServMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retDistMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retEnviMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retEventoMDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retMDFeConsultaDFe_v3.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/retMDFe_v3.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/tiposGeralMDFe_v3.00.xsd +647 -0
- notasbr-0.4.1/tests/fixtures/schemas/mdfe-3.00/xmldsig-core-schema_v1.01.xsd +98 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/DFeTiposBasicos_v1.00.xsd +1954 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/consReciNFe_v4.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/consStatServ_v4.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/enviNFe_v4.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/leiauteConsStatServ_v4.00.xsd +98 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/leiauteNFe_v4.00.xsd +7802 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/nfe_v4.00.xsd +10 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/procNFe_v4.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/retConsReciNFe_v4.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/retConsStatServ_v4.00.xsd +9 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/tiposBasico_v4.00.xsd +608 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfe-4.00/xmldsig-core-schema_v1.01.xsd +98 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/CNC_v1.00.xsd +14 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/DPS_v1.01.xsd +14 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/NFSe_v1.01.xsd +15 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/ORIGEM.md +14 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/evento_v1.01.xsd +15 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/pedRegEvento_v1.01.xsd +15 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/tiposCnc_v1.00.xsd +166 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/tiposComplexos_v1.01.xsd +2953 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/tiposEventos_v1.01.xsd +780 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/tiposSimples_v1.01.xsd +2020 -0
- notasbr-0.4.1/tests/fixtures/schemas/nfse-1.01/xmldsig-core-schema.xsd +309 -0
- notasbr-0.4.1/tests/fixtures/sefins/ORIGEM.md +11 -0
- notasbr-0.4.1/tests/fixtures/sefins/adn_dfe_rejeicao.json +10 -0
- notasbr-0.4.1/tests/fixtures/sefins/adn_eventos_sem_documento.json +14 -0
- notasbr-0.4.1/tests/fixtures/sefins/dps_nao_encontrada.json +8 -0
- notasbr-0.4.1/tests/fixtures/sefins/nfse_nao_encontrada.json +9 -0
- notasbr-0.4.1/tests/fixtures/sefins/sefin_eventos_405.json +3 -0
- notasbr-0.4.1/tests/fixtures/wsdl/NfeStatusServico4_svrs_homolog.wsdl +65 -0
- notasbr-0.4.1/tests/fixtures/wsdl/ORIGEM.md +25 -0
- notasbr-0.4.1/tests/suporte.py +132 -0
- notasbr-0.4.1/tests/test_adapter_descodificacao.py +319 -0
- notasbr-0.4.1/tests/test_admin_dlq.py +130 -0
- notasbr-0.4.1/tests/test_api.py +102 -0
- notasbr-0.4.1/tests/test_apuracao.py +305 -0
- notasbr-0.4.1/tests/test_assessment_service.py +240 -0
- notasbr-0.4.1/tests/test_assinatura_modulos.py +121 -0
- notasbr-0.4.1/tests/test_auditor_assinatura.py +193 -0
- notasbr-0.4.1/tests/test_auditor_cte.py +94 -0
- notasbr-0.4.1/tests/test_auditor_nfe.py +266 -0
- notasbr-0.4.1/tests/test_batches_service.py +250 -0
- notasbr-0.4.1/tests/test_benchmark_mock.py +48 -0
- notasbr-0.4.1/tests/test_boot_integridade_xsd.py +60 -0
- notasbr-0.4.1/tests/test_cadastros.py +143 -0
- notasbr-0.4.1/tests/test_cancelamento.py +208 -0
- notasbr-0.4.1/tests/test_cancelamento_service.py +306 -0
- notasbr-0.4.1/tests/test_catalogo_fiscal.py +147 -0
- notasbr-0.4.1/tests/test_cep.py +223 -0
- notasbr-0.4.1/tests/test_certificado_ambiguo.py +125 -0
- notasbr-0.4.1/tests/test_certificado_expirado.py +178 -0
- notasbr-0.4.1/tests/test_certificado_usos.py +264 -0
- notasbr-0.4.1/tests/test_chave.py +154 -0
- notasbr-0.4.1/tests/test_chave_expira_revoga.py +137 -0
- notasbr-0.4.1/tests/test_circuit.py +107 -0
- notasbr-0.4.1/tests/test_circuito_consulta_status.py +26 -0
- notasbr-0.4.1/tests/test_circuito_na_emissao.py +174 -0
- notasbr-0.4.1/tests/test_classificacoes.py +153 -0
- notasbr-0.4.1/tests/test_cli.py +133 -0
- notasbr-0.4.1/tests/test_cnpj.py +267 -0
- notasbr-0.4.1/tests/test_cnpj_service.py +194 -0
- notasbr-0.4.1/tests/test_cofre_envelope.py +105 -0
- notasbr-0.4.1/tests/test_cofre_geradores_ramos.py +849 -0
- notasbr-0.4.1/tests/test_configuracao_documentada.py +82 -0
- notasbr-0.4.1/tests/test_contrato_sefin_real.py +125 -0
- notasbr-0.4.1/tests/test_contrato_tenant.py +96 -0
- notasbr-0.4.1/tests/test_converter_acbr_nfe.py +83 -0
- notasbr-0.4.1/tests/test_core_redis.py +93 -0
- notasbr-0.4.1/tests/test_correcoes_csv_cep.py +98 -0
- notasbr-0.4.1/tests/test_correcoes_escopos.py +97 -0
- notasbr-0.4.1/tests/test_correcoes_fiscais.py +159 -0
- notasbr-0.4.1/tests/test_credenciais_rota.py +139 -0
- notasbr-0.4.1/tests/test_cte_consulta_situacao.py +50 -0
- notasbr-0.4.1/tests/test_cte_evento.py +92 -0
- notasbr-0.4.1/tests/test_cte_gerador.py +107 -0
- notasbr-0.4.1/tests/test_cte_ordem.py +27 -0
- notasbr-0.4.1/tests/test_cte_papel_tomador.py +34 -0
- notasbr-0.4.1/tests/test_cte_schema.py +31 -0
- notasbr-0.4.1/tests/test_cte_status.py +59 -0
- notasbr-0.4.1/tests/test_cupom_dacte.py +194 -0
- notasbr-0.4.1/tests/test_damdfe.py +137 -0
- notasbr-0.4.1/tests/test_danfe.py +171 -0
- notasbr-0.4.1/tests/test_danfe_a4_etiquetas.py +218 -0
- notasbr-0.4.1/tests/test_danfe_ramos.py +349 -0
- notasbr-0.4.1/tests/test_danfse.py +265 -0
- notasbr-0.4.1/tests/test_db_timeouts.py +135 -0
- notasbr-0.4.1/tests/test_demo_e2e_guarda.py +68 -0
- notasbr-0.4.1/tests/test_dlq.py +133 -0
- notasbr-0.4.1/tests/test_dps_dois_leiautes.py +127 -0
- notasbr-0.4.1/tests/test_dps_validacao.py +295 -0
- notasbr-0.4.1/tests/test_emisao_real_correcoes.py +127 -0
- notasbr-0.4.1/tests/test_emisao_regras_reais.py +50 -0
- notasbr-0.4.1/tests/test_emissoes_ramos.py +1687 -0
- notasbr-0.4.1/tests/test_envelope_abrasf.py +39 -0
- notasbr-0.4.1/tests/test_errors_rfc7807.py +130 -0
- notasbr-0.4.1/tests/test_erros_rfc7807.py +40 -0
- notasbr-0.4.1/tests/test_escopos_chave.py +143 -0
- notasbr-0.4.1/tests/test_evento_cancelamento.py +157 -0
- notasbr-0.4.1/tests/test_eventos_rota.py +211 -0
- notasbr-0.4.1/tests/test_eventos_service.py +280 -0
- notasbr-0.4.1/tests/test_eventos_tipos.py +238 -0
- notasbr-0.4.1/tests/test_exportacao_tenant.py +126 -0
- notasbr-0.4.1/tests/test_fase1_config.py +83 -0
- notasbr-0.4.1/tests/test_fase1_crypto.py +84 -0
- notasbr-0.4.1/tests/test_fase1_health.py +142 -0
- notasbr-0.4.1/tests/test_fase1_security.py +69 -0
- notasbr-0.4.1/tests/test_fase1_tenants.py +240 -0
- notasbr-0.4.1/tests/test_fase2_certificado.py +196 -0
- notasbr-0.4.1/tests/test_fase3_emissao.py +341 -0
- notasbr-0.4.1/tests/test_frete_client.py +255 -0
- notasbr-0.4.1/tests/test_frete_melhor_envio.py +270 -0
- notasbr-0.4.1/tests/test_frete_oauth_sem_token.py +79 -0
- notasbr-0.4.1/tests/test_frete_persistencia.py +238 -0
- notasbr-0.4.1/tests/test_frete_rotas.py +219 -0
- notasbr-0.4.1/tests/test_frete_service.py +162 -0
- notasbr-0.4.1/tests/test_gerar_postman.py +97 -0
- notasbr-0.4.1/tests/test_idempotencia_concorrencia.py +196 -0
- notasbr-0.4.1/tests/test_idempotencia_header.py +103 -0
- notasbr-0.4.1/tests/test_injecao_emissao.py +78 -0
- notasbr-0.4.1/tests/test_integracoes.py +221 -0
- notasbr-0.4.1/tests/test_isolamento_downloads.py +116 -0
- notasbr-0.4.1/tests/test_leiaute_nt009_guard.py +125 -0
- notasbr-0.4.1/tests/test_lib_ramos.py +218 -0
- notasbr-0.4.1/tests/test_lib_ramos_cli.py +109 -0
- notasbr-0.4.1/tests/test_lib_ramos_infra.py +185 -0
- notasbr-0.4.1/tests/test_lib_ramos_valores.py +149 -0
- notasbr-0.4.1/tests/test_logging_redacao.py +150 -0
- notasbr-0.4.1/tests/test_lotes.py +310 -0
- notasbr-0.4.1/tests/test_main_middleware_metricas.py +142 -0
- notasbr-0.4.1/tests/test_mdfe_gerador.py +100 -0
- notasbr-0.4.1/tests/test_mdfe_schema.py +29 -0
- notasbr-0.4.1/tests/test_mdfe_status.py +46 -0
- notasbr-0.4.1/tests/test_metricas_alertas.py +139 -0
- notasbr-0.4.1/tests/test_metrics.py +132 -0
- notasbr-0.4.1/tests/test_middleware_ratelimit.py +88 -0
- notasbr-0.4.1/tests/test_mock_em_producao.py +42 -0
- notasbr-0.4.1/tests/test_municipios_rota.py +78 -0
- notasbr-0.4.1/tests/test_nfe_autorizacao.py +144 -0
- notasbr-0.4.1/tests/test_nfe_gerador.py +226 -0
- notasbr-0.4.1/tests/test_nfe_lote.py +175 -0
- notasbr-0.4.1/tests/test_nfe_retorno.py +91 -0
- notasbr-0.4.1/tests/test_nfe_soap.py +137 -0
- notasbr-0.4.1/tests/test_nfe_transporte.py +98 -0
- notasbr-0.4.1/tests/test_nfe_transporte_http.py +113 -0
- notasbr-0.4.1/tests/test_nfse_assinatura_rps.py +83 -0
- notasbr-0.4.1/tests/test_nfse_contrato.py +474 -0
- notasbr-0.4.1/tests/test_nfse_credenciais.py +199 -0
- notasbr-0.4.1/tests/test_nfse_cstat.py +94 -0
- notasbr-0.4.1/tests/test_nfse_dps.py +315 -0
- notasbr-0.4.1/tests/test_nfse_driver_assinatura.py +86 -0
- notasbr-0.4.1/tests/test_nfse_drivers.py +75 -0
- notasbr-0.4.1/tests/test_nfse_drivers_abrasf.py +196 -0
- notasbr-0.4.1/tests/test_nfse_drivers_factory.py +76 -0
- notasbr-0.4.1/tests/test_nfse_errors.py +142 -0
- notasbr-0.4.1/tests/test_nfse_factory_ambiente.py +67 -0
- notasbr-0.4.1/tests/test_nfse_municipio_para_driver.py +117 -0
- notasbr-0.4.1/tests/test_nfse_roteamento.py +227 -0
- notasbr-0.4.1/tests/test_nfse_servico.py +369 -0
- notasbr-0.4.1/tests/test_nfse_servico_ramos.py +232 -0
- notasbr-0.4.1/tests/test_nfse_transport_classificacao.py +59 -0
- notasbr-0.4.1/tests/test_observabilidade_circuitos.py +45 -0
- notasbr-0.4.1/tests/test_openapi_sincronizado.py +50 -0
- notasbr-0.4.1/tests/test_ramos_auditor.py +123 -0
- notasbr-0.4.1/tests/test_ramos_cli.py +91 -0
- notasbr-0.4.1/tests/test_ramos_cofre.py +112 -0
- notasbr-0.4.1/tests/test_ramos_danfe.py +273 -0
- notasbr-0.4.1/tests/test_ramos_fiscal_app.py +267 -0
- notasbr-0.4.1/tests/test_ramos_plataforma.py +162 -0
- notasbr-0.4.1/tests/test_ramos_regras.py +122 -0
- notasbr-0.4.1/tests/test_ramos_rotas.py +227 -0
- notasbr-0.4.1/tests/test_ratelimit.py +94 -0
- notasbr-0.4.1/tests/test_ratelimit_instalado.py +91 -0
- notasbr-0.4.1/tests/test_regras_chave.py +154 -0
- notasbr-0.4.1/tests/test_regras_totais.py +130 -0
- notasbr-0.4.1/tests/test_regras_tributos.py +141 -0
- notasbr-0.4.1/tests/test_representacoes_rota.py +137 -0
- notasbr-0.4.1/tests/test_resiliencia.py +147 -0
- notasbr-0.4.1/tests/test_retorno_real_sefaz.py +47 -0
- notasbr-0.4.1/tests/test_rota_certificados.py +305 -0
- notasbr-0.4.1/tests/test_rota_consulta_cep.py +76 -0
- notasbr-0.4.1/tests/test_rota_fretes.py +337 -0
- notasbr-0.4.1/tests/test_rota_tax.py +105 -0
- notasbr-0.4.1/tests/test_rota_transportes_status.py +188 -0
- notasbr-0.4.1/tests/test_rotacionar_chave_mestra.py +166 -0
- notasbr-0.4.1/tests/test_rotas_cnpj_auditoria.py +205 -0
- notasbr-0.4.1/tests/test_rotas_v1_ramos.py +593 -0
- notasbr-0.4.1/tests/test_schema_dps.py +111 -0
- notasbr-0.4.1/tests/test_schemas_integridade.py +101 -0
- notasbr-0.4.1/tests/test_servicos_ramos.py +836 -0
- notasbr-0.4.1/tests/test_signer_exigir.py +74 -0
- notasbr-0.4.1/tests/test_soap_fault.py +85 -0
- notasbr-0.4.1/tests/test_soap_por_servico.py +150 -0
- notasbr-0.4.1/tests/test_tax_auditoria.py +113 -0
- notasbr-0.4.1/tests/test_tax_auditoria_db.py +142 -0
- notasbr-0.4.1/tests/test_tax_auditoria_rota.py +77 -0
- notasbr-0.4.1/tests/test_tax_integracao_emissao.py +88 -0
- notasbr-0.4.1/tests/test_tax_laudo_na_emissao.py +107 -0
- notasbr-0.4.1/tests/test_tax_rtc.py +189 -0
- notasbr-0.4.1/tests/test_tenants_certificados_servico.py +361 -0
- notasbr-0.4.1/tests/test_tls_raizes_sistema.py +36 -0
- notasbr-0.4.1/tests/test_transporte_emissao_rota.py +131 -0
- notasbr-0.4.1/tests/test_transporte_isolamento.py +159 -0
- notasbr-0.4.1/tests/test_transporte_rotas.py +59 -0
- notasbr-0.4.1/tests/test_transporte_schemas.py +178 -0
- notasbr-0.4.1/tests/test_transporte_status_rota.py +224 -0
- notasbr-0.4.1/tests/test_transporte_transmissao.py +76 -0
- notasbr-0.4.1/tests/test_ufs_e_municipios.py +167 -0
- notasbr-0.4.1/tests/test_ultimos_ramos.py +475 -0
- notasbr-0.4.1/tests/test_verificar_segredos.py +73 -0
- notasbr-0.4.1/tests/test_webhook_falha_permanente.py +78 -0
- notasbr-0.4.1/tests/test_webhooks.py +483 -0
- notasbr-0.4.1/tests/test_webhooks_erros.py +159 -0
- notasbr-0.4.1/tests/test_worker_healthcheck.py +137 -0
- notasbr-0.4.1/tests/test_worker_lote.py +151 -0
- notasbr-0.4.1/tests/test_worker_tarefas.py +174 -0
- notasbr-0.4.1/tests/test_wsdl_svrs.py +49 -0
- notasbr-0.4.1/tests/test_xml_util.py +112 -0
- notasbr-0.4.1/tests/test_xsd_paridade.py +74 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
**/__pycache__
|
|
2
|
+
**/*.py[cod]
|
|
3
|
+
.git
|
|
4
|
+
.gitignore
|
|
5
|
+
.venv
|
|
6
|
+
venv
|
|
7
|
+
.pytest_cache
|
|
8
|
+
.ruff_cache
|
|
9
|
+
.mypy_cache
|
|
10
|
+
.coverage
|
|
11
|
+
htmlcov
|
|
12
|
+
docs
|
|
13
|
+
tests
|
|
14
|
+
*.md
|
|
15
|
+
!README.md
|
|
16
|
+
.env
|
|
17
|
+
.env.*
|
|
18
|
+
*.pfx
|
|
19
|
+
*.p12
|
|
20
|
+
*.pem
|
|
21
|
+
*.key
|
|
22
|
+
*.log
|
|
23
|
+
pgdata
|
|
24
|
+
redisdata
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# open_notas_br — variáveis de ambiente
|
|
3
|
+
# Copie para `.env` e ajuste. NUNCA versione o `.env`.
|
|
4
|
+
# cp .env.example .env
|
|
5
|
+
# =============================================================================
|
|
6
|
+
|
|
7
|
+
# --- Aplicação ---------------------------------------------------------------
|
|
8
|
+
ENVIRONMENT=development
|
|
9
|
+
LOG_LEVEL=INFO
|
|
10
|
+
LOG_JSON=true
|
|
11
|
+
API_HOST=0.0.0.0
|
|
12
|
+
API_PORT=8080
|
|
13
|
+
|
|
14
|
+
# --- Portas no host (docker compose) -----------------------------------------
|
|
15
|
+
# Escolhidas fora das padrão porque outros projetos locais usam 5432/6379/8080.
|
|
16
|
+
POSTGRES_HOST_PORT=55434
|
|
17
|
+
REDIS_HOST_PORT=56379
|
|
18
|
+
API_HOST_PORT=8081
|
|
19
|
+
|
|
20
|
+
# --- Banco de dados ----------------------------------------------------------
|
|
21
|
+
# Dentro do compose o host é `postgres`; fora dele use 127.0.0.1:55434.
|
|
22
|
+
# A porta do host é configurável em POSTGRES_HOST_PORT (padrão 55434),
|
|
23
|
+
# para não colidir com outro PostgreSQL local.
|
|
24
|
+
DATABASE_URL=postgresql+asyncpg://notasbr:notasbr@postgres:5432/notasbr
|
|
25
|
+
DB_POOL_SIZE=10
|
|
26
|
+
DB_MAX_OVERFLOW=20
|
|
27
|
+
DB_ECHO=false
|
|
28
|
+
|
|
29
|
+
# --- Redis (fila ARQ + cache) ------------------------------------------------
|
|
30
|
+
REDIS_URL=redis://redis:6379/0
|
|
31
|
+
|
|
32
|
+
# --- Chave-mestra do cofre de certificados -----------------------------------
|
|
33
|
+
# 32 bytes em base64. Gere a sua:
|
|
34
|
+
# python -c "import base64,os; print(base64.b64encode(os.urandom(32)).decode())"
|
|
35
|
+
#
|
|
36
|
+
# NUNCA versione este valor. Perder a chave significa perder todos os
|
|
37
|
+
# certificados A1 selados com ela — não há recuperação.
|
|
38
|
+
#
|
|
39
|
+
# Deixe VAZIO apenas em desenvolvimento: a aplicação gera uma chave efêmera em
|
|
40
|
+
# memória e avisa no log. Certificados selados com chave efêmera ficam
|
|
41
|
+
# ilegíveis após reiniciar. Em produção (ENVIRONMENT=production) é obrigatório.
|
|
42
|
+
MASTER_ENCRYPTION_KEY=
|
|
43
|
+
|
|
44
|
+
# --- Token administrativo (bootstrap de tenants) -----------------------------
|
|
45
|
+
# Protege POST /v1/tenants. Gere com:
|
|
46
|
+
# python -c "import secrets; print(secrets.token_urlsafe(32))"
|
|
47
|
+
# Vazio só é aceito em desenvolvimento.
|
|
48
|
+
ADMIN_API_TOKEN=
|
|
49
|
+
|
|
50
|
+
# --- NFS-e Nacional (SEFIN / ADN) — Fase 3 -----------------------------------
|
|
51
|
+
# [A VALIDAR] A URL base NÃO foi confirmada em fonte oficial nesta execução.
|
|
52
|
+
# O adapter lê daqui; nenhum endpoint é hardcoded no código.
|
|
53
|
+
SEFIN_BASE_URL=
|
|
54
|
+
SEFIN_HOMOLOGACAO_BASE_URL=
|
|
55
|
+
SEFIN_PRODUCAO_BASE_URL=
|
|
56
|
+
SEFIN_TIMEOUT_SECONDS=30
|
|
57
|
+
# Permitir host que nao seja nfse.gov.br (espelho interno). Desligado por padrao.
|
|
58
|
+
SEFIN_PERMITIR_HOST_NAO_OFICIAL=false
|
|
59
|
+
# `sefin` = cliente real da SEFIN/ADN (padrao).
|
|
60
|
+
# `mock` = duble deterministico: exercita o fluxo completo sem certificado real.
|
|
61
|
+
NFSE_ADAPTER=sefin
|
|
62
|
+
|
|
63
|
+
# --- CNPJ (Serpro) — Fase 3 --------------------------------------------------
|
|
64
|
+
# A API Serpro tem cota (30 dias grátis / 3.000 consultas) e cobra depois.
|
|
65
|
+
# Sem token, o serviço cai no fallback de dados abertos da RFB.
|
|
66
|
+
SERPRO_CNPJ_TOKEN=
|
|
67
|
+
SERPRO_CNPJ_BASE_URL=https://gateway.apiserpro.serpro.gov.br/consulta-cnpj-df-v1
|
|
68
|
+
CNPJ_CACHE_TTL_SECONDS=86400
|
|
69
|
+
CNPJ_RATE_LIMIT_PER_SECOND=5
|
|
70
|
+
CNPJ_FALLBACK_ENABLED=true
|
|
71
|
+
|
|
72
|
+
# --- Reforma Tributária (IBS/CBS) — Fase 3 -----------------------------------
|
|
73
|
+
# Alíquotas de referência são DADO versionado por competência, não constante de
|
|
74
|
+
# código. Valores iniciais 2026 conforme premissa do briefing.
|
|
75
|
+
RTC_CBS_ALIQUOTA_2026=0.009
|
|
76
|
+
RTC_IBS_ALIQUOTA_2026=0.001
|
|
77
|
+
|
|
78
|
+
# --- Webhooks — Fase 5 -------------------------------------------------------
|
|
79
|
+
WEBHOOK_TIMEOUT_SECONDS=10
|
|
80
|
+
WEBHOOK_MAX_ATTEMPTS=5
|
|
81
|
+
|
|
82
|
+
# --- API ---------------------------------------------------------------------
|
|
83
|
+
API_PAGE_SIZE_DEFAULT=50
|
|
84
|
+
API_PAGE_SIZE_MAX=200
|
|
85
|
+
|
|
86
|
+
# --- CORS --------------------------------------------------------------------
|
|
87
|
+
# Origens permitidas para chamada a partir de navegador, separadas por vírgula.
|
|
88
|
+
# Em produção, liste os domínios dos parceiros (ex.: https://dz23.com.br).
|
|
89
|
+
# Vazio = navegador não é permitido, o que é o padrão seguro para API server-side.
|
|
90
|
+
CORS_ORIGINS=
|
|
91
|
+
|
|
92
|
+
# -- Frete / etiqueta de envio (Melhor Envio) ---------------------------------
|
|
93
|
+
# Credenciais do APLICATIVO, uma por plataforma (não por lojista). O token de cada
|
|
94
|
+
# lojista vem por OAuth e é guardado cifrado por tenant.
|
|
95
|
+
# Cadastre o app em https://app.melhorenvio.com.br/integracoes/area-dev
|
|
96
|
+
# A redirect_uri abaixo precisa ser IDÊNTICA à cadastrada no app.
|
|
97
|
+
MELHOR_ENVIO_CLIENT_ID=
|
|
98
|
+
MELHOR_ENVIO_CLIENT_SECRET=
|
|
99
|
+
MELHOR_ENVIO_REDIRECT_URI=http://127.0.0.1:8081/v1/fretes/oauth/callback
|
|
100
|
+
# true = sandbox.melhorenvio.com.br. Produção compra etiqueta de verdade.
|
|
101
|
+
MELHOR_ENVIO_SANDBOX=true
|
|
102
|
+
|
|
103
|
+
# Rate limit por tenant. Desligado por padrão: ligar muda o comportamento de todas as
|
|
104
|
+
# rotas. Quem quiser ligar, liga explicitamente.
|
|
105
|
+
RATE_LIMIT_HABILITADO=false
|
|
106
|
+
RATE_LIMIT_POR_MINUTO=60
|
|
107
|
+
|
|
108
|
+
# Operações de plataforma (replay de DLQ). Desligado por padrão: sem chave, a rota
|
|
109
|
+
# responde 404. Ver docs/adr/0001-admin-auth.md.
|
|
110
|
+
ADMIN_HABILITADO=false
|
|
111
|
+
ADMIN_API_KEY=
|
|
112
|
+
|
|
113
|
+
# Se `true`, `/health` responde 503 quando o worker não está batendo. Padrão `false`:
|
|
114
|
+
# API e worker escalam separado, e uma API sem worker ainda serve leitura e consulta.
|
|
115
|
+
# O estado do worker é sempre REPORTADO em /health; esta flag decide só se ele reprova.
|
|
116
|
+
READINESS_EXIGE_WORKER=false
|
|
117
|
+
|
|
118
|
+
# Se `true`, hash de XSD divergente do manifesto IMPEDE o boot. Padrão `false`: a verificação roda
|
|
119
|
+
# sempre (aviso no log), mas não derruba a API — nem todo schema tem procedência oficial confirmada,
|
|
120
|
+
# e trocar risco de integridade por risco de indisponibilidade não é decisão automática.
|
|
121
|
+
XSD_INTEGRIDADE_STRICT=false
|
|
122
|
+
|
|
123
|
+
# Tempos aplicados NO SERVIDOR (server_settings do asyncpg), válidos para todo o pool.
|
|
124
|
+
# statement_timeout: teto por consulta. Sem ele, uma consulta travada segura a conexão e o
|
|
125
|
+
# pool de 10 conexões derruba a API. Lote/apuração longa deve rodar no worker, não aumentar isto.
|
|
126
|
+
DB_STATEMENT_TIMEOUT_MS=60000
|
|
127
|
+
# Transação ociosa: o Postgres derruba a sessão em vez de deixá-la presa.
|
|
128
|
+
DB_IDLE_TX_TIMEOUT_MS=120000
|
|
129
|
+
# Teto do WORKER (10 min). Um lote de emissoes dura minutos; se herdasse o teto da API (60s)
|
|
130
|
+
# o lote seria abortado no meio, deixando documentos processados pela metade.
|
|
131
|
+
DB_STATEMENT_TIMEOUT_WORKER_MS=600000
|
|
132
|
+
# Recicla conexões antigas (firewall/PgBouncer fecham conexão ociosa em silêncio).
|
|
133
|
+
DB_POOL_RECYCLE_S=1800
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Fim de linha: o manifesto SHA-256 dos XSD compara BYTES.
|
|
2
|
+
#
|
|
3
|
+
# Histórico (27/11/2026): a regra anterior era `tests/fixtures/schemas/** text eol=lf`. Como os pacotes
|
|
4
|
+
# oficiais da NFS-e publicam os `.xsd` com **CRLF**, o git normalizava para LF no checkout e o manifesto
|
|
5
|
+
# — gerado no Windows sobre os bytes publicados — passava a divergir no Linux do CI: 10 schemas
|
|
6
|
+
# "alterados" sem ninguém tocá-los.
|
|
7
|
+
#
|
|
8
|
+
# Decisão: `.xsd` fica `-text` (sem normalização). Assim o byte do repositório é o byte publicado, e o
|
|
9
|
+
# hash confere em qualquer sistema. O manifesto também é `-text` pelo mesmo motivo.
|
|
10
|
+
* text=auto
|
|
11
|
+
data/xsd_manifest.json -text
|
|
12
|
+
*.xsd -text
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Código de Conduta para Contribuidores
|
|
2
|
+
|
|
3
|
+
## Nosso compromisso
|
|
4
|
+
|
|
5
|
+
Nós, como membros, contribuidores e líderes, nos comprometemos a fazer da participação neste projeto uma
|
|
6
|
+
experiência livre de assédio para todos, independentemente de idade, tamanho corporal, deficiência
|
|
7
|
+
visível ou invisível, etnia, características sexuais, identidade e expressão de gênero, nível de
|
|
8
|
+
experiência, educação, nível socioeconômico, nacionalidade, aparência pessoal, raça, religião ou
|
|
9
|
+
identidade e orientação sexual.
|
|
10
|
+
|
|
11
|
+
Comprometemo-nos a agir e interagir de maneiras que contribuam para uma comunidade aberta, acolhedora,
|
|
12
|
+
diversa, inclusiva e saudável.
|
|
13
|
+
|
|
14
|
+
## Nossos padrões
|
|
15
|
+
|
|
16
|
+
Exemplos de comportamentos que contribuem para um ambiente positivo:
|
|
17
|
+
|
|
18
|
+
- Demonstrar empatia e bondade com as outras pessoas
|
|
19
|
+
- Respeitar opiniões, pontos de vista e experiências divergentes
|
|
20
|
+
- Dar e aceitar com elegância feedback construtivo
|
|
21
|
+
- Assumir responsabilidade e pedir desculpas às pessoas afetadas por nossos erros, aprendendo com a
|
|
22
|
+
experiência
|
|
23
|
+
- Focar no que é melhor não apenas para nós individualmente, mas para a comunidade em geral
|
|
24
|
+
|
|
25
|
+
Exemplos de comportamentos inaceitáveis:
|
|
26
|
+
|
|
27
|
+
- Uso de linguagem ou imagens sexualizadas, e atenção ou avanços sexuais de qualquer tipo
|
|
28
|
+
- Comentários insultuosos ou depreciativos (_trolling_), e ataques pessoais ou políticos
|
|
29
|
+
- Assédio público ou privado
|
|
30
|
+
- Publicar informações privadas de outras pessoas, como endereço físico ou de e-mail, sem permissão
|
|
31
|
+
explícita
|
|
32
|
+
- Outra conduta que possa ser razoavelmente considerada inadequada em um ambiente profissional
|
|
33
|
+
|
|
34
|
+
## Responsabilidades de aplicação
|
|
35
|
+
|
|
36
|
+
Os líderes da comunidade são responsáveis por esclarecer e aplicar nossos padrões de comportamento
|
|
37
|
+
aceitável e tomarão medidas corretivas apropriadas e justas em resposta a qualquer comportamento que
|
|
38
|
+
considerem inadequado, ameaçador, ofensivo ou prejudicial.
|
|
39
|
+
|
|
40
|
+
Os líderes da comunidade têm o direito e a responsabilidade de remover, editar ou rejeitar comentários,
|
|
41
|
+
commits, código, edições de wiki, issues e outras contribuições que não estejam alinhadas a este Código
|
|
42
|
+
de Conduta, e comunicarão os motivos das decisões de moderação quando apropriado.
|
|
43
|
+
|
|
44
|
+
## Escopo
|
|
45
|
+
|
|
46
|
+
Este Código de Conduta se aplica em todos os espaços do projeto e também quando um indivíduo estiver
|
|
47
|
+
representando oficialmente o projeto em espaços públicos. Exemplos de representação do nosso projeto
|
|
48
|
+
incluem o uso de um endereço de e-mail oficial, a publicação por meio de uma conta oficial de mídia
|
|
49
|
+
social ou a atuação como representante nomeado em um evento online ou offline.
|
|
50
|
+
|
|
51
|
+
## Aplicação
|
|
52
|
+
|
|
53
|
+
Casos de comportamento abusivo, de assédio ou de outra forma inaceitável podem ser reportados aos
|
|
54
|
+
líderes da comunidade responsáveis pela aplicação.
|
|
55
|
+
|
|
56
|
+
> **Canal de contato:** use o canal privado do GitHub —
|
|
57
|
+
> [Security Advisories](https://github.com/LMPrado-DZ23/open_notas_br/security/advisories/new) —
|
|
58
|
+
> começando o título com **`Code of Conduct:`**. O relato fica privado, visível apenas para o mantenedor,
|
|
59
|
+
> e não passa por issue pública.
|
|
60
|
+
>
|
|
61
|
+
> **Por que não um e-mail:** o projeto não tem endereço dedicado a conduta publicado, e apontar para o
|
|
62
|
+
> e-mail pessoal do mantenedor convida a contato direto e assédio — exatamente o que este documento
|
|
63
|
+
> existe para impedir. Um alias dedicado (`conduct@…`) será publicado aqui quando existir; até então, o
|
|
64
|
+
> canal acima é o oficial e é confidencial.
|
|
65
|
+
>
|
|
66
|
+
> **Vulnerabilidade técnica não é assunto deste canal de conduta** — para isso existe o fluxo de
|
|
67
|
+
> `SECURITY.md`, com o mesmo endereço e prazo de resposta declarado.
|
|
68
|
+
|
|
69
|
+
Todas as reclamações serão analisadas e investigadas de forma rápida e justa.
|
|
70
|
+
|
|
71
|
+
Todos os líderes da comunidade são obrigados a respeitar a privacidade e a segurança de quem relatar
|
|
72
|
+
qualquer incidente.
|
|
73
|
+
|
|
74
|
+
## Diretrizes de aplicação
|
|
75
|
+
|
|
76
|
+
Os líderes da comunidade seguirão estas diretrizes de impacto na comunidade para determinar as
|
|
77
|
+
consequências de qualquer ação que considerem violar este Código de Conduta:
|
|
78
|
+
|
|
79
|
+
### 1. Correção
|
|
80
|
+
|
|
81
|
+
**Impacto na comunidade:** uso de linguagem inadequada ou outro comportamento considerado não
|
|
82
|
+
profissional ou indesejado na comunidade.
|
|
83
|
+
|
|
84
|
+
**Consequência:** uma advertência privada e por escrito dos líderes da comunidade, fornecendo clareza
|
|
85
|
+
sobre a natureza da violação e uma explicação de por que o comportamento foi inadequado. Um pedido de
|
|
86
|
+
desculpas público pode ser solicitado.
|
|
87
|
+
|
|
88
|
+
### 2. Advertência
|
|
89
|
+
|
|
90
|
+
**Impacto na comunidade:** uma violação por meio de um único incidente ou série de ações.
|
|
91
|
+
|
|
92
|
+
**Consequência:** uma advertência com consequências para o comportamento continuado. Nenhuma interação
|
|
93
|
+
com as pessoas envolvidas, incluindo interação não solicitada com quem aplica o Código de Conduta, por
|
|
94
|
+
um período especificado. Isso inclui evitar interações em espaços da comunidade, bem como canais
|
|
95
|
+
externos como mídias sociais. Violar estes termos pode levar a uma proibição temporária ou permanente.
|
|
96
|
+
|
|
97
|
+
### 3. Proibição temporária
|
|
98
|
+
|
|
99
|
+
**Impacto na comunidade:** uma violação grave dos padrões da comunidade, incluindo comportamento
|
|
100
|
+
inadequado continuado.
|
|
101
|
+
|
|
102
|
+
**Consequência:** proibição temporária de qualquer tipo de interação ou comunicação pública com a
|
|
103
|
+
comunidade por um período especificado. Nenhuma interação pública ou privada com as pessoas envolvidas,
|
|
104
|
+
incluindo interação não solicitada com quem aplica o Código de Conduta, é permitida durante este período.
|
|
105
|
+
Violar estes termos pode levar a uma proibição permanente.
|
|
106
|
+
|
|
107
|
+
### 4. Proibição permanente
|
|
108
|
+
|
|
109
|
+
**Impacto na comunidade:** demonstração de um padrão de violação dos padrões da comunidade, incluindo
|
|
110
|
+
comportamento inadequado continuado, assédio a um indivíduo ou agressão ou menosprezo a classes de
|
|
111
|
+
indivíduos.
|
|
112
|
+
|
|
113
|
+
**Consequência:** proibição permanente de qualquer tipo de interação pública dentro da comunidade.
|
|
114
|
+
|
|
115
|
+
## Atribuição
|
|
116
|
+
|
|
117
|
+
Este Código de Conduta é adaptado do [Contributor Covenant](https://www.contributor-covenant.org),
|
|
118
|
+
versão 2.1, disponível em
|
|
119
|
+
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
|
|
120
|
+
|
|
121
|
+
As diretrizes de impacto na comunidade foram inspiradas na
|
|
122
|
+
[escada de aplicação do código de conduta da Mozilla](https://github.com/mozilla/diversity).
|
|
123
|
+
|
|
124
|
+
Para respostas a perguntas comuns sobre este código de conduta, veja o FAQ em
|
|
125
|
+
<https://www.contributor-covenant.org/faq>. Traduções estão disponíveis em
|
|
126
|
+
<https://www.contributor-covenant.org/translations>.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: Relatar problema
|
|
2
|
+
description: Algo não funcionou como deveria
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
**Não cole certificado, senha, token ou dado pessoal de terceiro.**
|
|
9
|
+
Se for falha de segurança, use o canal privado (ver SECURITY.md).
|
|
10
|
+
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: o-que
|
|
13
|
+
attributes:
|
|
14
|
+
label: O que aconteceu
|
|
15
|
+
description: Comportamento observado e o que você esperava que acontecesse.
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: reproduzir
|
|
21
|
+
attributes:
|
|
22
|
+
label: Como reproduzir
|
|
23
|
+
description: Comandos, chamada de API ou teste que reproduz. Se possível, o menor caso.
|
|
24
|
+
render: shell
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
|
|
28
|
+
- type: dropdown
|
|
29
|
+
id: ambiente
|
|
30
|
+
attributes:
|
|
31
|
+
label: Como você está rodando
|
|
32
|
+
options:
|
|
33
|
+
- Docker Compose (`docker compose up`)
|
|
34
|
+
- Local (venv + Postgres/Redis fora do Compose)
|
|
35
|
+
- Outro (descreva nos detalhes)
|
|
36
|
+
validations:
|
|
37
|
+
required: true
|
|
38
|
+
|
|
39
|
+
- type: dropdown
|
|
40
|
+
id: adaptador
|
|
41
|
+
attributes:
|
|
42
|
+
label: Qual adaptador de SEFIN estava ativo?
|
|
43
|
+
description: >
|
|
44
|
+
O adaptador `mock` responde sem rede. Se o problema só acontece no adaptador `mock`, ele é de
|
|
45
|
+
software e não de comunicação com a SEFAZ — isso muda a triagem.
|
|
46
|
+
options:
|
|
47
|
+
- "mock (padrão de teste, sem rede)"
|
|
48
|
+
- "real (Produção Restrita, tpAmb=2)"
|
|
49
|
+
- "real (Produção, tpAmb=1)"
|
|
50
|
+
- "Não sei / não configurado"
|
|
51
|
+
validations:
|
|
52
|
+
required: true
|
|
53
|
+
|
|
54
|
+
- type: input
|
|
55
|
+
id: versao
|
|
56
|
+
attributes:
|
|
57
|
+
label: Versão / commit
|
|
58
|
+
description: Saída de `git rev-parse --short HEAD` ou a versão do `pyproject.toml`.
|
|
59
|
+
validations:
|
|
60
|
+
required: true
|
|
61
|
+
|
|
62
|
+
- type: textarea
|
|
63
|
+
id: logs
|
|
64
|
+
attributes:
|
|
65
|
+
label: Logs relevantes
|
|
66
|
+
description: >
|
|
67
|
+
Trecho do log, da resposta HTTP ou da saída do `pytest`. Remova CNPJ, e-mail, endereço, chave de
|
|
68
|
+
acesso e qualquer dado de terceiro antes de colar.
|
|
69
|
+
render: shell
|
|
70
|
+
validations:
|
|
71
|
+
required: false
|
|
72
|
+
|
|
73
|
+
- type: dropdown
|
|
74
|
+
id: confianca
|
|
75
|
+
attributes:
|
|
76
|
+
label: A parte envolvida está marcada com qual etiqueta?
|
|
77
|
+
description: A etiqueta de confiança indica se aquele trecho foi validado contra a fonte oficial.
|
|
78
|
+
options:
|
|
79
|
+
- "[CONFIRMADO] — validado contra fonte oficial"
|
|
80
|
+
- "[INFERIDO] — inferência a partir de padrão similar"
|
|
81
|
+
- "[A VALIDAR] — depende de validação oficial"
|
|
82
|
+
- "Não sei"
|
|
83
|
+
validations:
|
|
84
|
+
required: true
|
|
85
|
+
|
|
86
|
+
- type: checkboxes
|
|
87
|
+
id: confirmacoes
|
|
88
|
+
attributes:
|
|
89
|
+
label: Confirmações
|
|
90
|
+
options:
|
|
91
|
+
- label: Removi certificado, senha, token e dado pessoal de terceiro deste relato.
|
|
92
|
+
required: true
|
|
93
|
+
- label: Procurei issues existentes antes de abrir esta.
|
|
94
|
+
required: true
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Templates de issue.
|
|
2
|
+
blank_issues_enabled: false
|
|
3
|
+
|
|
4
|
+
contact_links:
|
|
5
|
+
- name: Falha de segurança
|
|
6
|
+
url: https://github.com/LMPrado-DZ23/open_notas_br/security/advisories/new
|
|
7
|
+
about: Não abra issue pública para vulnerabilidade. Use o canal privado descrito em SECURITY.md.
|
|
8
|
+
|
|
9
|
+
- name: Perguntas, ideias e ajuda de uso
|
|
10
|
+
url: https://github.com/LMPrado-DZ23/open_notas_br/discussions
|
|
11
|
+
about: Dúvida de uso e ideia crua vão em Discussions (Q&A ou Ideas), não em issue. Veja também README#suporte.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: Sugerir melhoria
|
|
2
|
+
description: Ideia, novo documento fiscal ou integração
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problema
|
|
7
|
+
attributes:
|
|
8
|
+
label: Que problema isso resolve
|
|
9
|
+
description: Descreva a situação real, não a solução.
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: solucao
|
|
15
|
+
attributes:
|
|
16
|
+
label: Solução proposta
|
|
17
|
+
description: O que você gostaria que existisse. Se for endpoint, esboce o contrato.
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: alternativas
|
|
23
|
+
attributes:
|
|
24
|
+
label: Alternativas consideradas
|
|
25
|
+
description: >
|
|
26
|
+
O que já existe hoje no projeto para esse problema, e por que não resolve. Se hoje não existe nada,
|
|
27
|
+
diga isso — evita propor o que já está em `docs/ROADMAP.md`.
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
|
|
31
|
+
- type: textarea
|
|
32
|
+
id: fonte
|
|
33
|
+
attributes:
|
|
34
|
+
label: Fonte oficial (se a sugestão envolve regra fiscal)
|
|
35
|
+
description: |
|
|
36
|
+
Se você está propondo comportamento fiscal, cite a fonte — nota técnica,
|
|
37
|
+
manual, XSD ou resolução. Sem fonte, a contribuição entra como [A VALIDAR]
|
|
38
|
+
e fica isolada até alguém confirmar.
|
|
39
|
+
validations:
|
|
40
|
+
required: false
|
|
41
|
+
|
|
42
|
+
- type: dropdown
|
|
43
|
+
id: tenancy
|
|
44
|
+
attributes:
|
|
45
|
+
label: A mudança afeta multi-tenancy?
|
|
46
|
+
description: >
|
|
47
|
+
Toda consulta neste projeto filtra por `tenant_id` vindo da credencial. Uma proposta que exija
|
|
48
|
+
dado compartilhado entre tenants, ou que leia `tenant_id` do corpo da requisição, precisa dizer
|
|
49
|
+
isso aqui.
|
|
50
|
+
options:
|
|
51
|
+
- "Não — é por tenant, sem estado compartilhado"
|
|
52
|
+
- "Sim — exige estado compartilhado entre tenants (explique abaixo)"
|
|
53
|
+
- "Não sei"
|
|
54
|
+
validations:
|
|
55
|
+
required: true
|
|
56
|
+
|
|
57
|
+
- type: dropdown
|
|
58
|
+
id: seguranca
|
|
59
|
+
attributes:
|
|
60
|
+
label: A mudança afeta segurança ou dado sensível?
|
|
61
|
+
options:
|
|
62
|
+
- "Não"
|
|
63
|
+
- "Sim — toca certificado, chave, segredo ou dado pessoal (explique abaixo)"
|
|
64
|
+
- "Não sei"
|
|
65
|
+
validations:
|
|
66
|
+
required: true
|
|
67
|
+
|
|
68
|
+
- type: checkboxes
|
|
69
|
+
id: confirmacoes
|
|
70
|
+
attributes:
|
|
71
|
+
label: Confirmações
|
|
72
|
+
options:
|
|
73
|
+
- label: Não incluí certificado, senha ou dado pessoal nesta issue.
|
|
74
|
+
required: true
|
|
75
|
+
- label: Consultei `docs/ROADMAP.md` e `docs/ESCOPO-NEGATIVO.md`.
|
|
76
|
+
required: true
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
## O que muda
|
|
2
|
+
|
|
3
|
+
<!-- Uma frase. Se precisar de duas, o PR está grande. -->
|
|
4
|
+
|
|
5
|
+
## Por que
|
|
6
|
+
|
|
7
|
+
## Etiqueta de confiança
|
|
8
|
+
|
|
9
|
+
- [ ] `[CONFIRMADO]` contra fonte oficial (cite no código)
|
|
10
|
+
- [ ] `[INFERIDO]` (explique de onde veio)
|
|
11
|
+
- [ ] `[A VALIDAR]` — isolado em adapter/dublê, não na lógica principal
|
|
12
|
+
|
|
13
|
+
## Checklist
|
|
14
|
+
|
|
15
|
+
- [ ] Adicionei ou atualizei **teste** que falha sem esta mudança
|
|
16
|
+
- [ ] Atualizei a **documentação** afetada (`README.md`, `docs/`, docstring)
|
|
17
|
+
- [ ] Rodei **`python -m scripts.check_ci`** e as 9 verificações passaram
|
|
18
|
+
- [ ] **Não quebrei compatibilidade** da API pública (ou descrevi a quebra abaixo)
|
|
19
|
+
- [ ] Se toquei em regra fiscal, citei a **fonte oficial** (norte, manual, XSD) e o hash
|
|
20
|
+
- [ ] Se adicionei dependência, registrei a decisão em `docs/DECISOES.md`
|
|
21
|
+
- [ ] Não incluí certificado, chave, token ou dado pessoal de terceiro
|
|
22
|
+
|
|
23
|
+
## Verificação
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
ruff check . && pytest
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
<!-- Cole a saída real. "Deve funcionar" não é verificação. -->
|
|
30
|
+
|
|
31
|
+
## Compatibilidade (preencha se houver quebra)
|
|
32
|
+
|
|
33
|
+
<!-- Endpoint removido, campo renomeado, resposta que muda de status: diga qual e quem afeta. -->
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Dependabot: atualizações semanais, agrupadas por ecossistema.
|
|
2
|
+
#
|
|
3
|
+
# Por que semanal e não diário: cada PR de dependência roda a suíte inteira (2.527 testes) e o gate de
|
|
4
|
+
# 9 verificações. Diário geraria fila de PRs que ninguém revisa, e PR de dependência acumulado é pior que
|
|
5
|
+
# PR nenhum. Segunda-feira de manhã dá a semana inteira para revisar.
|
|
6
|
+
#
|
|
7
|
+
# Segurança continua fora do ciclo semanal: alerta do Dependabot abre PR imediatamente, independente disto.
|
|
8
|
+
|
|
9
|
+
version: 2
|
|
10
|
+
|
|
11
|
+
updates:
|
|
12
|
+
- package-ecosystem: "pip"
|
|
13
|
+
directory: "/"
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "weekly"
|
|
16
|
+
day: "monday"
|
|
17
|
+
time: "06:00"
|
|
18
|
+
timezone: "America/Sao_Paulo"
|
|
19
|
+
open-pull-requests-limit: 5
|
|
20
|
+
versioning-strategy: "increase-if-necessary"
|
|
21
|
+
commit-message:
|
|
22
|
+
prefix: "build"
|
|
23
|
+
include: "scope"
|
|
24
|
+
groups:
|
|
25
|
+
# Ferramentas de desenvolvimento juntas: sobem sem risco de contrato fiscal.
|
|
26
|
+
dev-tools:
|
|
27
|
+
patterns:
|
|
28
|
+
- "ruff"
|
|
29
|
+
- "mypy"
|
|
30
|
+
- "pytest*"
|
|
31
|
+
- "types-*"
|
|
32
|
+
update-types: ["minor", "patch"]
|
|
33
|
+
# Runtime agrupado por família, para não abrir 8 PRs do ecossistema SQLAlchemy/Pydantic.
|
|
34
|
+
runtime:
|
|
35
|
+
patterns:
|
|
36
|
+
- "fastapi"
|
|
37
|
+
- "starlette"
|
|
38
|
+
- "pydantic*"
|
|
39
|
+
- "sqlalchemy"
|
|
40
|
+
- "asyncpg"
|
|
41
|
+
- "alembic"
|
|
42
|
+
update-types: ["minor", "patch"]
|
|
43
|
+
labels:
|
|
44
|
+
- "dependencies"
|
|
45
|
+
|
|
46
|
+
- package-ecosystem: "github-actions"
|
|
47
|
+
directory: "/"
|
|
48
|
+
schedule:
|
|
49
|
+
interval: "weekly"
|
|
50
|
+
day: "monday"
|
|
51
|
+
time: "06:00"
|
|
52
|
+
timezone: "America/Sao_Paulo"
|
|
53
|
+
open-pull-requests-limit: 5
|
|
54
|
+
commit-message:
|
|
55
|
+
prefix: "ci"
|
|
56
|
+
groups:
|
|
57
|
+
actions:
|
|
58
|
+
patterns: ["*"]
|
|
59
|
+
update-types: ["minor", "patch"]
|
|
60
|
+
labels:
|
|
61
|
+
- "dependencies"
|
|
62
|
+
- "ci"
|
|
63
|
+
|
|
64
|
+
- package-ecosystem: "docker"
|
|
65
|
+
directory: "/"
|
|
66
|
+
schedule:
|
|
67
|
+
interval: "weekly"
|
|
68
|
+
day: "monday"
|
|
69
|
+
time: "06:00"
|
|
70
|
+
timezone: "America/Sao_Paulo"
|
|
71
|
+
open-pull-requests-limit: 3
|
|
72
|
+
commit-message:
|
|
73
|
+
prefix: "build"
|
|
74
|
+
labels:
|
|
75
|
+
- "dependencies"
|