Skip to content

Commit

Permalink
updated dependencies, modified config loading
Browse files Browse the repository at this point in the history
  • Loading branch information
9FS committed May 12, 2024
1 parent b0b0e19 commit ae1e6b6
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 157 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ config/
doc_templates/
log/

.env
docker-image.tar
tests/test.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ config/
doc_templates/
log/

.env
docker-image.tar
tests/test.py
286 changes: 149 additions & 137 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ name = ""
package-mode = false # this is an application, not library
readme = "readme.md"
repository = "https://github.com/9-FS/2021-12-22-Filename-Dateformat-Changer"
version = "1.1.4"
version = "1.2.0"

[tool.poetry.dependencies]
kfsconfig = "^1.0.0"
kfsconfig = "^2.0.0"
kfsfstr = "^1.0.0"
kfslog = "^1.0.0"
kfslog = "^2.0.0"
pandas = "^2.1.0"
python = "^3.11.0"
python = "^3.12.0"

[tool.poetry.group.dev.dependencies]
hypothesis = "^6.87.0"
pytest = "^7.4.2"
hypothesis = "^6.0.0"
pytest = "^8.0.0"

[build-system]
build-backend = "poetry.core.masonry.api"
Expand Down
23 changes: 12 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
colorama==0.4.6 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
kfsconfig==1.1.0 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
kfsfstr==1.1.0 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
kfslog==1.0.1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
kfsmath==1.0.1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
numpy==1.26.3 ; python_version >= "3.12" and python_full_version < "4.0.0" or python_version == "3.11"
pandas==2.1.4 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
python-dateutil==2.8.2 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
pytz==2023.3.post1 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
six==1.16.0 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
tzdata==2023.4 ; python_full_version >= "3.11.0" and python_full_version < "4.0.0"
colorama==0.4.6 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
kfsconfig==2.1.6 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
kfsfstr==1.1.2 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
kfslog==2.0.1 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
kfsmath==1.0.2 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
numpy==1.26.4 ; python_version >= "3.12" and python_full_version < "4.0.0"
pandas==2.2.2 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
python-dateutil==2.9.0.post0 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
pytz==2024.1 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
result==0.16.1 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
six==1.16.0 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
tzdata==2024.1 ; python_full_version >= "3.12.0" and python_full_version < "4.0.0"
6 changes: 3 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import pandas


@KFSlog.timeit
@KFSlog.timeit()
def main(DEBUG: bool) -> None:
filename_base: str # filename without extension
filename_DT: dt.datetime # filename as DT
Expand Down Expand Up @@ -49,12 +49,12 @@ def __exit__(self, exc_type, exc_value, exc_traceback):
return
with ContextManager() as context: # upon exit, if unsuccessful: don't close console windows immediately after execution
try:
format_conversion_df=pandas.read_csv(io.StringIO(KFSconfig.load_config("./config/format conversion.csv", format_conversion_default)),
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"]),
comment="#", # ignore comments
on_bad_lines="skip", # will do my own checking
quoting=csv.QUOTE_NONE, # don't encapsulate data in quotes
sep="\t") # tab as data separator because it can't be used in filenames
except FileNotFoundError:
except ValueError:
return
logging.info(format_conversion_df)
if format_conversion_df["input datetime format"].isnull().values.any(): # is any input datetime format NaN? # type:ignore
Expand Down

0 comments on commit ae1e6b6

Please sign in to comment.