You can contribute to the development of the AB by reporting bugs. Please raise an issue in the main repository and describe the buggy behaviour. Use a short and descriptive title for the issue. Ideally describe what you expected to happen vs. what actually happend. If there is a visual component to the bug, please also add a screenshot (just drag-and-drop into your issue text). You can also add the output of the debug window or console if there is an error message related to the bug.
If you have general proposals or improvement ideas for the AB, you can also open an issue in the main repository.
If you want to propose changes to the code or the documentation, or if you have created a feature that you want to add to the AB, please open a pull request. We use the fork and pull model for external contributions. Fork the AB repo, apply your changes in your forked repository and open pull requests from there. Please also add a short description of what your PR accomplishes.
Whenever you open a pull requests, there are a few automated tests that will be run. If the travis or appveyor tests fail, it is likely that there is an error somewhere in your PR. Check the logs of those CI services to see what failed.
If you want to contribute code, we suggest the following setup:
- Set up the conda channels as explained in the readme
- Create a new conda environment, where only the dependencies of the AB are installed:
conda create -n dev_ab
conda activate dev_ab
conda install --only-deps activity-browser
cd
into your forked repository- start the AB with this command:
python run-activity-browser.py
If you want to check whether your changes break anything essential, you can run the automated tests. This requires some additional packages.
conda activate dev_ab
conda install "pytest<3.5" pytest-mock pytest-qt
You can then run the tests inside the repo like this: python -m pytest
. An AB window will open and perform some automated actions. If you interfere, test will most likely fail.
In an ideal case, you can write your own tests for new features that you add. However writing tests for PyQt applications is non-trivial. Check out the tests that are already present in the tests
folder or look at the pytest-qt documentation for inspiration and examples.