Skip to content

Commit 0e2e77c

Browse files
authored
Merge pull request #34 from musslick/musslick-patch-2
Musslick patch 2
2 parents 8cec822 + 4896656 commit 0e2e77c

9 files changed

Lines changed: 30 additions & 12 deletions

File tree

File renamed without changes.

.github/workflows/python-publish.yml.disabled renamed to .github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
with:
3838
repository_url: https://test.pypi.org/legacy/
3939
user: __token__
40-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
40+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
File renamed without changes.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Basic Tutorial for Open Source Development on GitHub
1+
# Hello
22

33
## Requirements
44

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ extra_javascript: [
2626
]
2727

2828
site_name: Contributor Onboarding
29-
repo_url: 'https://github.com/GITHUBUSERNAME/contributor-onboarding'
29+
repo_url: 'https://github.com/musslick/contributor-onboarding'
3030

3131
nav:
3232
- Home: 'index.md'
3333
- Resources:
34-
- 'resources/github-basics.md'
34+
- 'resources/github-basics.md'

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ test = [
2424
]
2525

2626
[project.urls]
27-
repository = "https://github.com/GITHUBUSERNAME/contributor-onboarding"
28-
documentation = "https://GITHUBUSERNAME.github.io/contributor-onboarding/"
27+
repository = "https://github.com/musslick/contributor-onboarding"
28+
documentation = "https://musslick.github.io/contributor-onboarding/"
2929

3030
[build-system]
3131
requires = ["setuptools", "setuptools_scm"]

src/utils.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ def modulo(a: int, b: int):
5555
float
5656
'''
5757

58-
# I think this could be made more efficient?
59-
result = a - (np.floor(a / b) * b)
60-
61-
return result
58+
return a%b
6259

6360
def element_wise_multiply(a: np.array, b: np.array) -> np.array:
6461
'''
@@ -76,7 +73,8 @@ def element_wise_multiply(a: np.array, b: np.array) -> np.array:
7673

7774
return np.multiply(a, b)
7875

79-
def return_hexadecimal(a: int) -> float:
76+
# change output type of return_hexadecimal function
77+
def return_hexadecimal(a: int) -> str:
8078
'''
8179
...
8280
@@ -103,4 +101,4 @@ def return_random_number() -> int:
103101
float
104102
'''
105103

106-
return np.random.randint(0, 100)
104+
return np.random.randint(0, 100)

tests/test_modulo.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from src.utils import modulo
2+
def test_modulo():
3+
a = 3
4+
b = 2
5+
6+
c = 0
7+
8+
assert modulo(a, b) == 1
9+
assert modulo(b, a) == 2
10+
assert modulo(b, b) == 0
11+
assert modulo(c, b) == 0

tests/test_sum.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from src.utils import sum
2+
3+
def test_sum():
4+
a = 3
5+
b = 4
6+
7+
8+
9+
assert sum(a,b) == 7

0 commit comments

Comments
 (0)