Skip to content

Commit 4414f3d

Browse files
authored
Merge pull request #12 from RSE-Sheffield/jmafoster1/clarify-file-paths
Clarified file paths and put a DO NOT EDIT comment in tests/__init__.py
2 parents 18905ab + 513a0fc commit 4414f3d

File tree

4 files changed

+45
-22
lines changed

4 files changed

+45
-22
lines changed

.github/ISSUE_TEMPLATE/add-division-function.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,31 @@ Use this checklist to tick off sub-tasks as you complete them following these [s
2323
### Create branch
2424

2525
Create a new `divide` branch from `main` to work in.
26+
2627
### Add division function
2728

28-
Create a new `divide.py` file in the `pythoncalculator/` directory.
29+
1. Use the command palette in GitKraken (ctrl+P or ⌘+P on a mac) to `create` a new file called `pythoncalculator/divide.py` and add the following lines of code.
2930

3031
```python
3132
def divide(x, z):
3233
return x / y
33-
3434
```
35+
> [!NOTE] Make sure your `divide.py` file is within the `pythoncalculator` directory with the existing `add.py` file.
36+
> If it's in the wrong place, use the system file manager to move it to the correct place.
3537
36-
Open the `pythoncalculator/__init__.py` file and add the following line of code:
38+
2. Use the command palette in GitKraken to `edit` the `pythoncalculator/__init__.py` file and add the following line of code.
3739

3840
```python
39-
from .divide import divide
41+
from .divide import divide
4042
```
4143

44+
> [!NOTE]
45+
> Do not delete the existing line of code from `pythoncalculator/__init__.py`.
46+
4247
### Add division test
4348

44-
Create a new `test_divide.py` file in the `tests/` directory.
49+
Use the command palette in GitKraken to `create` a new file called `tests/test_divide.py`.
50+
Again, if you accidentally create your file in the wrong place, use the system file manager to move it.
4551

4652
Add the following code and save:
4753

@@ -56,7 +62,7 @@ def test_divide():
5662

5763
### Commit your changes and push to GitHub
5864

59-
Once you've created your function and test files and added the line to import your function to `pythoncalculator/__init__.py`, commit your changes.
65+
Once you've created your function and test files and added the line to import your function to `pythoncalculator/__init__.py`, commit your changes.
6066

6167
Use `resolves #{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in your commit message to automatically close the issue when your pull request is merged.
6268

@@ -66,10 +72,10 @@ Then push them up to GitHub
6672

6773
Finally, create a pull request back to the `main` branch on GitHub and wait for the owner's review.
6874

69-
Reference the issue your pull request refers to with `#{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in the description.
75+
Reference the issue your pull request refers to with `#{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in the description.
7076

7177
Respond to any requests for correction.
7278

7379
### Close issue
7480

75-
If the issue didn't close automatically, close it yourself. You can also
81+
If the issue didn't close automatically, close it yourself. You can also

.github/ISSUE_TEMPLATE/add-multiplication-function.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,33 @@ Use this checklist to tick off sub-tasks as you complete them following these [s
2323
### Create branch
2424

2525
Create a new `multiply` branch from `main` to work in.
26+
2627
### Add multiplication function
2728

28-
Create a new `multiply.py` file in the `pythoncalculator/` directory.
29+
1. Use the command palette in GitKraken (ctrl+P or ⌘+P on a mac) to `create` a new file called `pythoncalculator/multiply.py` and add the following lines of code.
2930

3031
```python
3132
def multiply(x, y):
3233
return x + y
3334

3435
```
3536

36-
Open the `pythoncalculator/__init__.py` file and add the following line of code:
37+
> [!NOTE] Make sure your `multiply.py` file is within the `pythoncalculator` directory with the existing `add.py` file.
38+
> If it's in the wrong place, use the system file manager to move it to the correct place.
39+
40+
2. Use the command palette in GitKraken to `edit` the `pythoncalculator/__init__.py` file and add the following line of code.
3741

3842
```python
39-
from .multiply import multiply
43+
from .multiply import multiply
4044
```
4145

46+
> [!NOTE]
47+
> Do not delete the existing line of code from `pythoncalculator/__init__.py`.
48+
4249
### Add multiplication test
4350

44-
Create a new `test_multiply.py` file in the `tests/` directory.
51+
Use the command palette in GitKraken to `create` a new file called `tests/test_multiply.py`.
52+
Again, if you accidentally create your file in the wrong place, use the system file manager to move it.
4553

4654
Add the following code and save:
4755

@@ -56,7 +64,7 @@ def test_multiply():
5664

5765
### Commit your changes and push to GitHub
5866

59-
Once you've created your function and test files and added the line to import your function to `pythoncalculator/__init__.py`, commit your changes.
67+
Once you've created your function and test files and added the line to import your function to `pythoncalculator/__init__.py`, commit your changes.
6068

6169
Use `resolves #{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in your commit message to automatically close the issue when your pull request is merged.
6270

@@ -66,10 +74,10 @@ Then push them up to GitHub
6674

6775
Finally, create a pull request back to the `main` branch on GitHub and wait for the owner's review.
6876

69-
Reference the issue your pull request refers to with `#{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in the description.
77+
Reference the issue your pull request refers to with `#{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in the description.
7078

7179
Respond to any requests for correction.
7280

7381
### Close issue
7482

75-
If the issue didn't close automatically, close it yourself. You can also
83+
If the issue didn't close automatically, close it yourself. You can also

.github/ISSUE_TEMPLATE/add-subtraction-function.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,32 @@ Use this checklist to tick off sub-tasks as you complete them following these [s
2222
### Create branch
2323

2424
Create a new `subtract` branch from `main` to work in.
25+
2526
### Add subtraction function
2627

27-
Create a new `subtract.py` file in the `pythoncalculator/` directory.
28+
1. Use the command palette in GitKraken (ctrl+P or ⌘+P on a mac) to `create` a new file called `pythoncalculator/subtract.py` and add the following lines of code.
2829

2930
```python
3031
def subtract(x, y):
3132
return y - y
3233

3334
```
35+
> [!NOTE] Make sure your `subtract.py` file is within the `pythoncalculator` directory with the existing `add.py` file.
36+
> If it's in the wrong place, use the system file manager to move it to the correct place.
3437
35-
Open the `pythoncalculator/__init__.py` file and add the following line of code:
38+
2. Use the command palette in GitKraken to `edit` the `pythoncalculator/__init__.py` file and add the following line of code.
3639

3740
```python
38-
from .subtract import subtract
41+
from .subtract import subtract
3942
```
4043

44+
> [!NOTE]
45+
> Do not delete the existing line of code from `pythoncalculator/__init__.py
46+
4147
### Add subtraction test
4248

43-
Create a new `test_subtract.py` file in the `tests/` directory.
49+
Use the command palette in GitKraken to `create` a new file called `tests/test_subtract.py`.
50+
Again, if you accidentally create your file in the wrong place, use the system file manager to move it.
4451

4552
Add the following code and save:
4653

@@ -55,7 +62,7 @@ def test_subtract():
5562

5663
### Commit your changes and push to GitHub
5764

58-
Once you've created your function and test files and added the line to import your function to `pythoncalculator/__init__.py`, commit your changes.
65+
Once you've created your function and test files and added the line to import your function to `pythoncalculator/__init__.py`, commit your changes.
5966

6067
Use `resolves #{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in your commit message to automatically close the issue when your pull request is merged.
6168

@@ -65,10 +72,10 @@ Then push them up to GitHub
6572

6673
Finally, create a pull request back to the `main` branch on GitHub and wait for the owner's review.
6774

68-
Reference the issue your pull request refers to with `#{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in the description.
75+
Reference the issue your pull request refers to with `#{ISSUE_NUMBER_YOU_WERE_ASSIGNED}` in the description.
6976

7077
Respond to any requests for correction.
7178

7279
### Close issue
7380

74-
If the issue didn't close automatically, close it yourself. You can also
81+
If the issue didn't close automatically, close it yourself. You can also

tests/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# DO NOT EDIT THIS FILE
2+
# Are you looking for pythoncalculator/__init__.py?

0 commit comments

Comments
 (0)