Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit ae1e6b6

Browse files
author
9FS
committed
updated dependencies, modified config loading
1 parent b0b0e19 commit ae1e6b6

File tree

6 files changed

+172
-157
lines changed

6 files changed

+172
-157
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ config/
99
doc_templates/
1010
log/
1111

12+
.env
1213
docker-image.tar
1314
tests/test.py

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ config/
99
doc_templates/
1010
log/
1111

12+
.env
1213
docker-image.tar
1314
tests/test.py

poetry.lock

Lines changed: 149 additions & 137 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ name = ""
66
package-mode = false # this is an application, not library
77
readme = "readme.md"
88
repository = "https://github.com/9-FS/2021-12-22-Filename-Dateformat-Changer"
9-
version = "1.1.4"
9+
version = "1.2.0"
1010

1111
[tool.poetry.dependencies]
12-
kfsconfig = "^1.0.0"
12+
kfsconfig = "^2.0.0"
1313
kfsfstr = "^1.0.0"
14-
kfslog = "^1.0.0"
14+
kfslog = "^2.0.0"
1515
pandas = "^2.1.0"
16-
python = "^3.11.0"
16+
python = "^3.12.0"
1717

1818
[tool.poetry.group.dev.dependencies]
19-
hypothesis = "^6.87.0"
20-
pytest = "^7.4.2"
19+
hypothesis = "^6.0.0"
20+
pytest = "^8.0.0"
2121

2222
[build-system]
2323
build-backend = "poetry.core.masonry.api"

requirements.txt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
colorama==0.4.6 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
2-
kfsconfig==1.1.0 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
3-
kfsfstr==1.1.0 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
4-
kfslog==1.0.1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
5-
kfsmath==1.0.1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
6-
numpy==1.26.3 ; python_version >= "3.12" and python_full_version < "4.0.0" or python_version == "3.11"
7-
pandas==2.1.4 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
8-
python-dateutil==2.8.2 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
9-
pytz==2023.3.post1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
10-
six==1.16.0 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
11-
tzdata==2023.4 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
1+
colorama==0.4.6 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
2+
kfsconfig==2.1.6 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
3+
kfsfstr==1.1.2 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
4+
kfslog==2.0.1 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
5+
kfsmath==1.0.2 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
6+
numpy==1.26.4 ; python_version >= "3.12" and python_full_version < "4.0.0"
7+
pandas==2.2.2 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
8+
python-dateutil==2.9.0.post0 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
9+
pytz==2024.1 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
10+
result==0.16.1 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
11+
six==1.16.0 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
12+
tzdata==2024.1 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"

src/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import pandas
1313

1414

15-
@KFSlog.timeit
15+
@KFSlog.timeit()
1616
def main(DEBUG: bool) -> None:
1717
filename_base: str # filename without extension
1818
filename_DT: dt.datetime # filename as DT
@@ -49,12 +49,12 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
4949
return
5050
with ContextManager() as context: # upon exit, if unsuccessful: don't close console windows immediately after execution
5151
try:
52-
format_conversion_df=pandas.read_csv(io.StringIO(KFSconfig.load_config("./config/format conversion.csv", format_conversion_default)),
52+
format_conversion_df=pandas.read_csv(io.StringIO(KFSconfig.load_config(env=False, config_filepaths=["./config/format_conversion.csv"], config_default={"content": format_conversion_default})["content"]),
5353
comment="#", # ignore comments
5454
on_bad_lines="skip", # will do my own checking
5555
quoting=csv.QUOTE_NONE, # don't encapsulate data in quotes
5656
sep="\t") # tab as data separator because it can't be used in filenames
57-
except FileNotFoundError:
57+
except ValueError:
5858
return
5959
logging.info(format_conversion_df)
6060
if format_conversion_df["input datetime format"].isnull().values.any(): # is any input datetime format NaN? # type:ignore

0 commit comments

Comments
 (0)