From 3bb692d9d430352909a0f044ef0e30bb3f6f7c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Thu, 28 Sep 2023 13:50:34 +0200 Subject: [PATCH 01/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4251cc84..75e1d36f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # [Codecov](https://codecov.io) Python Example -[![codecov](https://codecov.io/github/codecov/example-python/branch/main/graph/badge.svg?token=tkq655ROg3)](https://app.codecov.io/github/codecov/example-python) +[![codecov](https://codecov.cloud.remarkable.engineering/github/naesheimas/example-python/branch/main/graph/badge.svg?token=tkq655ROg3)](https://codecov.cloud.remarkable.engineering/github/naesheimas/example-python) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python?ref=badge_shield) This example repository shows how Codecov can be integrated with a simple python project. It uses **GitHub Actions** and **CircleCI** as CI/CD providers and **coverage** as the coverage provider. From d177a4afc1fe43a955d3cb1a169d19ceaa27b973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Thu, 28 Sep 2023 13:42:58 +0200 Subject: [PATCH 02/17] Update test_calculator.py --- app/test_calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test_calculator.py b/app/test_calculator.py index f5641938..4abcda6c 100644 --- a/app/test_calculator.py +++ b/app/test_calculator.py @@ -28,4 +28,4 @@ def test_divide(): assert Calculator.divide(1.0, 2.0) == 0.5 assert Calculator.divide(0, 2.0) == 0 assert Calculator.divide(-4, 2.0) == -2.0 - # assert Calculator.divide(2.0, 0.0) == 'Cannot divide by 0' + assert Calculator.divide(2.0, 0.0) == 'Cannot divide by 0' From a3584863bf6e843ce64a61536dc9cd262fdca592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Thu, 28 Sep 2023 14:42:26 +0200 Subject: [PATCH 03/17] update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75e1d36f..2eea6679 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [Codecov](https://codecov.io) Python Example +# [SELF-HOSTED Codecov](https://codecov.cloud.remarkable.engineering) Python Example [![codecov](https://codecov.cloud.remarkable.engineering/github/naesheimas/example-python/branch/main/graph/badge.svg?token=tkq655ROg3)](https://codecov.cloud.remarkable.engineering/github/naesheimas/example-python) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python?ref=badge_shield) @@ -7,7 +7,7 @@ This example repository shows how Codecov can be integrated with a simple python For more information, please see the links below. ## Links -- [Quick Start](https://docs.codecov.com/docs/quick-start) +- [Quick Start](https://codecov.cloud.remarkable.engineering) - [GitHub Tutorial](https://docs.codecov.com/docs/github-tutorial) - [Community Boards](https://community.codecov.io) - [Support](https://codecov.io/support) From 3e1176cf1de012e86837422dd73779775d4c4361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Thu, 28 Sep 2023 14:47:51 +0200 Subject: [PATCH 04/17] older action --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bce60d5..1126b116 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,6 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4-beta + uses: codecov/codecov-action@v3 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 327a80ea2ce9b60c486e0dade8cfb5e12a87f29e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Thu, 28 Sep 2023 15:02:19 +0200 Subject: [PATCH 05/17] add enterprise token --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1126b116..5eca03bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,5 +16,8 @@ jobs: run: pytest --cov app - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 + with: + url: https://codecov.cloud.remarkable.engineering + token: ${{ secrets.CODECOV_TOKEN }} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From dd51851bfd7654479e8f6793059494865dce3991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Thu, 28 Sep 2023 23:13:16 +0200 Subject: [PATCH 06/17] add enterprise token++ --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5eca03bf..b2b6db0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,5 +19,7 @@ jobs: with: url: https://codecov.cloud.remarkable.engineering token: ${{ secrets.CODECOV_TOKEN }} + slug: naesheimas/example-python + verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 28a9528bbf1216c505c30c06c3c36f16d75565e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Fri, 29 Sep 2023 14:10:26 +0200 Subject: [PATCH 07/17] updated batch --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2eea6679..9cdd5d93 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # [SELF-HOSTED Codecov](https://codecov.cloud.remarkable.engineering) Python Example -[![codecov](https://codecov.cloud.remarkable.engineering/github/naesheimas/example-python/branch/main/graph/badge.svg?token=tkq655ROg3)](https://codecov.cloud.remarkable.engineering/github/naesheimas/example-python) +[![codecov](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python/branch/main/graph/badge.svg?token=Z4MUPAUH97)](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python?ref=badge_shield) This example repository shows how Codecov can be integrated with a simple python project. It uses **GitHub Actions** and **CircleCI** as CI/CD providers and **coverage** as the coverage provider. From 38cb12135b02774edfae40adeb96effb9113059e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Fri, 29 Sep 2023 14:40:01 +0200 Subject: [PATCH 08/17] bump action version --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2b6db0e..a8750ce9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: url: https://codecov.cloud.remarkable.engineering token: ${{ secrets.CODECOV_TOKEN }} From eb0b19db2ece38850a3fdc16fd1ca7ad429dca34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Fri, 29 Sep 2023 14:49:14 +0200 Subject: [PATCH 09/17] beta --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8750ce9..d454be0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v4-beta with: url: https://codecov.cloud.remarkable.engineering token: ${{ secrets.CODECOV_TOKEN }} From 2d841be69171e08904c7dfb026dc720fa661bc95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Fri, 29 Sep 2023 15:27:12 +0200 Subject: [PATCH 10/17] testing --- .github/workflows/ci.yml | 6 +++--- codecov.yml | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d454be0d..909f779b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,11 +15,11 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4-beta + uses: codecov/codecov-action@v3 with: - url: https://codecov.cloud.remarkable.engineering + # url: https://codecov.cloud.remarkable.engineering token: ${{ secrets.CODECOV_TOKEN }} - slug: naesheimas/example-python + # slug: naesheimas/example-python verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/codecov.yml b/codecov.yml index 6f151f75..90edd731 100644 --- a/codecov.yml +++ b/codecov.yml @@ -4,3 +4,13 @@ profiling: comment: show_critical_paths: true + layout: "diff, flags, files" + +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true From a40992eced4ac8b4479535fb0b93d7104e2d339e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Fri, 29 Sep 2023 15:29:17 +0200 Subject: [PATCH 11/17] yepyep --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 909f779b..b031e39e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4-beta with: # url: https://codecov.cloud.remarkable.engineering token: ${{ secrets.CODECOV_TOKEN }} From 69ff97bd8d13b014c537c4ec9cd8f5fcfe202b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Fri, 29 Sep 2023 15:37:08 +0200 Subject: [PATCH 12/17] fml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b031e39e..b2b6db0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,11 +15,11 @@ jobs: - name: Run tests and collect coverage run: pytest --cov app - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4-beta + uses: codecov/codecov-action@v3 with: - # url: https://codecov.cloud.remarkable.engineering + url: https://codecov.cloud.remarkable.engineering token: ${{ secrets.CODECOV_TOKEN }} - # slug: naesheimas/example-python + slug: naesheimas/example-python verbose: true env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 35f0a39c10be500a61223754cc9087f77082bdf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Fri, 29 Sep 2023 15:55:23 +0200 Subject: [PATCH 13/17] downgrade --- app/test_calculator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test_calculator.py b/app/test_calculator.py index 4abcda6c..f5641938 100644 --- a/app/test_calculator.py +++ b/app/test_calculator.py @@ -28,4 +28,4 @@ def test_divide(): assert Calculator.divide(1.0, 2.0) == 0.5 assert Calculator.divide(0, 2.0) == 0 assert Calculator.divide(-4, 2.0) == -2.0 - assert Calculator.divide(2.0, 0.0) == 'Cannot divide by 0' + # assert Calculator.divide(2.0, 0.0) == 'Cannot divide by 0' From 87cf7e53e8ef214cfcad04e66a388ba1e1a669a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Tue, 10 Oct 2023 12:48:53 +0200 Subject: [PATCH 14/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cdd5d93..43687ca0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [SELF-HOSTED Codecov](https://codecov.cloud.remarkable.engineering) Python Example +# Self-hosted [Codecov](https://codecov.cloud.remarkable.engineering) Python Example [![codecov](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python/branch/main/graph/badge.svg?token=Z4MUPAUH97)](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python?ref=badge_shield) From 50b9e4c7338317dab085b263018d2f3735d4043f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Tue, 10 Oct 2023 13:57:27 +0200 Subject: [PATCH 15/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 43687ca0..daec4474 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Self-hosted [Codecov](https://codecov.cloud.remarkable.engineering) Python Example -[![codecov](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python/branch/main/graph/badge.svg?token=Z4MUPAUH97)](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python) +[![codecov](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python/branch/main/graph/badge.svg?token=KPCQY440EA)](https://codecov.cloud.remarkable.engineering/gh/naesheimAS/example-python) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python?ref=badge_shield) This example repository shows how Codecov can be integrated with a simple python project. It uses **GitHub Actions** and **CircleCI** as CI/CD providers and **coverage** as the coverage provider. From 57ba40eaa38dc4ea4f3ee1b8c31354fd9eb13d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Tue, 10 Oct 2023 15:20:54 +0200 Subject: [PATCH 16/17] Update calculator.py --- app/calculator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/calculator.py b/app/calculator.py index 8a976b25..68b5732d 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -1,5 +1,8 @@ class Calculator: - + def power(x, y): + if y >1: + return x * power(x,y-1) + def add(x, y): return x + y From 645d675e6ab909e7e69f48c5ed610727cd295427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Georg=20N=C3=A6sheim?= Date: Thu, 12 Oct 2023 13:45:24 +0200 Subject: [PATCH 17/17] add main section --- app/calculator.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/calculator.py b/app/calculator.py index 68b5732d..53d5245b 100644 --- a/app/calculator.py +++ b/app/calculator.py @@ -1,7 +1,8 @@ class Calculator: - def power(x, y): + def power(self, x,y): if y >1: - return x * power(x,y-1) + return x * Calculator.power(self,x,y-1) + return x def add(x, y): return x + y @@ -16,3 +17,11 @@ def divide(x, y): if y == 0: return 'Cannot divide by 0' return x * 1.0 / y + + +def main(): + cal = Calculator() + print(cal.power(2,3)) + +if __name__ == "__main__": + main() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy