Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Version with multi-threading
Browse files Browse the repository at this point in the history
  • Loading branch information
bastgau committed Mar 1, 2024
1 parent f135a8b commit 085797b
Show file tree
Hide file tree
Showing 9 changed files with 340 additions and 253 deletions.
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pandas
pyyaml
snowflake-connector-python
pandas
pyyaml
snowflake-connector-python
coloredlogs
358 changes: 182 additions & 176 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,176 +1,182 @@
[mypy]
strict = true
warn_unused_ignores = false

# [mypy-pandas.*]
# ignore_missing_imports = true

[pylama:pycodestyle]
# For reference: https://github.com/klen/pylama

# Maximum number of characters on a single line.
max_line_length=200

[yapf]
# For reference: https://github.com/google/yapf#knobs

# Base the formating from `pep8` (for pycodestyle)
based_on_style=pep8

# Allow splits before the dictionary value. Don't allow breaking dicts
allow_split_before_dict_value=False

# Let spacing indicate operator precedence. Will group priorities in arithmetic operation
arithmetic_precedence_indication=True

# Insert a blank line before a def or class immediately nested within another def or class.
blank_line_before_nested_class_or_def=True

# Do not split consecutive brackets. Unite them if possible
coalesce_brackets=False

# The column limit (or max line-length), same as pycodestyle and pylint
column_limit=200

# Put closing brackets on a separate line, dedented, if the bracketed expression can't fit in a single line.
# Applies to all kinds of brackets, including function definitions and calls.
dedent_closing_brackets=True

# Place each dictionary entry onto its own line. Disable it to allow inline dicts
each_dict_entry_on_separate_line=False

# Put closing brackets on a separate line, indented, if the bracketed expression can't fit in a single line.
# Applies to all kinds of brackets, including function definitions and calls.
indent_closing_brackets=False

# The number of columns to use for indentation.
indent_width=4

# Join short lines into one line. E.g., single line if statements.
join_multiple_lines=True

# Indent the dictionary value if it cannot fit on the same line as the dictionary key.
indent_dictionary_value=True

# Match pycodestyle setting on spaces before comments
spaces_before_comment=2

# Split at top level commas if the line is too long.
split_all_top_level_comma_separated_values=True

# Place logical, bitwisea and arithmetic to the left of the expression, if the line is too long.
split_before_logical_operator=True
split_before_bitwise_operator=True
split_before_arithmetic_operator=True

# Split before the closing bracket if a list or dict literal doesn't fit on a single line.
split_before_closing_bracket=True

# Split before a dictionary or set generator (comp_for).
split_before_dict_set_generator=True

# Split before the '.' if we need to split a longer expression
split_before_dot=True

# Split after the opening paren which surrounds an expression if it doesn't fit on a single line.
split_before_expression_after_opening_paren=True

# If an argument / parameter list is going to be split, then split before the first argument.
split_before_first_argument=True

# Split named assignments onto individual lines.
split_before_named_assigns=True

# For list comprehensions and generator expressions with multiple clauses
split_complex_comprehension=True

[pylint.MASTER]

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

[pylint.BASIC]

# Naming style matching correct argument names.
argument-naming-style=snake_case

# Naming style matching correct attribute names.
attr-naming-style=snake_case

# Naming style matching correct class names.
class-naming-style=PascalCase

# Naming style matching correct function names.
function-naming-style=snake_case

# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=2

# Good variable names which should always be accepted, separated by a comma.
good-names=i,j,k

# Naming style matching correct method names.
method-naming-style=snake_case

# Naming style matching correct module names.
module-naming-style=snake_case

# Naming style matching correct variable names.
variable-naming-style=snake_case

[pylint.FORMAT]

# Maximum number of characters on a single line.
max-line-length=200

# This flag controls whether inconsistent-quotes generates a warning when the character
# used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=yes

# This flag controls whether the implicit-str-concat should generate a warning on implicit
# string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=yes

[pylint.REPORT]

# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation="10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)"

# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format=text

# Tells whether to display a full report or only the messages.
reports=no

# Activate the evaluation score.
score=no

[pylint.'MESSAGES CONTROL']

# Disable the message, report, category or checker with the given id(s).
disable = too-few-public-methods, fixme

# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=no

# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=

[flake8]

# extend-ignore = E203
max-line-length = 200
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
max-complexity = 10

[coverage:run]
omit = src/snow_revoke_privileges/tools/my_snowflake.py
[mypy]
strict = true
warn_unused_ignores = false

[mypy-coloredlogs.*]
ignore_missing_imports = true

[mypy-progress.*]
ignore_missing_imports = true

# [mypy-pandas.*]
# ignore_missing_imports = true

[pylama:pycodestyle]
# For reference: https://github.com/klen/pylama

# Maximum number of characters on a single line.
max_line_length=200

[yapf]
# For reference: https://github.com/google/yapf#knobs

# Base the formating from `pep8` (for pycodestyle)
based_on_style=pep8

# Allow splits before the dictionary value. Don't allow breaking dicts
allow_split_before_dict_value=False

# Let spacing indicate operator precedence. Will group priorities in arithmetic operation
arithmetic_precedence_indication=True

# Insert a blank line before a def or class immediately nested within another def or class.
blank_line_before_nested_class_or_def=True

# Do not split consecutive brackets. Unite them if possible
coalesce_brackets=False

# The column limit (or max line-length), same as pycodestyle and pylint
column_limit=200

# Put closing brackets on a separate line, dedented, if the bracketed expression can't fit in a single line.
# Applies to all kinds of brackets, including function definitions and calls.
dedent_closing_brackets=True

# Place each dictionary entry onto its own line. Disable it to allow inline dicts
each_dict_entry_on_separate_line=False

# Put closing brackets on a separate line, indented, if the bracketed expression can't fit in a single line.
# Applies to all kinds of brackets, including function definitions and calls.
indent_closing_brackets=False

# The number of columns to use for indentation.
indent_width=4

# Join short lines into one line. E.g., single line if statements.
join_multiple_lines=True

# Indent the dictionary value if it cannot fit on the same line as the dictionary key.
indent_dictionary_value=True

# Match pycodestyle setting on spaces before comments
spaces_before_comment=2

# Split at top level commas if the line is too long.
split_all_top_level_comma_separated_values=True

# Place logical, bitwisea and arithmetic to the left of the expression, if the line is too long.
split_before_logical_operator=True
split_before_bitwise_operator=True
split_before_arithmetic_operator=True

# Split before the closing bracket if a list or dict literal doesn't fit on a single line.
split_before_closing_bracket=True

# Split before a dictionary or set generator (comp_for).
split_before_dict_set_generator=True

# Split before the '.' if we need to split a longer expression
split_before_dot=True

# Split after the opening paren which surrounds an expression if it doesn't fit on a single line.
split_before_expression_after_opening_paren=True

# If an argument / parameter list is going to be split, then split before the first argument.
split_before_first_argument=True

# Split named assignments onto individual lines.
split_before_named_assigns=True

# For list comprehensions and generator expressions with multiple clauses
split_complex_comprehension=True

[pylint.MASTER]

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes

[pylint.BASIC]

# Naming style matching correct argument names.
argument-naming-style=snake_case

# Naming style matching correct attribute names.
attr-naming-style=snake_case

# Naming style matching correct class names.
class-naming-style=PascalCase

# Naming style matching correct function names.
function-naming-style=snake_case

# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=2

# Good variable names which should always be accepted, separated by a comma.
good-names=i,j,k

# Naming style matching correct method names.
method-naming-style=snake_case

# Naming style matching correct module names.
module-naming-style=snake_case

# Naming style matching correct variable names.
variable-naming-style=snake_case

[pylint.FORMAT]

# Maximum number of characters on a single line.
max-line-length=200

# This flag controls whether inconsistent-quotes generates a warning when the character
# used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=yes

# This flag controls whether the implicit-str-concat should generate a warning on implicit
# string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=yes

[pylint.REPORT]

# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation="10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)"

# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
output-format=text

# Tells whether to display a full report or only the messages.
reports=no

# Activate the evaluation score.
score=no

[pylint.'MESSAGES CONTROL']

# Disable the message, report, category or checker with the given id(s).
disable = too-few-public-methods, fixme

# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=no

# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED.
confidence=

[flake8]

# extend-ignore = E203
max-line-length = 200
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
max-complexity = 10

[coverage:run]
omit = src/snow_revoke_privileges/tools/my_snowflake.py
Loading

0 comments on commit 085797b

Please sign in to comment.