Skip to content

Commit

Permalink
minor file renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
codingwithshawnyt committed Dec 28, 2024
1 parent 8653c59 commit e0b1ae1
Show file tree
Hide file tree
Showing 88 changed files with 7,855 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: no # [yes :: must have a base report to post]
require_head: yes # [yes :: must have a head report to post]

coverage:
status:
project:
default:
threshold: 1
16 changes: 16 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[run]
source = pydriller

[report]
exclude_lines =
if self.debug:
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
exclude_also =
@(abc\.)?abstractmethod
ignore_errors = True
include = */pydriller/*
omit =
tests/*
*/__init__.py/*
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
show-source = True
count = True
statistics = True
max-line-length = 150
exclude = .github,venv,build,dist,docs,test-repos,.venv,tmp.py
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: ishepard
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the bug. For example, a specific commit in a repository, and/or a modification.

**OS Version:**
Windows/MacOS/Linux
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Example: I often have the problem of [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other information or screenshots about the feature request here.
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "0 17 * * 1"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
50 changes: 50 additions & 0 deletions .github/workflows/continuous-integration-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Pydriller workflow
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python: [ '3.8.x', '3.9.x', '3.10.x', '3.11.x', '3.12.x' ]
name: Python ${{ matrix.python }} sample on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies and unzip test-repos
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install pytest-cov
unzip test-repos
- name: Mypy
run: |
pip install mypy
mypy --ignore-missing-imports pydriller/ tests/
- name: Lint with flake8
run: |
pip install flake8
flake8
- name: Run pytest
run: pytest --junitxml=testpulse/test_run/test_results.xml --cov-report xml:testpulse/test_run/coverage.xml --cov=pydriller tests/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
- name: Upload to testpulse
if: '!cancelled()'
env:
TESTPULSE_TOKEN: ${{ secrets.TESTPULSE_TOKEN }}
run: |
pip install testpulse-uploader
testpulse-upload -tr ".*testpulse\/test_run\/.*\.xml" -tr ".*testpulse\\test_run\\.*\.xml" --config-file .testpulse.yaml -lv ${{ matrix.python }} -tt unit
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish Python 🐍 distributions 📦 to PyPI
on:
push:
tags:
- 2*

jobs:
publish:
name: "Build, test and upload to pypi"
runs-on: "ubuntu-latest"
environment:
name: pypi
url: https://pypi.org/project/PyDriller/
permissions:
id-token: write

steps:
- uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies and unzip test-repos
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install pytest-cov
unzip test-repos
- name: Mypy
run: |
pip install mypy
mypy --ignore-missing-imports pydriller/ tests/
- name: Lint with flake8
run: |
pip install flake8
flake8
- name: Run pytest
run: pytest tests/ --cov=pydriller/ --cov-report=xml
- name: Build app
run: |
pip install wheel
python setup.py bdist_wheel
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
Loading

0 comments on commit e0b1ae1

Please sign in to comment.