From 7da0a7f35b94e57af1e240298c5f307e15f54043 Mon Sep 17 00:00:00 2001 From: Noah Pendleton <2538614+noahp@users.noreply.github.com> Date: Wed, 18 Oct 2023 13:19:55 -0400 Subject: [PATCH] Convert rst to markdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ```bash ❯ pandoc README.rst -o README.md ❯ npx prettier --write --prose-wrap=always $(git diff HEAD --name-only | rg '\.mdx?') ``` --- README.md | 116 +++++++++++++++++++++++++++++++++++++++++++++ README.rst | 135 ----------------------------------------------------- setup.cfg | 2 +- setup.py | 2 +- 4 files changed, 118 insertions(+), 137 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/README.md b/README.md new file mode 100644 index 0000000..5183861 --- /dev/null +++ b/README.md @@ -0,0 +1,116 @@ +[![GitHub Link](https://img.shields.io/badge/GitHub-HBehrens/puncover-8da0cb?style=flat-square&logo=github)](https://github.com/HBehrens/puncover) + +[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/HBehrens/puncover/ci.yml?style=flat-square&branch=master)](https://github.com/HBehrens/puncover/actions?query=branch%3Amaster+) + +[![Codecov branch](https://img.shields.io/codecov/c/github/HBehrens/puncover/master?style=flat-square)](https://codecov.io/gh/HBehrens/puncover) + +[![PyPI](https://img.shields.io/pypi/v/puncover?style=flat-square)](https://pypi.org/project/puncover) + +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/puncover?style=flat-square)](https://pypi.org/project/puncover) + +[![License - MIT](https://img.shields.io/github/license/HBehrens/puncover?color=blue&style=flat-square)](https://github.com/HBehrens/puncover) + +# puncover + +![image](https://raw.githubusercontent.com/HBehrens/puncover/master/images/overview.png) + +Analyzes C/C++ binaries for code size, static variables and stack usages. It +creates a report with disassembler and call-stack analysis per directory, file, +or function. + +# Installation and Usage + +Install with pip: + +```bash +pip install puncover +``` + +Run it by passing the binary to analyze: + +```bash +puncover --elf_file project.elf +... +* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) +``` + +Open the link in your browser to view the analysis. + +# Running Tests Locally + +To run the tests locally, you need to install the development dependencies: + +1. install pyenv: + + ```bash + curl https://pyenv.run | bash + ``` + +2. install all the python environments, using this bashism (this can take a few + minutes): + + ```bash + for _py in $(<.python-version ); do pyenv install ${_py}; done + ``` + +3. install the development dependencies: + + ```bash + pip install -r requirements-dev.txt + ``` + +Then you can run the tests with: + +```bash +tox +``` + +# Publishing Release + +1. Update the version in `puncover/__version__.py`. + +2. Commit the version update: + + ```bash + git add . && git commit -m "Bump version to x.y.z" + ``` + +3. Create an annotated tag: + + ```bash + git tag -a {-m=,}x.y.z + ``` + +4. Push the commit and tag: + + ```bash + git push && git push --tags + ``` + +5. Either wait for the GitHub Action to complete and download the release + artifact for uploading: OR + Build the package locally: `python setup.py sdist bdist_wheel` + +6. Upload the package to PyPI: + + ```bash + twine upload dist/* + ``` + +7. Create GitHub releases: + + - `gh release create --generate-notes x.y.z` + - attach the artifacts to the release too: `gh release upload x.y.z dist/*` + +## Release Script + +See `release.sh` for a script that automates the above steps. This example will +work with the PyPi tokens (now required): + +```bash +PUNCOVER_VERSION=0.3.5 TWINE_PASSWORD="" TWINE_USERNAME=__token__ ./release.sh +``` + +# Contributing + +Contributions are welcome! Please open an issue or pull request on GitHub. diff --git a/README.rst b/README.rst deleted file mode 100644 index 9f44eee..0000000 --- a/README.rst +++ /dev/null @@ -1,135 +0,0 @@ - -.. image:: https://img.shields.io/badge/GitHub-HBehrens/puncover-8da0cb?style=flat-square&logo=github - :alt: GitHub Link - :target: https://github.com/HBehrens/puncover - -.. image:: https://img.shields.io/github/actions/workflow/status/HBehrens/puncover/ci.yml?style=flat-square&branch=master - :alt: GitHub Workflow Status (branch) - :target: https://github.com/HBehrens/puncover/actions?query=branch%3Amaster+ - -.. image:: https://img.shields.io/codecov/c/github/HBehrens/puncover/master?style=flat-square - :alt: Codecov branch - :target: https://codecov.io/gh/HBehrens/puncover - -.. image:: https://img.shields.io/pypi/v/puncover?style=flat-square - :alt: PyPI - :target: https://pypi.org/project/puncover - -.. image:: https://img.shields.io/pypi/pyversions/puncover?style=flat-square - :alt: PyPI - Python Version - :target: https://pypi.org/project/puncover - -.. image:: https://img.shields.io/github/license/HBehrens/puncover?color=blue&style=flat-square - :alt: License - MIT - :target: https://github.com/HBehrens/puncover - -puncover -======== - -.. image:: https://raw.githubusercontent.com/HBehrens/puncover/master/images/overview.png - -Analyzes C/C++ binaries for code size, static variables and stack usages. It -creates a report with disassembler and call-stack analysis per directory, file, -or function. - -Installation and Usage -====================== - -Install with pip: - -.. code-block:: bash - - pip install puncover - -Run it by passing the binary to analyze: - -.. code-block:: bash - - puncover --elf_file project.elf - ... - * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit) - -Open the link in your browser to view the analysis. - -Running Tests Locally -===================== - -To run the tests locally, you need to install the development dependencies: - -1. install pyenv: https://github.com/pyenv/pyenv - - .. code-block:: bash - - curl https://pyenv.run | bash - -2. install all the python environments, using this bashism (this can take a few - minutes): - - .. code-block:: bash - - for _py in $(<.python-version ); do pyenv install ${_py}; done - -3. install the development dependencies: - - .. code-block:: bash - - pip install -r requirements-dev.txt - - -Then you can run the tests with: - -.. code-block:: bash - - tox - -Publishing Release -================== - -1. Update the version in ``puncover/__version__.py``. -2. Commit the version update: - - .. code-block:: bash - - git add . && git commit -m "Bump version to x.y.z" - - -3. Create an annotated tag: - - .. code-block:: bash - - git tag -a {-m=,}x.y.z - -4. Push the commit and tag: - - .. code-block:: bash - - git push && git push --tags - -5. Either wait for the GitHub Action to complete and download the release - artifact for uploading: https://github.com/HBehrens/puncover/actions OR Build - the package locally: ``python setup.py sdist bdist_wheel`` -6. Upload the package to PyPI: - - .. code-block:: bash - - twine upload dist/* - -7. Create GitHub releases: - - - ``gh release create --generate-notes x.y.z`` - - attach the artifacts to the release too: ``gh release upload x.y.z dist/*`` - -Release Script --------------- - -See ``release.sh`` for a script that automates the above steps. This example -will work with the PyPi tokens (now required): - -.. code-block:: bash - - PUNCOVER_VERSION=0.3.5 TWINE_PASSWORD="" TWINE_USERNAME=__token__ ./release.sh - -Contributing -============ - -Contributions are welcome! Please open an issue or pull request on GitHub. diff --git a/setup.cfg b/setup.cfg index 11e9ec4..224a779 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,2 @@ [metadata] -description-file = README.rst \ No newline at end of file +description-file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py index 307573f..3320f0b 100755 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ def run(self): name="puncover", version=__version__, description="Analyses C/C++ build output for code size, static variables, and stack usage.", - long_description=open("README.rst").read(), + long_description=open("README.md").read(), long_description_content_type="text/x-rst", url="https://github.com/hbehrens/puncover", download_url="https://github.com/hbehrens/puncover/tarball/%s" % __version__,