Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[infra] fix: config_file parametrization #1344

Merged
merged 2 commits into from
Oct 4, 2022
Merged

[infra] fix: config_file parametrization #1344

merged 2 commits into from
Oct 4, 2022

Conversation

d116626
Copy link
Member

@d116626 d116626 commented Oct 4, 2022

  • remove hardcoded config_path

@d116626 d116626 requested a review from lucascr91 October 4, 2022 21:34
@github-actions
Copy link

github-actions bot commented Oct 4, 2022

===> 8 warning(s) found:

  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/download/metadata.py:18:19)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:71:24)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:105:19)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:208:15)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:217:19)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:220:15)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:239:25)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/table.py:239:40)
    ===> 2 convention(s) found:
  • convention [C3001] Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (python-package/basedosdados/upload/dataset.py:43:22)
  • convention [C1803] 'not_found_columns != []' can be simplified to 'not_found_columns' as an empty sequence is falsey (python-package/basedosdados/upload/table.py:329:11)

1 similar comment
@github-actions
Copy link

github-actions bot commented Oct 4, 2022

===> 8 warning(s) found:

  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/download/metadata.py:18:19)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:71:24)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:105:19)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:208:15)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:217:19)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:220:15)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/metadata.py:239:25)
  • warning [W3101] Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (python-package/basedosdados/upload/table.py:239:40)
    ===> 2 convention(s) found:
  • convention [C3001] Lambda expression assigned to a variable. Define a function using the "def" keyword instead. (python-package/basedosdados/upload/dataset.py:43:22)
  • convention [C1803] 'not_found_columns != []' can be simplified to 'not_found_columns' as an empty sequence is falsey (python-package/basedosdados/upload/table.py:329:11)

@@ -199,7 +199,7 @@ def _init_config(self, force):
config_file = self.config_path / "config.toml"

# Create credentials folder
credentials_folder = Path.home() / self.config_path / "credentials"
credentials_folder = self.config_path / "credentials"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isso vai funcionar só se o usuário passar o caminho absoluto no project_config_path. Não tem nada validando o path que o usuário passa.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acho que sempre tem que ser o path absoluto, pq n tem como saber se ele passou a partir da home ou n. Da pra levantar um raise caso n seja path absoluto

@lucascr91 lucascr91 merged commit a17037a into master Oct 4, 2022
@lucascr91 lucascr91 deleted the fix/config_path branch October 4, 2022 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants