Contributions are welcome, just make sure that before you open a pull request:
- The test suite passes
- You add a description of your changes to the changelog
If your pull request includes some pytest
setup/unit testing you'll be my new favorite person.
git clone https://github.com/michelcrypt4d4mus/pdfalyzer.git
cd pdfalyzer
After that there's a forking path depending on whether or not you use poetry (which is what we use) to manage your python lifestyle.
Note that the minimum versions for each package were chosen because that's what worked on my machine and not because that version had some critical bug fix or feature so it's entirely possible that using earlier versions than are specified in pyproject.toml will work just fine. Feel free to experiment if there's some kind of version conflict for you.
These commands are the poetry
equivalent of the traditional virtualenv installation followed by source venv/bin/activate
but there's a lot of ways to run a python script in a virtualenv with poetry
so you do you if you prefer another approach.
poetry install
source $(poetry env info --path)/bin/activate
python -m venv .venv # Create a virtualenv in .venv
. .venv/bin/activate # Activate the virtualenv
pip install . # Install packages
Note that I'm not sure exactly how to get the pdfalyze
command installed when developing outside of a poetry
env, but creating a simple run_pdfalyzer.py
file with these contents would do the same thing:
from pdfalyzer import pdfalyzer
pdfalyzer()
Test coverage is relatively spartan but should throw failures if you really mess something up. See pytest's official docs for other instantiation options.
# Run tests (but not the slow ones):
pytest
# Run all tests (including the slow ones):
pytest -v --slow
# Run only the slow tests:
pytest -m slow --slow:
We love any and all PDF malware related YARA rules so send them our way.