Skip to content

Commit

Permalink
Merge pull request #1 from martinkilbinger/test
Browse files Browse the repository at this point in the history
test, added new fct
  • Loading branch information
martinkilbinger authored Oct 7, 2022
2 parents 2fc8357 + 9144378 commit f69568e
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 12 deletions.
2 changes: 0 additions & 2 deletions cs_util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@
'Could not extract package metadata. Make sure the package is '
+ 'correctly installed.',
)

__version__ = _version
32 changes: 32 additions & 0 deletions cs_util/example/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,35 @@ def mad(input_data: np.ndarray) -> float:
"""
return np.median(np.abs(input_data - np.median(input_data)))


def add_two_floats(first_value: float, second_value: float) -> float:
"""Add Two Floats.
Add two float values.
Parameters
----------
first_value : float
First float value
second_value : float
Second float value
Returns
-------
float
Result of addition
Raises
------
TypeError
For invalid input types.
"""
fv_is_float = isinstance(first_value, float)
sv_is_float = isinstance(second_value, float)

if not all((fv_is_float, sv_is_float)):
raise TypeError('Inputs must be floats.')

return first_value + second_value
16 changes: 8 additions & 8 deletions develop.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
coverage==5.3
nose==1.3.7
pytest==6.1.2
pytest-cov==2.10.1
pytest-pep8==1.0.6
pytest-emoji==0.2.0
pytest-flake8==1.0.6
wemake-python-styleguide==0.14.1
coverage
nose
pytest
pytest-cov
pytest-pep8
pytest-emoji
pytest-flake8
wemake-python-styleguide
8 changes: 8 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: cs_util
channels:
- conda-forge
dependencies:
- python==3.10
- pip>=21
- pip:
- -r requirements.txt
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
importlib_metadata==3.1.1
importlib_metadata
numpy
astropy
matplotlib
pycodestyle==2.9.0
vos
datetime
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
license = 'MIT'

# Set the package classifiers
python_versions_supported = ['3.6', '3.7', '3.8', '3.9']
python_versions_supported = ['3.6', '3.7', '3.8', '3.9', '3.10']
os_platforms_supported = ['Unix', 'MacOS']

lc_str = 'License :: OSI Approved :: {0} License'
Expand Down

0 comments on commit f69568e

Please sign in to comment.