2.5 KiB
Very rudimentary instructions to get you going on BBT coding
SUPER IMPORTANT, READ THIS IF ANYTHING
Running the tests will clear out the Zotero profile used for running the tests without asking you any questions.
In order to make sure that this isn't my actual research data, I have set up the tests to do a couple of things, and I've done some things manually
Manually:
- Before first start of Zotero, I have created empty files (not directories, this is important), called
~/Zoteroand~/zotero. This will prevent Zotero from putting any data there - I have set up Zotero to always start with
-datadir profileso that the reference data sits within the actual Zotero profile, not in~/Zotero
Automated:
- The tests will create a Zotero profile called
BBTZ5TEST. This profile gets clobbered everytime you start the tests. DO NOT PUT IMPORTANT DATA HERE. - The test runner starts Zoteru using
-datadir profile -P BBTZ5TESTwhich means I force it to use that profile, and it should leave your production profile alone
If you try to start up Zotero for your regular work and it's empty or you see test data, try running it with -P and the profile picker will pop up. Select your actual profile and tick the checkbox that says start up with this profile by default.
This has kept my data safe for the past few years but I can make no guarantees. Safest is to run the tests on a system or user account entirely separate from your own, but I don't.
Setting up for development/test
Zotero
If you're on Linux, install the latest Zotero release using the either manually or using https://github.com/retorquere/zotero-deb so Zotero will end up in
/usr/lib/zotero/. If you're on MacOS, just install the latest Zotero 5. If you're on Windows, please let me know how you got
everything to work and I'll happily document it here, but I can't help you.
Getting the repo
- Run
git clone https://github.com/retorquere/zotero-better-bibtex.gitorgit clone git@github.com:<your username>/zotero-better-bibtex.gitif you have forked the repo so you can submit pull requests - Run
git submodule update --init --recursive
Python for the test chain
- Install python 3.6 or later
- Run
pip3 install -r requirements
Node for the build chain
- Install node 10 or later however appropriate for your platform
- Update npm to the latest npm by running
npm install npm@latest -g - Run
npm install - Run
npm run build
This should leave you with two XPI files in the xpi directory
Running the tests
- run
npm test