diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..82691e4 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,28 @@ + +Copyright (c) 2022, Derek Gloudemans +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of [project] nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b0f0765 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=42"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..75cf43b --- /dev/null +++ b/setup.cfg @@ -0,0 +1,24 @@ +[metadata] +name = i24_sysctl +version = 0.1 +author = Derek Gloudemans +author_email = derek.gloudemans@vanderbilt.edu +description = Control of processes on multiple machines within a cluster from a single machine +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/DerekGloudemans/i24_sysctl + +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: BSD License + Operating System :: OS Independent + +[options] +package_dir = + = src +packages = find: +python_requires = >=3.6 + + +[options.packages.find] +where = src diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f13cf21 --- /dev/null +++ b/setup.py @@ -0,0 +1,3 @@ +from setuptools import setup +if __name__ == '__main__': + setup() diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..cc54ab2 --- /dev/null +++ b/src/__init__.py @@ -0,0 +1,2 @@ +from ClusterControl import ClusterControl +from ServerControlStub import serverControl diff --git a/src/__pycache__/ServerControlStub.cpython-39.pyc b/src/__pycache__/ServerControlStub.cpython-39.pyc deleted file mode 100644 index 149eb7a..0000000 Binary files a/src/__pycache__/ServerControlStub.cpython-39.pyc and /dev/null differ diff --git a/src/server_control.py b/src/server_control.py index a20ea49..6601f1e 100644 --- a/src/server_control.py +++ b/src/server_control.py @@ -1,10 +1,10 @@ from ServerControlStub import ServerControlStub +#from i24_sysctl import ServerControlStub import time from i24_logger.log_writer import logger -# TODO - add your list of import target functions here # CODEWRITER TODO - import your process targets here such that these functions can be directly passed as the target to mp.Process or mp.Pool def dummy_function(arg1,arg2,kwarg1 = None): @@ -13,7 +13,7 @@ def dummy_function(arg1,arg2,kwarg1 = None): logger.debug("This is what happens when you start a process!") time.sleep(5) -# TODO - add your process targets to register_functions +# CODEWRITER TODO - add your process targets to register_functions register_functions = [dummy_function] name_to_process = dict([(fn.__name__, fn) for fn in register_functions]) @@ -32,4 +32,4 @@ def get_additional_args(self): if __name__ == "__main__": - s = ServerControl(name_to_process) \ No newline at end of file + s = ServerControl(name_to_process)