Skip to content

Commit

Permalink
add comps
Browse files Browse the repository at this point in the history
  • Loading branch information
JerrySentry committed Nov 24, 2023
1 parent 75bbe35 commit c3947b4
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 8 deletions.
5 changes: 4 additions & 1 deletion app/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ def modulo(x, y):
def trippy(x, y):
x += 1
y -= 1
return x * y
return x * y

def minus_one(x):
return x-1
5 changes: 4 additions & 1 deletion app/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ def food():
return "Eat this"

def joint():
return "Yeh"
return "Yeh"

def ops():
return "Opposites or rivals from another gang or opposing group"
5 changes: 4 additions & 1 deletion app/test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ def test_divide():

def test_modulo():
assert Calculator.modulo(5, 2) == 1
assert Calculator.modulo(6, 2) == 0
assert Calculator.modulo(6, 2) == 0

def test_minus_one():
assert Calculator.minus_one(5) == 4
5 changes: 4 additions & 1 deletion app/test_dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ def test_car():
assert Dictionary.car() == "Something that you drive"

def test_food():
assert Dictionary.food() == "Eat this"
assert Dictionary.food() == "Eat this"

def test_ops():
assert Dictionary.ops() == "Opposites or rivals from another gang or opposing group"
20 changes: 19 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,22 @@ flag_management:
target: auto
threshold: 1%
- type: patch
target: 1%
target: 1%

component_management:
default_rules:
statuses:
- type: project
target: auto
threshold: 1%
- type: patch
target: 1%
individual_components:
- component_id: dictionary
name: DictionaryApp
paths:
- "**/dictionary.py"
- component_id: calculator
name: CalculatorApp
paths:
- "**/calculator.py"
8 changes: 5 additions & 3 deletions coverage.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
<coverage version="7.3.2" timestamp="1698851911057" lines-valid="253" lines-covered="67" line-rate="0.2648" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
<coverage version="7.3.2" timestamp="1698866135431" lines-valid="255" lines-covered="68" line-rate="0.2667" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.3.2 -->
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
<sources>
Expand Down Expand Up @@ -219,7 +219,7 @@
</class>
</classes>
</package>
<package name="app" line-rate="0.931" branch-rate="0" complexity="0">
<package name="app" line-rate="0.9167" branch-rate="0" complexity="0">
<classes>
<class name="__init__.py" filename="app/__init__.py" complexity="0" line-rate="1" branch-rate="0">
<methods/>
Expand Down Expand Up @@ -247,7 +247,7 @@
<line number="23" hits="0"/>
</lines>
</class>
<class name="dictionary.py" filename="app/dictionary.py" complexity="0" line-rate="1" branch-rate="0">
<class name="dictionary.py" filename="app/dictionary.py" complexity="0" line-rate="0.8889" branch-rate="0">
<methods/>
<lines>
<line number="1" hits="1"/>
Expand All @@ -257,6 +257,8 @@
<line number="7" hits="1"/>
<line number="9" hits="1"/>
<line number="10" hits="1"/>
<line number="12" hits="1"/>
<line number="13" hits="0"/>
</lines>
</class>
<class name="test_calculator.py" filename="app/test_calculator.py" complexity="0" line-rate="1" branch-rate="0">
Expand Down

0 comments on commit c3947b4

Please sign in to comment.