{ "info": { "author": "JINR LIT Cloud Team", "author_email": "gavelock+jinr@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development" ], "description": "# SmartScheduler daemon for init.d\n\nThis project contain the SmartScheduler daemon for running cloud optimisation strategies in background as Linux service. \n\n## Prerequisites\n\nPython3 should be installed and used. This project is developed and rested on Python3.5 . You also need python **setuptools** (example: yum install python34-setuptools).\n\n## Installing the library\n### Using Setup.py\nWe need sudo in order to create /etc/smartscheduler directory for default configuration:\n\n```bash\n$ sudo python3 setup.py install\n```\n\nAfter successful installation it is important to write a configuration file for the library. For more information see SmartScheduler library.\n\n### Using pip3\n```bash\npip3 install smartsched.daemon\n```\nThe same requirements to configuration is applied to your installation so dont forget to create it.\n\n## How to use daemon\n\nAfter successful installation you can start and stop daemon using **service** command:\n```bash\nservice smart_daemon start\nservice smart_daemon stop\nservice smart_daemon restart\n```\n\n## How to use strategies\n\nStrategy is a python script with special variable *target_class*. This variable should point to class which inherit from *smartsched.daemon.base_strategy.BaseStrategy*. In order to do something the class should redefine *perform_strategy* method: this method called by daemon every *sleep_time* seconds. You can define path to your *strategy_path* and *sleep_time* in smartsched configuration.\n\n# For Developers\n\n## Development version installation\nIn order to install the packet for development you just need to clone the git project and install with pip locally with [dev] extantion:\n\n```bash\npip3 install -e .[dev]\n```\n\nIt will install all necessary libraries which you will use for versioning and release publishing.\n\n## How to increment version\nThe following versioning schema is chosen for the project: `project_name-..`\nIn order to simplify the process of version incrementing the *bumpversion* utility is used. The detailed documentation here: https://github.com/peritus/bumpversion\n\nExamples:\n```sh\nbumpversion patch\nbumpversion minor\nbumpversion major\n```\n\nIn order to simplify the process of making new patch the .patch_it.sh script have been introduced. If you run it the new patch is created, new tag is created, all commits uploads to the master, all tags uploads to the master. Be careful if the fail happened during git interaction, it means that new version was released but not uploaded to git and if you run the full patch script again, ***it will make new release again***.\n\n# How to build and upload\nDepending on your version of OS and Python3 you will have two ways of uploading wheel packet to the PyPi.org . Despite this fact, first of all you need to create wheel of your project:\n\n```bash\npython3 setup.py bdist_wheel\n```\n\nWhen the `smartsched--py3-none-any.whl` created in you *dist* directory you can upload it to the PyPi. Either:\n```bash\ntwine upload dist/smartsched--py3-none-any.whl\n```\nor:\n```bash\npython3 setup.py bdist_wheel upload\n```\n\n## Code style example\n\nWe try to folow PEP-8 standard during the development. The following example could be a useful hint:\n\n```python\nimport standard1\nimport standard2\n\nimport third_party\nfrom third_party import bar\nfrom third_party.spec import baz\nfrom third_party.bar import Quux\n\n\nfrom app_specific import ar\n\nGLOBAL_CONSTANT = \"Constant\"\n\n\nclass SampleClass:\n \"\"\"Summary of class here.\n\n Longer class information....\n Longer class information....\n\n Attributes:\n first_parameter: responsible for ...\n second_parameter: responsible for ...\n \"\"\"\n\n def __init__(self, first_arg, second_arg):\n # TODO(your@mail.com: todo example.\n # TODO(IgorPelevanyuk): assigney name .\n pass\n\n def _private_helper_method(self):\n\n pass\n\n def public_method(self, first_arg, second_arg):\n \"\"\"General method description.\n\n Detailed description of current method.\n\n Args(If necessary add description):\n first_arg: alowed values\n second_arg: purpose\n\n Returns(If may be unclear):\n {'key1': value1,\n 'key2': value2,\n 'key3': [list_value1, list_value2, ...]}\n\n Raises(If necessary):\n CustomError: if custom error occured\n\n \"\"\"\n any_variable = None\n result = standard1.long_function(first_arg, second_arg,\n any_variable)\n return result\n\n def another_public_method(self):\n\n just_var = GLOBAL_CONSTANT\n return just_var\n\n\n# If file is a script use \"check if main\"\ndef main():\n pass\n\nif __name__ == '__main__':\n main()\n```\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/JINR-LIT/SmartScheduler-Core", "keywords": "cloud api scheduler", "license": "", "maintainer": "", "maintainer_email": "", "name": "smartsched.daemon", "package_url": "https://pypi.org/project/smartsched.daemon/", "platform": "", "project_url": "https://pypi.org/project/smartsched.daemon/", "project_urls": { "Homepage": "https://github.com/JINR-LIT/SmartScheduler-Core" }, "release_url": "https://pypi.org/project/smartsched.daemon/0.0.17/", "requires_dist": null, "requires_python": "", "summary": "Daemon library for smartsched lib. Allows to run strategies in daemon mode.", "version": "0.0.17" }, "last_serial": 4064727, "releases": { "0.0.14": [ { "comment_text": "", "digests": { "md5": "47a4fbb48e4c14e043ebbbd3773bd825", "sha256": "ce5070c27c365f147b88d19a40984d457b8429a96ef4f9a0cfa810614db04176" }, "downloads": -1, "filename": "smartsched.daemon-0.0.14-py3-none-any.whl", "has_sig": false, "md5_digest": "47a4fbb48e4c14e043ebbbd3773bd825", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10915, "upload_time": "2018-03-12T08:42:34", "url": "https://files.pythonhosted.org/packages/25/24/93d33a6ffc33ed5f41004674e9210990f8334a4d86f6c6cf38d86bc483ce/smartsched.daemon-0.0.14-py3-none-any.whl" } ], "0.0.15": [ { "comment_text": "", "digests": { "md5": "5eb1f67467d74eb57a1dfd414feb3d04", "sha256": "b046775c3a655c50ead1c0b3c2b9a0fce077a960bfd8e2a51e4cae8cf1c94b3b" }, "downloads": -1, "filename": "smartsched.daemon-0.0.15-py3-none-any.whl", "has_sig": false, "md5_digest": "5eb1f67467d74eb57a1dfd414feb3d04", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10919, "upload_time": "2018-03-12T08:55:54", "url": "https://files.pythonhosted.org/packages/82/1e/0d2d57f7ff2ef994995307b1f046c4cd2421911db739a0632f6ae716d461/smartsched.daemon-0.0.15-py3-none-any.whl" } ], "0.0.16": [ { "comment_text": "", "digests": { "md5": "9990491dcd65e69562a045962ba61101", "sha256": "1010138e5b73a332080dec78b3c4b94445c0cefa282724a0a89b587b6809bfbd" }, "downloads": -1, "filename": "smartsched.daemon-0.0.16-py3-none-any.whl", "has_sig": false, "md5_digest": "9990491dcd65e69562a045962ba61101", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10921, "upload_time": "2018-04-19T11:01:00", "url": "https://files.pythonhosted.org/packages/78/c7/0b2855913341ca32778dd37d0f3ed58108f2f977993a271f7d3c530d5deb/smartsched.daemon-0.0.16-py3-none-any.whl" } ], "0.0.17": [ { "comment_text": "", "digests": { "md5": "40b3d04262acd2923f9a8436a6e942c5", "sha256": "678e16b23d7141f6f581c4bdacb042d0ac829cc5278da20a00c43459835f3327" }, "downloads": -1, "filename": "smartsched.daemon-0.0.17-py3-none-any.whl", "has_sig": false, "md5_digest": "40b3d04262acd2923f9a8436a6e942c5", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 7987, "upload_time": "2018-07-16T07:08:39", "url": "https://files.pythonhosted.org/packages/4f/24/e49bfeb6214d838f433faefe1c124c9556db3e6ff505fc056825af15dd4d/smartsched.daemon-0.0.17-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "40b3d04262acd2923f9a8436a6e942c5", "sha256": "678e16b23d7141f6f581c4bdacb042d0ac829cc5278da20a00c43459835f3327" }, "downloads": -1, "filename": "smartsched.daemon-0.0.17-py3-none-any.whl", "has_sig": false, "md5_digest": "40b3d04262acd2923f9a8436a6e942c5", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 7987, "upload_time": "2018-07-16T07:08:39", "url": "https://files.pythonhosted.org/packages/4f/24/e49bfeb6214d838f433faefe1c124c9556db3e6ff505fc056825af15dd4d/smartsched.daemon-0.0.17-py3-none-any.whl" } ] }