Skip to content

Commit

Permalink
fix: change receita federal url
Browse files Browse the repository at this point in the history
  • Loading branch information
Robso-creator committed Nov 22, 2024
1 parent acd5a2f commit 973b474
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
58 changes: 29 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down Expand Up @@ -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
Expand All @@ -82,97 +82,97 @@ 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
@docker exec -i postgres psql -U postgres

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"
@sleep 30
@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 ""
2 changes: 1 addition & 1 deletion src/io/__init__.py
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 973b474

Please sign in to comment.