From a908cc2f2c6d4f64b685abd105f116f48d9084cb Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Mon, 26 Aug 2024 09:05:31 +0000 Subject: [PATCH] rename --- TODO.md | 5 +++++ {backlogger => corrlib}/__init__.py | 0 {backlogger => corrlib}/find.py | 0 {backlogger => corrlib}/git_tools.py | 3 --- {backlogger => corrlib}/initialization.py | 1 + {backlogger => corrlib}/input/__init__.py | 0 {backlogger => corrlib}/input/sfcf.py | 0 {backlogger => corrlib}/main.py | 0 {backlogger => corrlib}/meas_io.py | 0 {backlogger => corrlib}/toml.py | 0 setup.py | 2 +- tests/test_import_project.py | 0 12 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 TODO.md rename {backlogger => corrlib}/__init__.py (100%) rename {backlogger => corrlib}/find.py (100%) rename {backlogger => corrlib}/git_tools.py (87%) rename {backlogger => corrlib}/initialization.py (96%) rename {backlogger => corrlib}/input/__init__.py (100%) rename {backlogger => corrlib}/input/sfcf.py (100%) rename {backlogger => corrlib}/main.py (100%) rename {backlogger => corrlib}/meas_io.py (100%) rename {backlogger => corrlib}/toml.py (100%) create mode 100644 tests/test_import_project.py diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..d4851e9 --- /dev/null +++ b/TODO.md @@ -0,0 +1,5 @@ +# TODO + +## Features +- [ ] implement import of non-datalad projects +- [ ] implement a way to use another backlog repo as a project \ No newline at end of file diff --git a/backlogger/__init__.py b/corrlib/__init__.py similarity index 100% rename from backlogger/__init__.py rename to corrlib/__init__.py diff --git a/backlogger/find.py b/corrlib/find.py similarity index 100% rename from backlogger/find.py rename to corrlib/find.py diff --git a/backlogger/git_tools.py b/corrlib/git_tools.py similarity index 87% rename from backlogger/git_tools.py rename to corrlib/git_tools.py index 5ebcaa2..b66191b 100644 --- a/backlogger/git_tools.py +++ b/corrlib/git_tools.py @@ -19,19 +19,16 @@ def move_submodule(repo_path, old_path, new_path): """ os.rename(os.path.join(repo_path, old_path), os.path.join(repo_path, new_path)) - # Öffne die.gitmodules-Datei gitmodules_file_path = os.path.join(repo_path, GITMODULES_FILE) with open(gitmodules_file_path, 'r') as file: lines = [line.strip() for line in file] - # Ersetzen aller Vorkommnisse von old_path durch new_path updated_lines = [] for line in lines: if old_path in line: line = line.replace(old_path, new_path) updated_lines.append(line) - # Speichen der aktualisierten.gitmodules-Datei with open(gitmodules_file_path, 'w') as file: file.write("\n".join(updated_lines)) diff --git a/backlogger/initialization.py b/corrlib/initialization.py similarity index 96% rename from backlogger/initialization.py rename to corrlib/initialization.py index ea0b580..548fd5f 100644 --- a/backlogger/initialization.py +++ b/corrlib/initialization.py @@ -41,5 +41,6 @@ def create(path): os.chmod(path + '/backlogger.db', 0o666) # why does this not work? os.makedirs(path + '/projects') os.makedirs(path + '/archive') + os.makedirs(path + '/toml_imports') os.makedirs(path + '/import_scripts/template.py') dl.save(path, dataset=path, message="Initialize backlogger directory.") diff --git a/backlogger/input/__init__.py b/corrlib/input/__init__.py similarity index 100% rename from backlogger/input/__init__.py rename to corrlib/input/__init__.py diff --git a/backlogger/input/sfcf.py b/corrlib/input/sfcf.py similarity index 100% rename from backlogger/input/sfcf.py rename to corrlib/input/sfcf.py diff --git a/backlogger/main.py b/corrlib/main.py similarity index 100% rename from backlogger/main.py rename to corrlib/main.py diff --git a/backlogger/meas_io.py b/corrlib/meas_io.py similarity index 100% rename from backlogger/meas_io.py rename to corrlib/meas_io.py diff --git a/backlogger/toml.py b/corrlib/toml.py similarity index 100% rename from backlogger/toml.py rename to corrlib/toml.py diff --git a/setup.py b/setup.py index 2e19a95..2c7fb73 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -setup(name='pyerrors_backlog', +setup(name='pyerrors_corrlib', version='0.0.1', author='Justus Kuhlmann', author_email='j_kuhl19@uni-muenster.de', diff --git a/tests/test_import_project.py b/tests/test_import_project.py new file mode 100644 index 0000000..e69de29