[
  {
    "path": ".circleci/config.yml",
    "content": "version: 2.1\norbs:\n  codecov: codecov/codecov@4\n\njobs:\n  build:\n    docker:\n      - image: cimg/python:3.10\n    steps:\n      - checkout\n      - run:\n          name: Install dependencies\n          command: pip install -r requirements.txt\n      - run:\n          name: Run tests and collect coverage\n          command: pytest --cov app\n      - codecov/upload\n\nworkflow:\n  version: 2.1\n  build-test:\n    jobs:\n      - build\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n- package-ecosystem: pip\n  directory: \"/\"\n  schedule:\n    interval: daily\n  open-pull-requests-limit: 10\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: Workflow for Codecov example-python\non: [push, pull_request]\njobs:\n  run:\n    runs-on: ubuntu-latest\n    permissions:\n      id-token: write\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n      - name: Set up Python 3.10\n        uses: actions/setup-python@v4\n        with:\n          python-version: '3.10'\n      - name: Install dependencies\n        run: pip install -r requirements.txt\n      - name: Run tests and collect coverage\n        run: pytest --cov app --junitxml=junit.xml -o junit_family=legacy\n      - name: Upload test results to Codecov\n        if: ${{ !cancelled() }}\n        uses: codecov/test-results-action@v1\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n      - name: Upload coverage to Codecov (arg token)\n        uses: codecov/codecov-action@main\n        with:\n          fail_ci_if_error: true\n          token: ${{ secrets.CODECOV_TOKEN }}\n          verbose: true\n      - name: Upload coverage to Codecov (env token)\n        uses: codecov/codecov-action@main\n        with:\n          fail_ci_if_error: true\n          verbose: true\n        env:\n          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}\n      - name: Upload coverage to Codecov (no token)\n        uses: codecov/codecov-action@main\n        with:\n          fail_ci_if_error: true\n          verbose: true\n      - name: Upload coverage to Codecov (oidc)\n        uses: codecov/codecov-action@main\n        with:\n          fail_ci_if_error: true\n          use_oidc: true\n          verbose: true\n"
  },
  {
    "path": ".github/workflows/enforce-license-compliance.yml",
    "content": "name: Enforce License Compliance\n\non:\n  pull_request:\n    branches: [main, master]\n\njobs:\n  enforce-license-compliance:\n    runs-on: ubuntu-latest\n    steps:\n      - name: 'Enforce License Compliance'\n        uses: getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main\n        with:\n          fossa_api_key: ${{ secrets.FOSSA_API_KEY }}\n"
  },
  {
    "path": ".gitignore",
    "content": "__pycache__/\n"
  },
  {
    "path": "LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2022 Codecov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# [Codecov](https://codecov.io) Python Example\n[![codecov](https://codecov.io/github/codecov/example-python/branch/main/graph/badge.svg?token=tkq655ROg3)](https://app.codecov.io/github/codecov/example-python)\n[![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)\n\nThis 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.\n\nFor more information, please see the links below.\n\n## Links\n- [Quick Start](https://docs.codecov.com/docs/quick-start)\n- [GitHub Tutorial](https://docs.codecov.com/docs/github-tutorial)\n- [Community Boards](https://community.codecov.io)\n- [Support](https://codecov.io/support)\n- [Documentation](https://docs.codecov.io)\n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-python?ref=badge_large)\n"
  },
  {
    "path": "app/__init__.py",
    "content": ""
  },
  {
    "path": "app/calculator.py",
    "content": "class Calculator:\n\n    def add(x, y):\n        return x + y\n\n    def subtract(x, y):\n        return x - y\n\n    def multiply(x, y):\n        return x * y\n\n    def divide(x, y):\n        if y == 0:\n            return 'Cannot divide by 0'\n        return x * 1.0 / y\n\n"
  },
  {
    "path": "app/test_calculator.py",
    "content": "from .calculator import Calculator\n\n\ndef test_add():\n    assert Calculator.add(1, 2) == 3.0\n    assert Calculator.add(1.0, 2.0) == 3.0\n    assert Calculator.add(0, 2.0) == 2.0\n    assert Calculator.add(2.0, 0) == 2.0\n    assert Calculator.add(-4, 2.0) == -2.0\n\ndef test_subtract():\n    assert Calculator.subtract(1, 2) == -1.0\n    assert Calculator.subtract(2, 1) == 1.0\n    assert Calculator.subtract(1.0, 2.0) == -1.0\n    assert Calculator.subtract(0, 2.0) == -2.0\n    assert Calculator.subtract(2.0, 0.0) == 2.0\n    assert Calculator.subtract(-4, 2.0) == -6.0\n\ndef test_multiply():\n    assert Calculator.multiply(1, 2) == 2.0\n    assert Calculator.multiply(1.0, 2.0) == 2.0\n    assert Calculator.multiply(0, 2.0) == 0.0\n    assert Calculator.multiply(2.0, 0.0) == 0.0\n    assert Calculator.multiply(-4, 2.0) == -8.0\n\ndef test_divide():\n    # assert Calculator.divide(1, 2) == 0.5\n    assert Calculator.divide(1.0, 2.0) == 0.5\n    assert Calculator.divide(0, 2.0) == 0\n    assert Calculator.divide(-4, 2.0) == -2.0\n    # assert Calculator.divide(2.0, 0.0) == 'Cannot divide by 0'\n"
  },
  {
    "path": "bitrise.yml",
    "content": "format_version: \"13\"\ndefault_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git\nproject_type: other\nworkflows:\n  primary:\n    steps:\n    - activate-ssh-key@4:\n        run_if: '{{getenv \"SSH_RSA_PRIVATE_KEY\" | ne \"\"}}'\n    - git-clone@8: {}\n    - script@1:\n        inputs:\n        - script_file_path: null\n        - content: |\n            #!/usr/bin/env bash\n            set -e\n            set -o pipefail\n            set -x # debug log\n\n            pip3 install -r requirements.txt\n            pytest --cov app\n    - codecov@3:\n        inputs:\n        - OS: macos\n        - CODECOV_TOKEN: $CODECOV_TOKEN\n    - deploy-to-bitrise-io@2: {}\nmeta:\n  bitrise.io:\n    stack: osx-xcode-14.3.x-ventura\n    machine_type_id: g2-m1.4core\ntrigger_map:\n- push_branch: main\n  workflow: primary\n- pull_request_source_branch: '*'\n  workflow: primary\n"
  },
  {
    "path": "codecov.yml",
    "content": "flag_management:\n  individual_flags:\n    - name: smart-tests\n      carryforward: true\n      carryforward_mode: \"labels\"\n      statuses:\n        - type: \"project\"\n        - type: \"patch\"\n\ncli:\n  plugins:\n    pycoverage:\n      report_type: \"json\"\n"
  },
  {
    "path": "requirements.txt",
    "content": "attrs==25.4.0\ncoverage==7.12.0\niniconfig==2.3.0\npackaging==25.0\npluggy==1.6.0\npy==1.11.0\npyparsing==3.2.5\npytest==9.0.1\npytest-cov==7.0.0\ntomli==2.3.0\n"
  }
]