ems-tu-ilmenau / chefkoch Goto Github PK
View Code? Open in Web Editor NEWA compute cluster cuisine for distributed scientific computing in python
License: Apache License 2.0
A compute cluster cuisine for distributed scientific computing in python
License: Apache License 2.0
[3] https://www.caktusgroup.com/blog/2017/05/29/subtests-are-best/
It should be
This function does bla.
Parameters
------------
boo (type):
This parameter is used for bees.
Returns
--------
A magnificant value of type blub.
Raises
-------
BlobError:
If there is a blob forming that swallows everything along the way.
Es soll möglich sein von der Command Line aus eine Python Datei auszuführen, die folgendes Format hat:
Für die Ausführung ist folgender Plan vorgesehen:
pyyaml
kann parsing und übernimmt security features?print(node)
oder auch print("bla " + node + " blub.)
oder logger.debug("bla " + node + " blub.)
funktionieren. Falls das nicht geht, sollte die Methode zumindest eine Klassenmethode sein, z.b. apple_pie_recipe.print()
list
erben, so dass recipe["node1"]
anstelle von recipe.nodes["node1"]
verwendet werden kannjsonToRecipe(jsonData)
sollte der Konstruktor der Klasse Recipe sein und Integrity Checks automatisch aufrufenBis jetzt kann black von der Travis Continuous Integration im Makefile nicht verwendet werden, da make black
in einer Aufzählung der Form:
somelist = [
{"smells": "like", "teen": "spirit", },
{"has": "a", "funny": "story", },
]
Leerzeichen hinter dem letzen Komma weg nimmt, PyCodeStyle aber einen "missing whitespace after comma" Fehler schmeißt und die Continuous Integration Tests dann einen merge blockieren.
Aufgabe: Recherchieren, welche PyCodeStyle Regel das ist oder welche Regel bei black und eine von beiden ausschließen.
Rename the class HyperItem
to FridgeShelf` throughout the whole package
[ x ] Class definition
[ x ] Class References
[ x ] Mentions in Wiki
[ ] Mentions in docs
Meet with Willi and other colleagues to collect use cases to help varify the architecture.
Compare requirements from bachelor thesis with features needed for this specific prototype to make a new requirements list. Specify inputs and wanted outputs or a measureable goal for every feature.
Nicht intuitiv bisher.
Dieses Issue sammelt die Inhalte, die in die Config aufgenommen werden müssen:
In chefkoch we would like to support calling shell scripts, too and these often tend to work on multiple files or directories. For a variety of reasons it is desireable to handle these situations with containers:
Tarballs are a de-facto standard in unix. They provide no compression (unless combined with gzip to produce the infamous .tar.gz), but retain user permissions and even ACLs. Also, the no-compression constraint is actually a feature when it comes to performance. Adding the wide support for tar, this seems to be the natural choice for container format. However, feel free to suggest alternatives, if you come across one.
This issue shall:
Show example functions for
pack(tarball, *files)
, where tarball is the name of the resulting archive and files a list of files (optionally: should support globbing)unpack(tarball, destination)
, where tarball is the name of the archive to be unpacked and destination is where the files shall be unpackedtest(tarball)
, where tarball is the name of the archive to be tested. If errors are found, an exception shall be raised.Tasks
chef
(no extension) and reside in the directory bin/
of the repositorychefkoch
module and make the chef.version
available as the global variable __version__
__main__
script wrapper (for these two bullet points see the PINGIT
project)-v/--verbose
flag option and -d/--debug-level
int option (defaults to 0)cook
, check
, inspect
and version
. The function name should follow the format cmd_command
where command
is replaced by the actual command name. Prefix the routines by the @subcmd(command)
decorator. (here, too, command is replaced by the command name). Let PINGIT
guide you if in doubtbin/chef
as a command line toolpython setup.py install
locally) that the command line tool is installed properly and available when installed using pip__version__
of the toolFind out how to compile any python file (given by filename) into a python compiled bytecode container (.pyc) and how to import these .pyc (that may also lay outside a module) into the python namespace as an object.
There shall be functions that
Or change it so that it runs and adjust the definition of the files that are entered by the user.
Entsprechend der im "sophie"-Branch umgesetzen Klassen sollen die Eingabeformate für die
Recipe soll von list erben, so dass man nicht jedes mal recipe.nodes
schreiben muss, sondern recipe[0] verwenden kann und man nodes per Index adressieren kann.
Auf den Anhängigkeiten im Recipe wird Tiefensuche verwendet, um sicher zu stellen, dass es keine Abhängigkeits-Kreise gibt. Diese Tiefensuche ist bisher selbst implementiert und nicht besonders effizient. Stattdessen soll der Inhalt des Recipes als gerichteter Graph dargestellt werden und die Graph-Library eigene Tiefensuche oder direkt kreisfreiheit verwendet werden, die vermutlich effizienter und im Code definitiv leichter zu lesen ist. Später bei der Ausführung des recipes wird das ebenfalls nützlich.
...and fix the issues found along the way.
and explain it to Johannes and Willi
Since I have not studied the structure of the project intensively, please forgive me my incorrect use of your terminology – I am a bad cook.
Some python packages parse certain shell environment variables in order to change their behaviour, like logging levels and so on. It would be nice, if one could execute certain recipes with certain shell variables.
a.k.a Consistent handling of Command line (frontend) and call (backend) Arguments
The user interface for chefkoch is a command line tool, therefore information like "What is the workflow of the simulation?" need to be entered as command line arguments, for example the file path of the recipe. Thise configuration information might be collected in a "cheffile", that holds default file paths for the recipe, flavour file, the cache folder etc. The "kitchenfile" might specify which hardware can be used to execute a simulation, for example "How many processes can be run in parallel?", "How many cores are available?" or "Should the compute cluster be used for execution?"
Still, this first prototype does not use concurrency.
Arbitrary code execution allows the very bad situation that a "digital perpetrator" might intentionally run malicious code in situations that were not intented by the programmer for code execution. We should do our best to avoid that chefkoch offers much opportunity for this.
Some examples, where things like this could be introduced:
sys.call
eval()
-related.While it is sufficient to avoid those functions, or to avoid calling them with arbitrary (user-defineable, also partially) strings in the most cases, sometime one just can't get around having to use them.
In this issue, the investigation shall conclude about
Please document your findings in the discussion to this issue
In die Comment Section der einzugebenden Datein soll nach Möglichkeit ein Kommentar die kompatiblen Chefkoch-Versionen vermerken und diese soll beim Einlesen geprüft werden. In JSON-Datein sind eventuell keine Kommentare möglich. In den Python-Datein, die die Simulationsschritte enthalten, müssen sie aber unbedingt rein.
FInd out how to detet names of function arguments (key-worded arguments) of python functions.
def aFunction(bla=123, blub='abc'):
pass
By using Python's inspect capabilities, a function shall be generated that returns ['bla', 'blub']
for the given example, i.e. the names of the keyworded arguments of an arbitrary function.
Final result: A demonstration script is created that contains the function and exhibits correct functionality. Additional capabilities and interesting notes about the inspection framework are documented in the discussion to this issue.
First: Someone do the step execution
Meet with Georg and Seb to build a demo example to varify the architecture with and to run the prototype with.
Im Recipe sind als Inputs für manche Simulationsschritte Flavour-Parameter angegeben. Bisher werden sie mit {"input1": "flavour.parametername"} angegeben. Jetzt sollen sie nur noch als {"input1": "parametername"} angegeben werden. Bei der Überprüfung des Recipes inputIntegrity() soll geprüft werden, ob ein Parametername im Flavour Objekt vorhanden ist und falls ja als korrekt angesehen werden, statt dass wie bisher nur auf das Präfix "flavour." geachtet wird.
It should
Look up step definition in bachelor thesis and evaluate if it makes sense for this prototype. Also give definition of CLI command, idea of execution and specification.
This issue collects requirements for a namespace class.
Dear kitchen masters,
I don't have an issue (at least not with chefkoch), but have you had a look at
https://docs.dask.org/en/latest/futures.html ?
Maybe this is worth knowing for chefkoch?
Cheers
Seb
Die Zwischenergebnisse der Simulation sollen zukünftig in einem Ordner mit dem Namen des Zwischenergebnisses und einer Datei mit dem Hash aller verwendeter Inputs gespeichert werden. Dabei kann es passieren, dass der Name und Dateipfad länger werden als die System bedingte MAX_PATH Variable. Dafür soll eine Lösung gefunden werden oder beim Einlesen des Recipes eine Warnung ausgespuckt werden, falls die darin enthaltenen Namen zu lang sind.
...which means
Die Simulationsschritte sollen als Python Datei hinterlegt werden, die ein Dictionary als Input nimmt (in dem dann alle tatsächlich benötigten Inputs drin stehen), ein Dictionary als Output raus gibt und eine Funktion execute(**args) definiert. Wenn der Speicherort der Simulationsschritte in die Console eingegeben wird, soll ein Sanity Check durchgeführt werden, der prüft, ob sie dieses Format haben und ob die Dictionaries mit ihren Key-Namen mit dem entsprechenden Schritt/Knoten im Recipe übereinstimmt.
Good tests
Hi Sophie,
sehr cool. Ich kann dich leider gerade nur auf ein paar
Zusammenschriebse verweisen, die wir mal für unsere Studenten
veranstaltet hatten [1,2]. Bei einem kurzen Blick in deine Tests fiel
mir auf den ersten Blick auf, dass da ein hardgecodeter Pfad stand und
dass du viele asserts untereinander hast. An der Stelle bieten sich
subtests an [1,3].
Du kannst ja mal schauen, ob du mit den Links etwas anfangen kannst.
Ansonsten frag einfach, wenn irgendwas ist! Und ich werde auch gerne,
sobald ich es schaffe, mal genauer schauen, was du da machst.
Viele Grüße
Fabian
[1]
https://gitlab.tu-ilmenau.de/FakEI/InIT/it-ems/Projects/SigMaSense/python_talk/blob/master/2019_11_28_git_submodule_and_unittests/unittests.md
[2]
https://gitlab.tu-ilmenau.de/FakEI/InIT/it-ems/Projects/SigMaSense/python_talk/blob/master/2020_01_17_unittests_advanced/unittests_advanced.md
[3]
https://www.caktusgroup.com/blog/2017/05/29/subtests-are-best/
Goals:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.