Windows compatibility changes + Instructions#21
Windows compatibility changes + Instructions#21seroam wants to merge 22 commits intoopenhsr:masterfrom
Conversation
…ry of config because open() doesn't do that on Windows.
in global-excludes
|
@seroam Danke für denen Pull-Request! 🎉 Deine Beiträge können wir gut gebrauchen! Ich werde mir diesen PR noch im Detail anschauen, habe aber diese Woche viel vor, darum werde ich wohl frühstens am Wochenende dazu kommen, sorry. |
raphiz
left a comment
There was a problem hiding this comment.
Da wir ja Pakete für die Plattformen machen möchten ist diese Art der Installation nicht empfohlen (Keine Updates etc). Darum möchte
ich es auch nicht in der README.
Am besten du Kommst an einem Montag vorbei, dann können wir das Zusammen anschauen.
openhsr_connect/configuration.py
Outdated
| if not os.path.exists(config_path): | ||
| if raise_if_incomplete: | ||
| raise ConfigurationException('Configuration does not yet exist!') | ||
|
|
There was a problem hiding this comment.
Hier bitte den Whitespace löschen.
README.md
Outdated
|
|
||
| Besser als der HSR Mapper ;) | ||
|
|
||
| ##How to install |
There was a problem hiding this comment.
Diesen Teil bitte in /docs/install.md verschieben. Dort gibt es bereits einen Teil für die Installation des Druckers. Ziel ist es, die Installation mittels Pakete oder Installer zu automatisieren.
README.md
Outdated
|
|
||
|
|
||
|
|
||
| ###Windows |
There was a problem hiding this comment.
Hier bitte nich einen Hinweis anbringen, dass Windows nicht offiziell/vollständig unterstützt ist.
README.md
Outdated
| 1. Install dependencies | ||
| ``` | ||
| $sudo apt-get install git python3-setuptools gcc python3-dev libffi-dev libssl-dev python3-pip -y | ||
| ``` |
There was a problem hiding this comment.
Hier musst du die Code-Blocks einrücken, da sonst Markdown die Nummerierung nicht Checkout (Siehe https://github.com/seroam/connect/blob/master/README.md)
There was a problem hiding this comment.
Und ein Space zwischen $ und dem Kommand 😉
README.md
Outdated
| ``` | ||
| $openhsr-connect edit | ||
| ``` | ||
| Enter HSR information, modify config file for your classes (See example [here](https://github.com/openhsr/connect/blob/master/docs/config.example.yaml)) |
There was a problem hiding this comment.
Generell würde ich Links nicht mit here oder so benennen, sondern bsp. See example configuration.
README.md
Outdated
| ``` | ||
| Sync the specified directories with the script server. | ||
|
|
||
| ###Bash on Ubuntu on Windows |
There was a problem hiding this comment.
Wann und was ist hier der Unterschied zur "normalen" Windows?!
|
|
||
|
|
||
| #Open file path and create parent directories if necessary as open() doesn't create them on Windows | ||
| def safe_open_w(path): |
There was a problem hiding this comment.
Python Methodenkommentare sind unterhalb mit drei "
Also
def safe_open_w(path):
"""
Open file path and create parent directories if necessary as open() doesn't create them on Windows
"""| else: raise | ||
|
|
||
| return open(path, 'w') | ||
|
|
openhsr_connect/configuration.py
Outdated
| except OSError as e: | ||
| if e.errno == errno.EEXIST and os.path.isdir(os.path.dirname(path)): | ||
| pass | ||
| else: raise |
| mail = input('Deine HSR-Email (VORNAME.NACHNAME@hsr.ch): ') | ||
| config = DEFAULT_CONFIG.format(username=username, mail=mail) | ||
| with open(config_path, 'w') as f: | ||
|
|
There was a problem hiding this comment.
Gemäss PEP-8 nur eine leere Zeile
Made some changes in configuration.py to make it work better with Windows. Namely, these are:
I couldn't figure out how to properly make a numbered list, hopefully you guys can fix that (so it doesn't say 1., 1., 1. for all steps)