| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 17 |
4 |
warning |
dangerous-default-value |
W0102 |
FeatureGenerator.__init__ |
Dangerous default value [] as argument |
| 56 |
4 |
convention |
missing-function-docstring |
C0116 |
FeatureGenerator.as_at |
Missing function or method docstring |
| 64 |
4 |
convention |
missing-function-docstring |
C0116 |
FeatureGenerator.feature_periods |
Missing function or method docstring |
| 72 |
4 |
convention |
missing-function-docstring |
C0116 |
FeatureGenerator.features |
Missing function or method docstring |
| 86 |
4 |
convention |
missing-function-docstring |
C0116 |
FeatureGenerator.references |
Missing function or method docstring |
| 98 |
4 |
convention |
missing-function-docstring |
C0116 |
FeatureGenerator.parse_references |
Missing function or method docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 19 |
0 |
convention |
missing-class-docstring |
C0115 |
Feature |
Missing class docstring |
| 25 |
4 |
convention |
missing-function-docstring |
C0116 |
Feature.feature_period |
Missing function or method docstring |
| 33 |
4 |
convention |
missing-function-docstring |
C0116 |
Feature.as_at |
Missing function or method docstring |
| 43 |
4 |
convention |
missing-function-docstring |
C0116 |
Feature.feature_name |
Missing function or method docstring |
| 61 |
4 |
convention |
missing-function-docstring |
C0116 |
Feature.commentary |
Missing function or method docstring |
| 75 |
4 |
convention |
missing-function-docstring |
C0116 |
Feature.start_date |
Missing function or method docstring |
| 96 |
4 |
convention |
missing-function-docstring |
C0116 |
Feature.end_date |
Missing function or method docstring |
| 117 |
4 |
convention |
missing-function-docstring |
C0116 |
Feature.column_metadata |
Missing function or method docstring |
| 155 |
4 |
convention |
missing-function-docstring |
C0116 |
BaseFeature.sum_aggregator |
Missing function or method docstring |
| 158 |
4 |
convention |
missing-function-docstring |
C0116 |
BaseFeature.count_aggregator |
Missing function or method docstring |
| 161 |
4 |
convention |
missing-function-docstring |
C0116 |
BaseFeature.count_distinct_aggregator |
Missing function or method docstring |
| 164 |
4 |
convention |
missing-function-docstring |
C0116 |
BaseFeature.approx_count_distinct_aggregator |
Missing function or method docstring |
| 167 |
4 |
convention |
missing-function-docstring |
C0116 |
BaseFeature.max_aggregator |
Missing function or method docstring |
| 170 |
4 |
convention |
missing-function-docstring |
C0116 |
BaseFeature.min_aggregator |
Missing function or method docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 18 |
4 |
convention |
missing-function-docstring |
C0116 |
FirstAndLastDateOfPeriod.first_date_in_week |
Missing function or method docstring |
| 26 |
4 |
convention |
missing-function-docstring |
C0116 |
FirstAndLastDateOfPeriod.last_date_in_week |
Missing function or method docstring |
| 32 |
4 |
convention |
missing-function-docstring |
C0116 |
FirstAndLastDateOfPeriod.first_date_in_month |
Missing function or method docstring |
| 36 |
4 |
convention |
missing-function-docstring |
C0116 |
FirstAndLastDateOfPeriod.last_date_in_month |
Missing function or method docstring |
| 44 |
4 |
convention |
missing-function-docstring |
C0116 |
FirstAndLastDateOfPeriod.first_date_in_quarter |
Missing function or method docstring |
| 56 |
4 |
convention |
missing-function-docstring |
C0116 |
FirstAndLastDateOfPeriod.last_date_in_quarter |
Missing function or method docstring |
| 68 |
4 |
convention |
missing-function-docstring |
C0116 |
FirstAndLastDateOfPeriod.first_date_in_year |
Missing function or method docstring |
| 72 |
4 |
convention |
missing-function-docstring |
C0116 |
FirstAndLastDateOfPeriod.last_date_in_year |
Missing function or method docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 6 |
0 |
convention |
wrong-import-order |
C0411 |
|
third party import "pyspark.sql.Column" should be placed before local import "feature.DerivedFeature" |
| 7 |
0 |
convention |
wrong-import-order |
C0411 |
|
third party import "pyspark.sql.functions" should be placed before local import "feature.DerivedFeature" |
| 9 |
0 |
convention |
wrong-import-order |
C0411 |
|
first party import "jstark.feature_period.FeaturePeriod" should be placed before local import "feature.DerivedFeature" |
| 24 |
4 |
convention |
missing-function-docstring |
C0116 |
RecencyWeightedApproxBasket.smoothing_factor |
Missing function or method docstring |
| 82 |
4 |
warning |
useless-parent-delegation |
W0246 |
RecencyWeightedBasket.__init__ |
Useless parent or super() delegation in method '__init__' |
| 142 |
0 |
convention |
missing-class-docstring |
C0115 |
RecencyWeightedBasket90 |
Missing class docstring |
| 147 |
0 |
convention |
missing-class-docstring |
C0115 |
RecencyWeightedBasket95 |
Missing class docstring |
| 152 |
0 |
convention |
missing-class-docstring |
C0115 |
RecencyWeightedBasket99 |
Missing class docstring |
| 157 |
0 |
convention |
missing-class-docstring |
C0115 |
RecencyWeightedApproxBasket90 |
Missing class docstring |
| 162 |
0 |
convention |
missing-class-docstring |
C0115 |
RecencyWeightedApproxBasket95 |
Missing class docstring |
| 167 |
0 |
convention |
missing-class-docstring |
C0115 |
RecencyWeightedApproxBasket99 |
Missing class docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==jstark.features.average_purchase_cycle:[11:21]
==jstark.features.cycles_since_last_purchase:[11:21]
def column_expression(self) -> Column:
return (
f.datediff(
MostRecentPurchaseDate(self.as_at, self.feature_period).column,
EarliestPurchaseDate(self.as_at, self.feature_period).column,
)
) / BasketCount(self.as_at, self.feature_period).column
@property
def description_subject(self) -> str: |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==jstark.features.average_basket:[26:32]
==jstark.features.recency_weighted_basket:[37:43]
def default_value(self) -> Column:
return f.lit(None)
@property
def description_subject(self) -> str:
return ( |
| 1 |
0 |
refactor |
duplicate-code |
R0801 |
|
Similar lines in 2 files
==jstark.features.earliest_purchase_date:[15:21]
==jstark.features.most_recent_purchase_date:[15:21]
def default_value(self) -> Column:
return f.lit(None)
@property
def commentary(self) -> str:
return ( |
| 33 |
0 |
convention |
missing-function-docstring |
C0116 |
purchases_schema |
Missing function or method docstring |
| 38 |
0 |
convention |
missing-function-docstring |
C0116 |
dataframe_of_faker_purchases |
Missing function or method docstring |
| 39 |
4 |
warning |
redefined-outer-name |
W0621 |
dataframe_of_faker_purchases |
Redefining name 'spark_session' from outer scope (line 17) |
| 39 |
33 |
warning |
redefined-outer-name |
W0621 |
dataframe_of_faker_purchases |
Redefining name 'as_at_timestamp' from outer scope (line 23) |
| 39 |
60 |
warning |
redefined-outer-name |
W0621 |
dataframe_of_faker_purchases |
Redefining name 'purchases_schema' from outer scope (line 33) |
| 39 |
4 |
warning |
unused-argument |
W0613 |
dataframe_of_faker_purchases |
Unused argument 'spark_session' |
| 39 |
33 |
warning |
unused-argument |
W0613 |
dataframe_of_faker_purchases |
Unused argument 'as_at_timestamp' |
| 39 |
60 |
warning |
unused-argument |
W0613 |
dataframe_of_faker_purchases |
Unused argument 'purchases_schema' |
| 45 |
0 |
convention |
missing-function-docstring |
C0116 |
dataframe_of_purchases |
Missing function or method docstring |
| 46 |
4 |
warning |
redefined-outer-name |
W0621 |
dataframe_of_purchases |
Redefining name 'spark_session' from outer scope (line 17) |
| 46 |
33 |
warning |
redefined-outer-name |
W0621 |
dataframe_of_purchases |
Redefining name 'as_at_timestamp' from outer scope (line 23) |
| 46 |
60 |
warning |
redefined-outer-name |
W0621 |
dataframe_of_purchases |
Redefining name 'purchases_schema' from outer scope (line 33) |
| 160 |
0 |
convention |
missing-function-docstring |
C0116 |
luke_and_leia_purchases |
Missing function or method docstring |
| 160 |
28 |
warning |
redefined-outer-name |
W0621 |
luke_and_leia_purchases |
Redefining name 'dataframe_of_purchases' from outer scope (line 45) |
| 167 |
0 |
convention |
missing-function-docstring |
C0116 |
purchasing_feature_generator |
Missing function or method docstring |
| 168 |
4 |
warning |
redefined-outer-name |
W0621 |
purchasing_feature_generator |
Redefining name 'as_at_timestamp' from outer scope (line 23) |
| 195 |
4 |
warning |
redefined-outer-name |
W0621 |
luke_and_leia_purchases_first |
Redefining name 'luke_and_leia_purchases' from outer scope (line 160) |
| 196 |
4 |
warning |
redefined-outer-name |
W0621 |
luke_and_leia_purchases_first |
Redefining name 'purchasing_feature_generator' from outer scope (line 167) |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 10 |
0 |
convention |
missing-function-docstring |
C0116 |
test_errors_if_as_at_is_not_a_date |
Missing function or method docstring |
| 19 |
0 |
convention |
missing-function-docstring |
C0116 |
test_start_date_days |
Missing function or method docstring |
| 29 |
0 |
convention |
missing-function-docstring |
C0116 |
test_start_and_end_date_when_period_unit_of_measure_is_weeks |
Missing function or method docstring |
| 51 |
0 |
convention |
missing-function-docstring |
C0116 |
test_start_and_end_date_when_period_unit_of_measure_is_months |
Missing function or method docstring |
| 72 |
0 |
convention |
missing-function-docstring |
C0116 |
test_start_and_end_date_when_period_unit_of_measure_is_quarter |
Missing function or method docstring |
| 96 |
0 |
convention |
missing-function-docstring |
C0116 |
test_start_and_end_date_when_period_unit_of_measure_is_year |
Missing function or method docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 9 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_description |
Missing function or method docstring |
| 16 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_start_is_immutable |
Missing function or method docstring |
| 29 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_end_is_immutable |
Missing function or method docstring |
| 42 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_periodunitofmeasure_is_immutable |
Missing function or method docstring |
| 55 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_end_greater_than_start_raises_exception |
Missing function or method docstring |
| 65 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_code_for_day |
Missing function or method docstring |
| 69 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_code_for_week |
Missing function or method docstring |
| 73 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_code_for_month |
Missing function or method docstring |
| 77 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_code_for_quarter |
Missing function or method docstring |
| 81 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_code_for_year |
Missing function or method docstring |
| 85 |
0 |
convention |
missing-function-docstring |
C0116 |
test_argument_of_wrong_types_raises |
Missing function or method docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 5 |
0 |
convention |
missing-function-docstring |
C0116 |
test_first_date_in_week |
Missing function or method docstring |
| 11 |
0 |
convention |
missing-function-docstring |
C0116 |
test_last_date_in_week |
Missing function or method docstring |
| 17 |
0 |
convention |
missing-function-docstring |
C0116 |
test_first_date_in_month |
Missing function or method docstring |
| 23 |
0 |
convention |
missing-function-docstring |
C0116 |
test_last_date_in_month |
Missing function or method docstring |
| 29 |
0 |
convention |
missing-function-docstring |
C0116 |
test_first_date_in_quarter |
Missing function or method docstring |
| 35 |
0 |
convention |
missing-function-docstring |
C0116 |
test_last_date_in_quarter |
Missing function or method docstring |
| 41 |
0 |
convention |
missing-function-docstring |
C0116 |
test_first_date_in_year |
Missing function or method docstring |
| 47 |
0 |
convention |
missing-function-docstring |
C0116 |
test_last_date_in_year |
Missing function or method docstring |
| Line |
Col. |
Type |
Symbol |
ID |
Obj |
Message |
| 1 |
0 |
convention |
missing-module-docstring |
C0114 |
|
Missing module docstring |
| 3 |
0 |
warning |
redefined-builtin |
W0622 |
|
Redefining built-in 'pow' |
| 3 |
0 |
convention |
wrong-import-order |
C0411 |
|
standard import "math.pow" should be placed before third party import "pytest" |
| 12 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_mnemonic |
Missing function or method docstring |
| 25 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_invalid_mnemonic |
Missing function or method docstring |
| 34 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_invalid_mnemonic_empty_string |
Missing function or method docstring |
| 43 |
0 |
convention |
missing-function-docstring |
C0116 |
test_feature_period_invalid_mnemonic_unit_of_measure |
Missing function or method docstring |
| 401 |
0 |
convention |
missing-function-docstring |
C0116 |
get_dataframes_for_perweek_feature_tests |
Missing function or method docstring |
| Name |
Count |
| jstark.grocery_retailer_feature_generator |
3 |
| jstark.period_unit_of_measure |
1 |
| jstark.feature_generator |
6 |
| jstark.sample.transactions |
6 |
| jstark.features.approxdistinctcount_feature |
1 |
| jstark.features.average_quantity_per_basket |
1 |
| jstark.features.most_recent_purchase_date |
1 |
| jstark.features.average_purchase_cycle |
1 |
| jstark.features.min_net_price |
1 |
| jstark.features.min_gross_spend |
1 |
| jstark.features.recency_weighted_basket |
11 |
| jstark.features.quantity |
1 |
| jstark.features.distinctcount_feature |
1 |
| jstark.features.cycles_since_last_purchase |
1 |
| jstark.features.first_and_last_date_of_period |
8 |
| jstark.features.approx_basket_count |
1 |
| jstark.features.product_count |
1 |
| jstark.features.basket_count |
1 |
| jstark.features.min_gross_price |
1 |
| jstark.features.max_net_price |
1 |
| jstark.features.gross_spend |
1 |
| jstark.features.recency_days |
1 |
| jstark.features.min_feature |
1 |
| jstark.features.average_basket |
3 |
| jstark.features.channel_count |
1 |
| jstark.features.store_count |
1 |
| jstark.features.discount |
1 |
| jstark.features.feature |
14 |
| jstark.features.max_net_spend |
1 |
| jstark.features.max_gross_spend |
1 |
| jstark.features.max_feature |
1 |
| jstark.features.net_spend |
1 |
| jstark.features.max_gross_price |
1 |
| jstark.features.sum_feature |
1 |
| jstark.features |
1 |
| jstark.features.customer_count |
1 |
| jstark.features.min_net_spend |
1 |
| jstark.features.average_discount_per_basket |
1 |
| jstark.features.basket_periods |
3 |
| jstark.features.count |
1 |
| jstark.features.approx_customer_count |
1 |
| jstark.features.average_gross_spend_per_basket |
1 |
| jstark.features.earliest_purchase_date |
1 |
| tests.test_feature_period |
12 |
| tests.test_grocery_retailer_feature_generator |
8 |
| tests.test_feature |
7 |
| tests.test_first_and_last_date_of_period |
9 |
| tests.conftest |
22 |
| Name |
Count |
| jstark/grocery_retailer_feature_generator.py |
3 |
| jstark/period_unit_of_measure.py |
1 |
| jstark/feature_generator.py |
6 |
| jstark/sample/transactions.py |
6 |
| jstark/features/approxdistinctcount_feature.py |
1 |
| jstark/features/average_quantity_per_basket.py |
1 |
| jstark/features/most_recent_purchase_date.py |
1 |
| jstark/features/average_purchase_cycle.py |
1 |
| jstark/features/min_net_price.py |
1 |
| jstark/features/min_gross_spend.py |
1 |
| jstark/features/recency_weighted_basket.py |
11 |
| jstark/features/quantity.py |
1 |
| jstark/features/distinctcount_feature.py |
1 |
| jstark/features/cycles_since_last_purchase.py |
1 |
| jstark/features/first_and_last_date_of_period.py |
8 |
| jstark/features/approx_basket_count.py |
1 |
| jstark/features/product_count.py |
1 |
| jstark/features/basket_count.py |
1 |
| jstark/features/min_gross_price.py |
1 |
| jstark/features/max_net_price.py |
1 |
| jstark/features/gross_spend.py |
1 |
| jstark/features/recency_days.py |
1 |
| jstark/features/min_feature.py |
1 |
| jstark/features/average_basket.py |
3 |
| jstark/features/channel_count.py |
1 |
| jstark/features/store_count.py |
1 |
| jstark/features/discount.py |
1 |
| jstark/features/feature.py |
14 |
| jstark/features/max_net_spend.py |
1 |
| jstark/features/max_gross_spend.py |
1 |
| jstark/features/max_feature.py |
1 |
| jstark/features/net_spend.py |
1 |
| jstark/features/max_gross_price.py |
1 |
| jstark/features/sum_feature.py |
1 |
| jstark/features/__init__.py |
1 |
| jstark/features/customer_count.py |
1 |
| jstark/features/min_net_spend.py |
1 |
| jstark/features/average_discount_per_basket.py |
1 |
| jstark/features/basket_periods.py |
3 |
| jstark/features/count.py |
1 |
| jstark/features/approx_customer_count.py |
1 |
| jstark/features/average_gross_spend_per_basket.py |
1 |
| jstark/features/earliest_purchase_date.py |
1 |
| tests/test_feature_period.py |
12 |
| tests/test_grocery_retailer_feature_generator.py |
8 |
| tests/test_feature.py |
7 |
| tests/test_first_and_last_date_of_period.py |
9 |
| tests/conftest.py |
22 |