From 973b474274f686d53cf48a631f234dc23b6d5fa5 Mon Sep 17 00:00:00 2001 From: Robson Date: Fri, 22 Nov 2024 14:13:51 -0300 Subject: [PATCH] fix: change receita federal url --- Makefile | 58 +++++++++++++++++++++++----------------------- src/io/__init__.py | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 71e46aa..cff7630 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,9 @@ all: @echo "" @echo "########################################################################################################################" @echo "[SESSION] Launch" - @echo "make up ......................................... docker-compose up -d" - @echo "make stop ....................................... docker-compose stop" - @echo "make down ....................................... docker-compose down" + @echo "make up ......................................... docker compose up -d" + @echo "make stop ....................................... docker compose stop" + @echo "make down ....................................... docker compose down" @echo "make app ........................................ run container app" @echo "make rm ......................................... remove all exited containers and all dangling volumes" @echo "" @@ -47,25 +47,25 @@ build-img: up: @echo "---------------------------------------" - @echo "docker-compose up -d" - @docker-compose up -d + @echo "docker compose up -d" + @docker compose up -d @echo "" stop: @echo "---------------------------------------" - @echo "docker-compose stop" - @docker-compose stop + @echo "docker compose stop" + @docker compose stop @echo "" down: @echo "---------------------------------------" - @echo "docker-compose down" - @docker-compose down + @echo "docker compose down" + @docker compose down @echo "" app: up @echo "compose-up run app container" - @docker-compose run --rm app + @docker compose run --rm app @echo "" rm: down @@ -82,24 +82,24 @@ rm: down db-create: up @echo "PHOENIX" - @docker-compose run app python -c "from src.db_models.utils import create_db; create_db()" + @docker compose run app python -c "from src.db_models.utils import create_db; create_db()" @echo "" db-create-tables: up @echo "Creating tables" - @docker-compose run app python -c "from src.db_models.utils import create_or_drop_all_tables; create_or_drop_all_tables(cmd='create')" + @docker compose run app python -c "from src.db_models.utils import create_or_drop_all_tables; create_or_drop_all_tables(cmd='create')" @echo "" db-setup: up @echo "SETUP" @echo "sleeping 40 seconds in order to postgres start-up" @echo "Creating db" - @docker-compose run app python -c "from src.db_models.utils import create_db, create_or_drop_all_tables; create_db();create_or_drop_all_tables(cmd='create')" + @docker compose run app python -c "from src.db_models.utils import create_db, create_or_drop_all_tables; create_db();create_or_drop_all_tables(cmd='create')" @echo "" db-phoenix: up @echo "PHOENIX" - @docker-compose run app python -c "from src.db_models.utils import phoenix; phoenix()" + @docker compose run app python -c "from src.db_models.utils import phoenix; phoenix()" @echo "" db-enter: up @@ -107,29 +107,29 @@ db-enter: up tests: up @echo "compose-up run app & [PYTEST]" - @docker-compose run app python -m pytest + @docker compose run app python -m pytest @echo "" io-download: up @echo "compose-up run app container & [DOWNLOAD]" - @docker-compose run app python src/io/download.py + @docker compose run app python src/io/download.py @echo "" io-unzip: up @echo "compose-up run app container & [UNZIP]" - @docker-compose run app python src/io/unzip.py + @docker compose run app python src/io/unzip.py @echo "" @echo "[CREATE JSONS]" - @docker-compose run app python src/io/create_jsons_from_csv.py + @docker compose run app python src/io/create_jsons_from_csv.py io-create-jsons: up @echo "[CREATE JSONS]" - @docker-compose run app python src/io/create_jsons_from_csv.py + @docker compose run app python src/io/create_jsons_from_csv.py io-download-and-unzip: up @echo "compose-up run app container & [DOWNLOAD]" - @docker-compose run app python src/io/download.py + @docker compose run app python src/io/download.py @echo "" @echo "------------------------" @echo "sleep for 30 seconds to take a breath" @@ -137,42 +137,42 @@ io-download-and-unzip: up @echo "" @echo "------------------------" @echo "[UNZIP]" - @docker-compose run app python src/io/unzip.py + @docker compose run app python src/io/unzip.py @echo "" @echo "[CREATE JSONS]" - @docker-compose run app python src/io/create_jsons_from_csv.py + @docker compose run app python src/io/create_jsons_from_csv.py engine-company: up @echo "compose-up run app container & [ENGINE COMPANY]" - @docker-compose run app python src/engine/company.py + @docker compose run app python src/engine/company.py @echo "" engine-company-tax-regime: up @echo "compose-up run app container & [ENGINE COMPANY TAX REGIME]" - @docker-compose run app python src/engine/company_tax_regime.py + @docker compose run app python src/engine/company_tax_regime.py @echo "" engine-company-root: up @echo "compose-up run app container & [ENGINE COMPANY ROOT]" - @docker-compose run app python src/engine/company_root.py + @docker compose run app python src/engine/company_root.py @echo "" engine-company-root-simples: up @echo "compose-up run app container & [ENGINE COMPANY ROOT SIMPLES]" - @docker-compose run app python src/engine/company_root_simples.py + @docker compose run app python src/engine/company_root_simples.py @echo "" engine-partners: up @echo "compose-up run app container & [ENGINE PARTNERS]" - @docker-compose run app python src/engine/partners.py + @docker compose run app python src/engine/partners.py @echo "" engine-ref-date: up @echo "compose-up run app container & [ENGINE REF DATE]" - @docker-compose run app python src/engine/ref_date.py + @docker compose run app python src/engine/ref_date.py @echo "" engine-main: up @echo "compose-up run app container & engine main" - @docker-compose run app python src/engine/main.py + @docker compose run app python src/engine/main.py @echo "" diff --git a/src/io/__init__.py b/src/io/__init__.py index 6c2032f..cf5cd94 100644 --- a/src/io/__init__.py +++ b/src/io/__init__.py @@ -1,5 +1,5 @@ CORE_URL = "https://www.gov.br/receitafederal/pt-br/assuntos/orientacao-tributaria/cadastros/consultas/dados-publicos-cnpj" -CORE_URL_FILES = "http://200.152.38.155/CNPJ" +CORE_URL_FILES = "https://arquivos.receitafederal.gov.br/dados/cnpj" CNAE_JSON_NAME = 'cnaes.json' NATJU_JSON_NAME = 'natju.json' QUAL_SOCIO_JSON_NAME = 'qual_socio.json'