Thanks for thinking of a way to help improve this library! Remember that contributions come in all shapes and sizes beyond writing bug fixes: Contributing to documentation, opening new issues for bugs, asking for clarification on things you find unclear, and requesting new features, are all super valuable contributions.
All development for this library happens on Github at ipycytoscape.
Seeing your changes¶
If you are working in a Jupyter Notebook, then in order to see your code changes you will need to either:
Restart the Kernel every time you make a change to the code.
Or: Make the function reload from the source file every time you run it by using autoreload.
%load_ext autoreload %autoreload 2 from ipycytoscape import ....
Working with Git¶
You can install pre-commit hooks like so:
pip install pre-commit pre-commit install
This will then run automated checks whenever you
git commit. If you don’t want to do this then that’s
ok as the pre-commit.ci bot will automatically push fixes to your pull requests.
Following changes to the source files, you can view recent adjustments by building the documentation.
Make sure you have installed the requirements for building the documentation:
cd ipycytoscape pip install -e.[docs]
Run the following commands:
cd docs make html
If you open the
build/html/index.html file in your browser you should now be able to see the rendered documentation.
Autobuild the documentation¶
Alternatively, you can use sphinx-autobuild to continuously watch the documentation for changes and rebuild it for you.
Sphinx-autobuild will be installed automatically by the above
pip command, and we’ve added it to the
Makefile. All you need to do is:
cd docs make watch
In a few seconds your web browser should open up the documentation. Now whenever you save a source
the documentation will automatically regenerate and the webpage will refresh for you! However, if you are writing a notebook
that is included in the documentation via
nblink then you will need to manually rebuild to capture the changes to that file.