Skip to content

Commit f69568e

Browse files
Merge pull request #1 from martinkilbinger/test
test, added new fct
2 parents 2fc8357 + 9144378 commit f69568e

6 files changed

Lines changed: 51 additions & 12 deletions

File tree

cs_util/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,3 @@
3535
'Could not extract package metadata. Make sure the package is '
3636
+ 'correctly installed.',
3737
)
38-
39-
__version__ = _version

cs_util/example/math.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,35 @@ def mad(input_data: np.ndarray) -> float:
162162
163163
"""
164164
return np.median(np.abs(input_data - np.median(input_data)))
165+
166+
167+
def add_two_floats(first_value: float, second_value: float) -> float:
168+
"""Add Two Floats.
169+
170+
Add two float values.
171+
172+
Parameters
173+
----------
174+
first_value : float
175+
First float value
176+
second_value : float
177+
Second float value
178+
179+
Returns
180+
-------
181+
float
182+
Result of addition
183+
184+
Raises
185+
------
186+
TypeError
187+
For invalid input types.
188+
189+
"""
190+
fv_is_float = isinstance(first_value, float)
191+
sv_is_float = isinstance(second_value, float)
192+
193+
if not all((fv_is_float, sv_is_float)):
194+
raise TypeError('Inputs must be floats.')
195+
196+
return first_value + second_value

develop.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
coverage==5.3
2-
nose==1.3.7
3-
pytest==6.1.2
4-
pytest-cov==2.10.1
5-
pytest-pep8==1.0.6
6-
pytest-emoji==0.2.0
7-
pytest-flake8==1.0.6
8-
wemake-python-styleguide==0.14.1
1+
coverage
2+
nose
3+
pytest
4+
pytest-cov
5+
pytest-pep8
6+
pytest-emoji
7+
pytest-flake8
8+
wemake-python-styleguide

environment.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: cs_util
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python==3.10
6+
- pip>=21
7+
- pip:
8+
- -r requirements.txt

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
importlib_metadata==3.1.1
1+
importlib_metadata
22
numpy
33
astropy
44
matplotlib
5+
pycodestyle==2.9.0
56
vos
67
datetime

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
license = 'MIT'
2222

2323
# Set the package classifiers
24-
python_versions_supported = ['3.6', '3.7', '3.8', '3.9']
24+
python_versions_supported = ['3.6', '3.7', '3.8', '3.9', '3.10']
2525
os_platforms_supported = ['Unix', 'MacOS']
2626

2727
lc_str = 'License :: OSI Approved :: {0} License'

0 commit comments

Comments
 (0)