From a5e4f769c3a5c64adf7ba236423e44fdc923ca27 Mon Sep 17 00:00:00 2001 From: Johanne Saxegaard Date: Mon, 16 Dec 2024 15:14:15 +0100 Subject: [PATCH 1/3] Fixed bug --- src/ssb_konjunk/statbank_format.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ssb_konjunk/statbank_format.py b/src/ssb_konjunk/statbank_format.py index 964f3e1..a723c81 100644 --- a/src/ssb_konjunk/statbank_format.py +++ b/src/ssb_konjunk/statbank_format.py @@ -1,4 +1,5 @@ import pandas as pd +from prompts import validate_month def format_time_period( @@ -23,7 +24,7 @@ def format_time_period( if quarter != "" and month == "": df[col_name] = f"{year}K{int(quarter)}" elif quarter == "" and month != "": - df[col_name] = f"{year}M{int(quarter)}" + df[col_name] = f"{year}M{validate_month(month)}" else: df[col_name] = f"{year}" From 98aadd33b67601f1554e8a6df1719f31efc867f5 Mon Sep 17 00:00:00 2001 From: Johanne Saxegaard Date: Mon, 16 Dec 2024 15:16:47 +0100 Subject: [PATCH 2/3] version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index caeec82..4aa512b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ssb-konjunk" -version = "0.1.15" +version = "0.1.16" description = "SSB Konjunk" authors = ["Edvard Garmannslund "] license = "MIT" From 0617b602f37ae8513d41b88c7852486d749cda10 Mon Sep 17 00:00:00 2001 From: Johanne Saxegaard Date: Mon, 16 Dec 2024 15:36:58 +0100 Subject: [PATCH 3/3] precommit --- src/ssb_konjunk/statbank_format.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ssb_konjunk/statbank_format.py b/src/ssb_konjunk/statbank_format.py index a723c81..9860c19 100644 --- a/src/ssb_konjunk/statbank_format.py +++ b/src/ssb_konjunk/statbank_format.py @@ -1,5 +1,6 @@ import pandas as pd -from prompts import validate_month + +from ssb_konjunk import prompts def format_time_period( @@ -24,7 +25,7 @@ def format_time_period( if quarter != "" and month == "": df[col_name] = f"{year}K{int(quarter)}" elif quarter == "" and month != "": - df[col_name] = f"{year}M{validate_month(month)}" + df[col_name] = f"{year}M{prompts.validate_month(month)}" else: df[col_name] = f"{year}"