curation workflow automation and coordination
- find RRIDs in articles
- look them up in the SciCrunch resolver
- create Hypothesis annotations that anchor to the RRIDs and display lookup results
- Create a Hypothesis account which will post the annotations.
- Generate an api token at https://hypothes.is/profile/developer (must be logged in to see page).
- Create a group to store the annotations at https://hypothes.is/groups/new (must be logged in to see page).
- See Setup on amazon
Visit https://HOST:PORT/bookmarklet and follow the instructions.
Visit an article that contains RRIDs, click the bookmarklet
The found RRIDs are logged to the JavaScript console
The found RRIDs are logged to timestamped files, along with the text and html of the article that was scanned for RRIDs
As root.
layman -a tgbugs-overlay
emerge scibot
rc-config add scibot-bookmarklet default
vim /etc/conf.d/scibot-bookmarklet # set username, group, api key, etc.
/etc/init.d/scibot-bookmarklet startSet export PATH=~/.local/bin:${PATH} in ~/.bashrc
sudo apt-get install build-essential python3-dev libxml2-dev libxslt1-devsudo pip3 install --user pip pipenvgit clone https://github.com/SciCrunch/scibot.gitcd scibot && pipenv installpipenv shellto get an environment with acess to all the required libraries.- Inside the pipenv shell (after following steps 6-10 below) you should
be able to run commands like
python scibot/export.py.
- ssh in to the host that will serve the script
sudo yum install gcc libxml2 libxml2-devel libxslt libxslt-devel python36 python36-devel python36-pipsudo alternatives --set python /usr/bin/python3.6sudo pip install pipenvgit clone https://github.com/SciCrunch/scibot.gitcd scibot && python3.6 setup.py wheel && pipenv install dist/*.whlexport SCIBOT_USERNAME=someusernameexport SCIBOT_GROUP=somegroupnameunset HISTFILEexport SCIBOT_API_TOKEN=sometokenexport SCIBOT_SYNC=somerandomnumber(e.g. runhead -c 100 /dev/urandom | tr -dc 'a-zA-Z0-9'every time)- create a screen session
- in the screen session run
pipenv run scibot-serveryou should create a link to the log files folder in ~/scibot/ - get letsencrypt certs using certbot, follow directions here (prefer standalone)
- alternately if using a cert from another registrar you may need to bundle your certs
cat my-cert.crt existing-bundle.crt > scicrunch.io.crt(see https://gist.github.com/bradmontgomery/6487319 for details) - before or after starting gunicorn you need to run
sudo yum install nginx && sudo cp ~/scibot/nginx.conf /etc/nginx/nginx.conf && sudo service start nginx - run
pipenv run scibot-syncin another screen (if run in a terminal with a different environment you need to run step 10 again first)
To set up scibot for development (for example if you want to run manual releases)
0. Install python3 and pip for your os (e.g. on macos use brew)
- From your git folder run
git clone https://github.com/tgbugs/scibot.git pushd scibotpip3 install --user -e .will install requirements and register the scibot folder under version control with python as the scibot module.popd- scibot currently makes use of my version of some of the core hypothes.is code which is not available as a package, to install it run the following
git clone https://github.com/tgbugs/h.git
pushd h
git checkout flask-new-3
popd
echo "export PYTHONPATH=$(pwd)/h:${PYTHONPATH}" >> ~/.bashrc
# may need to be ~/.bash_profile depending on your system
source ~/.bashrc