{"id":19264275,"url":"https://github.com/cphyc/dotry","last_synced_at":"2026-06-21T00:32:38.571Z","repository":{"id":74150427,"uuid":"90466448","full_name":"cphyc/dotry","owner":"cphyc","description":"Python workflow for efficient and reproducible science","archived":false,"fork":false,"pushed_at":"2017-05-07T13:49:28.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T19:15:16.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cphyc.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-06T13:55:08.000Z","updated_at":"2017-05-06T13:56:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"080e38b5-5548-4155-9493-1ce3e7434e29","html_url":"https://github.com/cphyc/dotry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cphyc/dotry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cphyc%2Fdotry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cphyc%2Fdotry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cphyc%2Fdotry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cphyc%2Fdotry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cphyc","download_url":"https://codeload.github.com/cphyc/dotry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cphyc%2Fdotry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34590213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T19:40:34.746Z","updated_at":"2026-06-21T00:32:38.550Z","avatar_url":"https://github.com/cphyc.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IMPORTANT\n\nThis program is not stable enough for a daily use! Use at your own risk.\nMoreover the following guide may not be up-to-date.\n\n\n# Dotry\n\nHave you ever had to rerun a whole set of simulation because you couldn't remember if a given file was up to date with a function? Dotry stands for *Do*n't *Tr*ust *Y*ourself but your computer…\nThis tool aims at preventing such an issue by introducing the concept of `TaskManager`. Whenever you create a task manager, you can register function into it. These functions will automagically be parsed to find the input/output files, register them in the manager. Each time you run one of the register function, the task manager will run all the functions required to provide an up-to-date input it.\n\nMoreover the task manager stores all the file in a `data` directory (which you can customize).\n\n## How to use?\nImagine you have two functions:\n\n    import numpy as np\n    def A():\n\t    data_in = np.random.rand(10, 10)\n\t\tdata_out = data_in**2\n\n\t\tnp.save('output_A.dat', data_out)\n\n\tdef B():\n\t    data_in = np.load('output_A')\n\t\tdata_out = data_in - 10\n\t\tnp.save('output_B.dat', data_out)\n\nFor much longer functions, it is easy to forget about which file is up-to-date with each function. To solve this issue, you can wrap your function using a task manager, so that all the outputs files are up-to-date with all the inputs and the function's definitions. First, create a task manager instance:\n\n    import numpy as np\n\timport scyframework as sf\n\ttm = sf.TaskManager()\n\nthen, modify you functions so that the task manager can handle them\n\n\t@tm.register\n    def A():\n\t    data_in = np.random.rand(10, 10)\n\t\tdata_out = data_in**2\n\n\t\tnp.save('output_A.dat', data_out)\n\n\t@tm.register\n\tdef B():\n\t    data_in = np.load('output_A.dat')\n\t\tdata_out = data_in - 10\n\t\tnp.save('output_B.dat')\n\nWe're almost there, you then need to wrap all the input/output statements using `tm.din` (inputs) and `tm.dout` (outputs) to finally have\n\n    import numpy as np\n\timport scyframework as sf\n\ttm = sf.TaskManager()\n\n\t@tm.register\n    def A():\n\t\tnp.random.seed(1234)\n\t    data_in = np.random.rand(10, 10)\n\t\tdata_out = data_in**2\n\t\tnp.save(tm.dout('output_A.dat'), data_out)\n\n\t@tm.register\n\tdef B():\n\t    data_in = np.load(tm.din('output_A.dat'))\n\t\tdata_out = data_in - 10\n\t\tnp.save(tm.dout('output_B.dat'), data_out)\n\nThe `tm.din` and `tm.dout` statements have two roles. First, it converts the filename to a full path so that your data isn't messing up with your local folder.\nFor example here:\n\n\t \u003e print(tm.din('output_B.dat'))\n\t /path/to/current/folder/data/output_B\n\nThen it helps the taskmanager to discover your inputs/outputs so that it knows which functions provides which data. Now if you run the file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcphyc%2Fdotry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcphyc%2Fdotry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcphyc%2Fdotry/lists"}