exeplot 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. exeplot-0.4.0/.coveragerc +23 -0
  2. exeplot-0.4.0/.github/workflows/python-package.yml +109 -0
  3. exeplot-0.4.0/.gitignore +79 -0
  4. exeplot-0.4.0/.readthedocs.yml +13 -0
  5. exeplot-0.4.0/LICENSE +674 -0
  6. exeplot-0.4.0/PKG-INFO +756 -0
  7. exeplot-0.4.0/README.md +53 -0
  8. exeplot-0.4.0/_config.yml +1 -0
  9. exeplot-0.4.0/docs/coverage.svg +1 -0
  10. exeplot-0.4.0/docs/mkdocs.yml +42 -0
  11. exeplot-0.4.0/docs/pages/css/extra.css +26 -0
  12. exeplot-0.4.0/docs/pages/img/calc_orig_entropy.png +0 -0
  13. exeplot-0.4.0/docs/pages/img/calc_packed_byte.png +0 -0
  14. exeplot-0.4.0/docs/pages/img/calc_packed_nested_pie.png +0 -0
  15. exeplot-0.4.0/docs/pages/img/calc_packed_pie.png +0 -0
  16. exeplot-0.4.0/docs/pages/img/icon.png +0 -0
  17. exeplot-0.4.0/docs/pages/img/logo.png +0 -0
  18. exeplot-0.4.0/docs/pages/index.md +12 -0
  19. exeplot-0.4.0/docs/requirements.txt +6 -0
  20. exeplot-0.4.0/pyproject.toml +59 -0
  21. exeplot-0.4.0/pytest.ini +2 -0
  22. exeplot-0.4.0/requirements.txt +2 -0
  23. exeplot-0.4.0/setup.cfg +4 -0
  24. exeplot-0.4.0/src/exeplot/VERSION.txt +1 -0
  25. exeplot-0.4.0/src/exeplot/__conf__.py +109 -0
  26. exeplot-0.4.0/src/exeplot/__info__.py +19 -0
  27. exeplot-0.4.0/src/exeplot/__init__.py +5 -0
  28. exeplot-0.4.0/src/exeplot/__main__.py +44 -0
  29. exeplot-0.4.0/src/exeplot/plots/__common__.py +270 -0
  30. exeplot-0.4.0/src/exeplot/plots/__init__.py +19 -0
  31. exeplot-0.4.0/src/exeplot/plots/byte.py +99 -0
  32. exeplot-0.4.0/src/exeplot/plots/diff.py +141 -0
  33. exeplot-0.4.0/src/exeplot/plots/entropy.py +197 -0
  34. exeplot-0.4.0/src/exeplot/plots/graph.py +47 -0
  35. exeplot-0.4.0/src/exeplot/plots/nested_pie.py +37 -0
  36. exeplot-0.4.0/src/exeplot/plots/pie.py +37 -0
  37. exeplot-0.4.0/src/exeplot/utils.py +67 -0
  38. exeplot-0.4.0/src/exeplot.egg-info/PKG-INFO +756 -0
  39. exeplot-0.4.0/src/exeplot.egg-info/SOURCES.txt +47 -0
  40. exeplot-0.4.0/src/exeplot.egg-info/dependency_links.txt +1 -0
  41. exeplot-0.4.0/src/exeplot.egg-info/entry_points.txt +2 -0
  42. exeplot-0.4.0/src/exeplot.egg-info/requires.txt +8 -0
  43. exeplot-0.4.0/src/exeplot.egg-info/top_level.txt +1 -0
  44. exeplot-0.4.0/tests/__init__.py +0 -0
  45. exeplot-0.4.0/tests/hello.elf +0 -0
  46. exeplot-0.4.0/tests/hello.exe +0 -0
  47. exeplot-0.4.0/tests/hello.macho +0 -0
  48. exeplot-0.4.0/tests/test_others.py +35 -0
  49. exeplot-0.4.0/tests/test_plots.py +79 -0
@@ -0,0 +1,23 @@
1
+ [run]
2
+ source = exeplot
3
+ omit =
4
+ tests/*
5
+
6
+ [report]
7
+ exclude_lines =
8
+ pragma: no cover
9
+ if.*?__name__.*?==.*?.__main__.:
10
+ def main\(\)\:
11
+ except:
12
+ except ImportError:
13
+ except NameError:
14
+ except (AttributeError, TypeError):
15
+ raise NotImplementedError
16
+ def _setup(parser):
17
+ def configure():
18
+ def byte_differences\(bytes1, bytes2\):
19
+ # blocks skipped ; no testing required (done manually)
20
+ if kw.get\('interactive_mode', False\):
21
+ if self.type not in ["ELF", "MachO", "PE"]:
22
+ if j <= i or start2 is None:
23
+ if s != self.__size:
@@ -0,0 +1,109 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: build
5
+
6
+ env:
7
+ package: exeplot
8
+
9
+ on:
10
+ push:
11
+ branches: [ "main" ]
12
+ pull_request:
13
+ branches: [ "main" ]
14
+
15
+ jobs:
16
+ build:
17
+ runs-on: ${{ matrix.os }}
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ os: [ubuntu-latest]
22
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
23
+ steps:
24
+ - uses: actions/checkout@v3
25
+ - name: Set up Python ${{ matrix.python-version }}
26
+ uses: actions/setup-python@v4
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+ - name: Install ${{ env.package }}
30
+ run: |
31
+ python -m pip install --upgrade pip
32
+ python -m pip install flake8 pytest pytest-cov coverage
33
+ pip install -r requirements.txt
34
+ pip install .
35
+ - name: Lint with flake8
36
+ run: |
37
+ # stop the build if there are Python syntax errors or undefined names
38
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
39
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41
+ - name: Test ${{ env.package }} with pytest
42
+ run: |
43
+ pytest --cov=$package
44
+ coverage:
45
+ needs: build
46
+ runs-on: ubuntu-latest
47
+ env:
48
+ cov_badge_path: docs/coverage.svg
49
+ steps:
50
+ - uses: actions/checkout@v3
51
+ - name: Install ${{ env.package }}
52
+ run: |
53
+ python -m pip install --upgrade pip
54
+ python -m pip install pytest pytest-cov
55
+ pip install -r requirements.txt
56
+ pip install .
57
+ - name: Make coverage badge for ${{ env.package }}
58
+ run: |
59
+ pip install genbadge[coverage]
60
+ pytest --cov=$package --cov-report=xml
61
+ genbadge coverage -i coverage.xml -o $cov_badge_path
62
+ - name: Verify Changed files
63
+ uses: tj-actions/verify-changed-files@v12
64
+ id: changed_files
65
+ with:
66
+ files: ${{ env.cov_badge_path }}
67
+ - name: Commit files
68
+ if: steps.changed_files.outputs.files_changed == 'true'
69
+ run: |
70
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
71
+ git config --local user.name "github-actions[bot]"
72
+ git add $cov_badge_path
73
+ git commit -m "Updated coverage.svg"
74
+ - name: Push changes
75
+ if: steps.changed_files.outputs.files_changed == 'true'
76
+ uses: ad-m/github-push-action@master
77
+ with:
78
+ github_token: ${{ secrets.github_token }}
79
+ branch: ${{ github.ref }}
80
+ deploy:
81
+ runs-on: ubuntu-latest
82
+ needs: coverage
83
+ steps:
84
+ - uses: actions/checkout@v3
85
+ with:
86
+ fetch-depth: 0
87
+ - name: Check for version change
88
+ uses: dorny/paths-filter@v2
89
+ id: filter
90
+ with:
91
+ filters: |
92
+ version:
93
+ - '**/VERSION.txt'
94
+ - if: steps.filter.outputs.version == 'true'
95
+ name: Cleanup README
96
+ run: |
97
+ sed -ri 's/^(##*)\s*:.*:\s*/\1 /g' README.md
98
+ awk '{if (match($0,"## Supporters")) exit; print}' README.md > README
99
+ mv -f README README.md
100
+ - if: steps.filter.outputs.version == 'true'
101
+ name: Build ${{ env.package }} package
102
+ run: python3 -m pip install --upgrade build && python3 -m build
103
+ - if: steps.filter.outputs.version == 'true'
104
+ name: Upload ${{ env.package }} to PyPi
105
+ uses: pypa/gh-action-pypi-publish@release/v1
106
+ with:
107
+ password: ${{ secrets.PYPI_API_TOKEN }}
108
+ verbose: true
109
+ verify_metadata: false
@@ -0,0 +1,79 @@
1
+ # Temp files
2
+ *~
3
+ *.backup
4
+ .DS_Store
5
+
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[cod]
9
+
10
+ # C extensions
11
+ *.so
12
+
13
+ # Distribution / packaging
14
+ .Python
15
+ env/
16
+ build/
17
+ .build/
18
+ develop-eggs/
19
+ dist/
20
+ downloads/
21
+ eggs/
22
+ .eggs/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ reinstall.sh
27
+ test.sh
28
+ update.sh
29
+ version.py
30
+
31
+ var/
32
+ *.egg-info/
33
+ .installed.cfg
34
+ *.egg
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+ MANIFEST
42
+
43
+ # Installer logs
44
+ pip-log.txt
45
+ pip-delete-this-directory.txt
46
+
47
+ # Unit test / coverage reports
48
+ htmlcov/
49
+ coverage/
50
+ .tox/
51
+ .coverage
52
+ .coverage.*
53
+ .coveralls.*
54
+ .cache
55
+ nosetests.xml
56
+ coverage.xml
57
+ *,cover
58
+
59
+ # Translations
60
+ *.mo
61
+ *.pot
62
+
63
+ # Sphinx documentation
64
+ docs/_build/
65
+
66
+ # PyBuilder
67
+ target/
68
+
69
+ # Project artifacts
70
+ .idea
71
+ .vagrant
72
+ .test
73
+ .pytest_cache
74
+ tmp
75
+ TODO
76
+ script.py
77
+ tool.py
78
+ /*.png
79
+ /*.exe
@@ -0,0 +1,13 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: "ubuntu-24.04"
5
+ tools:
6
+ python: "3.13"
7
+
8
+ mkdocs:
9
+ configuration: docs/mkdocs.yml
10
+
11
+ python:
12
+ install:
13
+ - requirements: docs/requirements.txt