diff --git a/.github/rename_project.sh b/.github/rename_project.sh index 89f99d3..6a4eb1a 100755 --- a/.github/rename_project.sh +++ b/.github/rename_project.sh @@ -16,10 +16,10 @@ echo "Description: $description"; echo "Renaming project..." -original_author="author_name" -original_name="project_name" -original_urlname="project_urlname" -original_description="project_description" +original_author="aidh-ms" +original_name="photonai_icu" +original_urlname="photonai_icu" +original_description="Awesome photonai_icu created by aidh-ms" # for filename in $(find . -name "*.*") for filename in $(git ls-files) do @@ -30,8 +30,8 @@ do echo "Renamed $filename" done -mv project_name $name -mv $name/project_name.json $name/$name.json +mv photonai_icu $name +mv $name/photonai_icu.json $name/$name.json # This command runs only once on GHA! rm -rf .github/template.yml \ No newline at end of file diff --git a/.github/template.yml b/.github/template.yml deleted file mode 100644 index 6481e3d..0000000 --- a/.github/template.yml +++ /dev/null @@ -1,2 +0,0 @@ -author: jernsting -Inspired by https://github.com/rochacbruno/python-project-template \ No newline at end of file diff --git a/.gitignore b/.gitignore index b218cfb..7280b4f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ .idea/ -project_name/registered +photonai_icu/registered *.pyc diff --git a/README.md b/README.md index 513b29c..432cbcd 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ In order to add a new Algorithm / Feature to your project you can follow the ste - [ ] Test your algorithms in a respective test file in the `test` folder - [ ] Document algorithms in the `docs` folder by copying and adapting the provided .md file - [ ] Provide an example on how to use your algorithms in an appropriately named file in the examples folder. -- [ ] Expose the algorithm to photonai by adding it to the the `project_name/project_name.json` file with the full path. An example is provided within this repository. Thereby, the algorithm can be imported via its name, as defined in the json file. Make sure to pick a unique name. +- [ ] Expose the algorithm to photonai by adding it to the the `photonai_icu/photonai_icu.json` file with the full path. An example is provided within this repository. Thereby, the algorithm can be imported via its name, as defined in the json file. Make sure to pick a unique name. **In order to access your algorithms and functions in photonai you have to import your module once in your final script. This triggers the registration process in the photonai core module!** diff --git a/docs/api/DummyTransformer.md b/docs/api/DummyTransformer.md index 6f01f94..95b66b6 100644 --- a/docs/api/DummyTransformer.md +++ b/docs/api/DummyTransformer.md @@ -5,6 +5,6 @@ A module for performing dummy transformations !!! info This is only a dummy transformer -::: project_name.dummy.DummyTransformer.DummyTransformer.__init__ +::: photonai_icu.dummy.DummyTransformer.DummyTransformer.__init__ rendering: show_root_toc_entry: False \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index f8a10b8..241a3aa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -35,6 +35,6 @@ In order to add a new Algorithm / Feature to your project you can follow the ste - Test your algorithms in a respective test file in the `test` folder - Document algorithms in the `docs` folder by copying and adapting the provided .md file - Provide an example on how to use your algorithms in an appropriately named file in the examples folder. -- Expose the algorithm to photonai by adding it to the the `project_name/project_name.json` file with the full path. An example is provided within this repository. Thereby, the algorithm can be imported via its name, as defined in the json file. Make sure to pick a unique name. +- Expose the algorithm to photonai by adding it to the the `photonai_icu/photonai_icu.json` file with the full path. An example is provided within this repository. Thereby, the algorithm can be imported via its name, as defined in the json file. Make sure to pick a unique name. **In order to access your algorithms and functions in photonai you have to import your module once in your final script. This triggers the registration process in the photonai core module!** diff --git a/examples/DummyTransformer/DummyTransformer_example.ipynb b/examples/DummyTransformer/DummyTransformer_example.ipynb index f04cd64..7eb55da 100644 --- a/examples/DummyTransformer/DummyTransformer_example.ipynb +++ b/examples/DummyTransformer/DummyTransformer_example.ipynb @@ -24,7 +24,7 @@ "outputs": [], "source": [ "# IMPORTANT: import your project once\n", - "import project_name" + "import photonai_icu" ] }, { diff --git a/mkdocs.yml b/mkdocs.yml index f84aee0..a6b8ccb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,7 @@ # Project information -site_name: project_name -repo_name: 'project_urlname' -repo_url: 'https://github.com/wwu-mmll/project_name' +site_name: photonai_icu +repo_name: 'photonai_icu' +repo_url: 'https://github.com/wwu-mmll/photonai_icu' edit_uri: 'edit/master/docs' diff --git a/project_name/__init__.py b/photonai_icu/__init__.py similarity index 79% rename from project_name/__init__.py rename to photonai_icu/__init__.py index 5503f37..f651599 100644 --- a/project_name/__init__.py +++ b/photonai_icu/__init__.py @@ -8,7 +8,7 @@ def do_register(current_path, registered_file): # pragma: no cover reg = PhotonRegistry() - reg.add_module(os.path.join(current_path, "project_name.json")) + reg.add_module(os.path.join(current_path, "photonai_icu.json")) with open(os.path.join(registered_file), "w") as f: f.write(str(__version__)) @@ -16,16 +16,16 @@ def do_register(current_path, registered_file): # pragma: no cover def register(): # pragma: no cover current_path = os.path.dirname(os.path.abspath(__file__)) registered_file = os.path.join(current_path, "registered") - logger.info("Checking project_name Module Registration") + logger.info("Checking photonai_icu Module Registration") if not os.path.isfile(registered_file): # pragma: no cover - logger.info("Registering project_name Module") + logger.info("Registering photonai_icu Module") do_register(current_path=current_path, registered_file=registered_file) else: with open(os.path.join(registered_file), "r") as f: if f.read() == __version__: logger.info("Current version already registered") else: - logger.info("Updating project_name Module") + logger.info("Updating photonai_icu Module") do_register(current_path=current_path, registered_file=registered_file) diff --git a/project_name/dummy/DummyTransformer.py b/photonai_icu/dummy/DummyTransformer.py similarity index 100% rename from project_name/dummy/DummyTransformer.py rename to photonai_icu/dummy/DummyTransformer.py diff --git a/photonai_icu/dummy/__init__.py b/photonai_icu/dummy/__init__.py new file mode 100644 index 0000000..46e25bc --- /dev/null +++ b/photonai_icu/dummy/__init__.py @@ -0,0 +1 @@ +from photonai_icu.dummy.DummyTransformer import DummyTransformer diff --git a/project_name/project_name.json b/photonai_icu/photonai_icu.json similarity index 53% rename from project_name/project_name.json rename to photonai_icu/photonai_icu.json index 3339182..a14a43f 100644 --- a/project_name/project_name.json +++ b/photonai_icu/photonai_icu.json @@ -1,6 +1,6 @@ { "DummyTransformer": [ - "project_name.dummy.DummyTransformer", + "photonai_icu.dummy.DummyTransformer", "Transformer" ] } \ No newline at end of file diff --git a/photonai_icu/version.py b/photonai_icu/version.py new file mode 100644 index 0000000..da1422a --- /dev/null +++ b/photonai_icu/version.py @@ -0,0 +1,3 @@ +from pbr.version import VersionInfo + +__version__ = VersionInfo('photonai_icu').release_string() \ No newline at end of file diff --git a/project_name/dummy/__init__.py b/project_name/dummy/__init__.py deleted file mode 100644 index 77c248f..0000000 --- a/project_name/dummy/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from project_name.dummy.DummyTransformer import DummyTransformer diff --git a/project_name/version.py b/project_name/version.py deleted file mode 100644 index 8584ce0..0000000 --- a/project_name/version.py +++ /dev/null @@ -1,3 +0,0 @@ -from pbr.version import VersionInfo - -__version__ = VersionInfo('project_name').release_string() \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index aa5edce..28ce084 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,19 +1,19 @@ [metadata] -name = project_name +name = photonai_icu description_file = README.md long_description_content_type = text/markdown -author = author_name +author = aidh-ms author_email = insert_your@email -url = https://github.com//project_urlname/ +url = https://github.com//photonai_icu/ keywords= machine learning deep learning project_urls= - Source Code = https://github.com/author_name/project_name/ - Documentation = https://author_name.github.io/project_name/ - Bug Tracker = https://github.com/author_name/project_name/issues + Source Code = https://github.com/aidh-ms/photonai_icu/ + Documentation = https://aidh-ms.github.io/photonai_icu/ + Bug Tracker = https://github.com/aidh-ms/photonai_icu/issues -download_url=https://pypi.org/project/project_name/#files +download_url=https://pypi.org/project/photonai_icu/#files [files] -packages = project_name \ No newline at end of file +packages = photonai_icu \ No newline at end of file diff --git a/test/dummy_tests/test_dummy.py b/test/dummy_tests/test_dummy.py index 07b5c52..ccfe46b 100644 --- a/test/dummy_tests/test_dummy.py +++ b/test/dummy_tests/test_dummy.py @@ -1,7 +1,7 @@ from unittest import TestCase import numpy as np -from project_name.dummy.DummyTransformer import DummyTransformer +from photonai_icu.dummy.DummyTransformer import DummyTransformer class DummyTest(TestCase):