You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-6Lines changed: 27 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
+
## How to use this template
2
+
To the top right-hand side of this repository, you will find a button labeled $${\color{green}Use \space this \space Template}$$. Press it and then click on ``Create a new repository``. This will copy the contents of the repository to your account.
1
3
## Robinson Group Python Template
2
4
This repo serves as a template for python projects in the [Robinson Group](https://robinsongroup.github.io/) of the BIH.
3
5
To get started copy or fork this project and follow the steps below.
4
-
###Install conda
6
+
## Install conda
5
7
If you not already have conda, miniconda or Anaconda installed. Check out the [miniconda installation guide](https://www.anaconda.com/docs/getting-started/miniconda/install#quickstart-install-instructions).
6
8
7
-
####Setup env
9
+
### Setup env
8
10
Open `requirements/environment.yml` and adjust `<Project-Name>`.
As this is a template project, some of the directories and setting have generic names. To ensure the project is set up, that it aligns with your intended name please:
19
21
20
22
1. Rename the folder inside of src
21
23
2. Open the pyproject.toml
22
24
- Rename all variables in the sections ``[project]`` and ``[project.urls]``
23
25
3. Depending on your needs, you should change the LICENSE of this repository. Default is MIT.
24
26
25
-
###Ruff Linting and Formatting
27
+
## Ruff Linting and Formatting
26
28
Ruff helps to maintain the same code style and prevent the most common bugs in our code base. Keeping the code style uniform simplifies the collaboration - it is much easier to review a pull request without hundreds of whitespace changes.
27
29
28
30
Please take a moment to learn how to use the IDE plugins. In PyCharm, the formatting action can be invoked with right-clicking at any code location and the same applies for VS Code. The keyboard shortcuts are also available. However, it is recommended to format and lint on saving a file.
@@ -39,8 +41,27 @@ ruff check
39
41
```
40
42
We recommend to run commit the resulting changes before opening a PR, because the unformatted code will fail the Continuous Integration (CI) pipeline. A PR cannot be merged until the code passes the CI.
41
43
42
-
#### Ruff Plugins
44
+
### Ruff Plugins
45
+
This section will explain how to set up ruff for your choosen IDE.
46
+
#### Pycharm
47
+
To get ruff automatically running install the following Plugin:
To use the plugin, make sure that PyCharm has the environment assigned that contains the ruff installation.
51
+
52
+
##### **Configs:**
53
+
54
+

55
+
56
+
You can find out if ruff works by violating one of the rules. Should you do so, you will see a yellow squirrelly line. An easy way to violate one of the rules is to put a
57
+
``print`` statement somewhere.
58
+
59
+
Then you will see something like this:
60
+
61
+

62
+
63
+
#### VSCode
64
+
To get ruff automatically running install the following Plugin:
@@ -50,6 +71,6 @@ that will build and upload your packages to Pypi for you. To get the CD running
50
71
Then open your repository page on Github. To the right you should find **Create new Release**. Press it!
51
72
52
73
You will find this page:
53
-

74
+

54
75
55
76
Create a new Tag for your release, add a title and a description. If you are still unsure what to do check out the [github release how-to](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release). Press **Publish release**, watch the CD launch in the **Actions Tab** and enjoy your well deserved coffee. ☕
0 commit comments