1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-06-02 08:31:16 +03:00

Updated docs

Added linting, testing, and new requirements-dev.txt instructions
This commit is contained in:
Athanasius 2020-08-27 12:10:06 +01:00
parent 6ab6b23d7a
commit af3e8f29c7
2 changed files with 28 additions and 32 deletions

View File

@ -181,44 +181,43 @@ Coding Conventions
* **ALWAYS** place a single-statement control flow body, for control statements such as `if`, `else`, `for`, `foreach`, * **ALWAYS** place a single-statement control flow body, for control statements such as `if`, `else`, `for`, `foreach`,
on a separate line, with consistent indentation. on a separate line, with consistent indentation.
Yes: Yes:
```python ```python
if somethingTrue: if somethingTrue:
Things_we_then_do() Things_we_then_do()
``` ```
No: No:
```python ```python
if somethingTrue: One_thing_we_do() if somethingTrue: One_thing_we_do()
``` ```
Yes, some existing code still flouts this rule. Yes, some existing code still flouts this rule.
* **Always** use Line breaks after scope changes. It makes reading code far easier * **Always** use Line breaks after scope changes. It makes reading code far easier
Yes: Yes:
```python ```python
if True: if True:
do_something() do_something()
else: else:
raise UniverseBrokenException() raise UniverseBrokenException()
return return
``` ```
No:
No: ```python
if True:
```python do_something()
if True: else:
do_something() raise UniverseBrokenException()
else: return
raise UniverseBrokenException() ```
return
```
* Going forwards please do place [type hints](https://docs.python.org/3/library/typing.html) on the declarations of your functions, both their arguments and return * Going forwards please do place [type hints](https://docs.python.org/3/library/typing.html) on the declarations of your functions, both their arguments and return

View File

@ -55,12 +55,9 @@ You will need several pieces of software installed, or the files from their
1. Ensure you have `pip` installed. If needs be see 1. Ensure you have `pip` installed. If needs be see
[Installing pip](https://pip.pypa.io/en/stable/installing/) [Installing pip](https://pip.pypa.io/en/stable/installing/)
1. The easiest way is to utilise the `requirements-dev.txt` file: 1. The easiest way is to utilise the `requirements-dev.txt` file:
`python -m pip install -r requirements-dev.txt`. This will install all `python -m pip install -r requirements-dev.txt`. This will install all dependencies plus anything required for development
dependencies plus anything required for development *other than py2exe, see 1. Else check the contents of both `requirements.txt` and `requirements-dev.txt`, and ensure the modules
above*. listed there are installed as per the version requirements.
1. Else check the contents of both `requirements.txt` and `requirements-dev.txt`,
and ensure the modules listed there are installed as per the version
requirements.
If you are using different versions of any of these tools then please ensure If you are using different versions of any of these tools then please ensure
that the paths where they're installed match the associated lines in that the paths where they're installed match the associated lines in