- Notifications
You must be signed in to change notification settings - Fork12
curation workflow automation and coordination
License
SciCrunch/scibot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 athttps://hypothes.is/profile/developer (must be logged in to see page).
- Create a group to store the annotations athttps://hypothes.is/groups/new (must be logged in to see page).
- SeeSetup on amazon
Visithttps://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-overlayemerge scibotrc-config add scibot-bookmarklet defaultvim /etc/conf.d/scibot-bookmarklet# set username, group, api key, etc./etc/init.d/scibot-bookmarklet start
Setexport PATH=~/.local/bin:${PATH}
in~/.bashrc
sudo apt-get install build-essential python3-dev libxml2-dev libxslt1-dev
pip3 install --user pip pipenv
git clone https://github.com/SciCrunch/scibot.git
cd scibot && pipenv install --skip-lock
pipenv shell
to get an environment with acess to all the required libraries.- Inside the pipenv shell (after following steps 6-10 below) you shouldbe able to run commands like
python scibot/export.py
.
Building the rpm
pushd resources/rpmbuildrpmbuild --nodeps --define "_topdir `pwd`" -ba SPECS/scibot.specpopd
Once this is done scp the rpm to the host.Also scp the ssl certs over, or use letsencrypt to obtain a cert.If you are using using a cert from another registrar you may need tobundle your certscat my-cert.crt existing-bundle.crt > scicrunch.io.crt
(seehttps://gist.github.com/bradmontgomery/6487319 for details)Seenginx.conffor details on where to put the certs after scping them over.
Install steps run as root or via sudo.
amazon-linux-extras install nginx1.12yum install scibot-9999-0.noarch.rpm# update with yum reinstallpip3 install pipenv wheelvim /etc/systemd/system/scibot-bookmarklet.service.d/env.conf# set api keys etc
Install scibot codebase as the scibot user
git clone https://github.com/SciCrunch/scibot.gitpushd scibotpipenv install --skip-lock
Hopefully this step will become simpler once we start pushing releases.pipenv install scibot
or alternately it may also be possible to packageeverything we need in the rpm and only install that. With none of the othersteps needed at all.
Start services as root
systemctl start nginx scibot-bookmarklet-sync scibot-bookmarklet
On the scibot host
sudo su scibot -pushd scibotecho"$(date -Is)$(git rev-parse HEAD)">>~/previous-scibot-hashesgit pullmv Pipfile.lock"Pipefile.lock.$(date -Is)"~/.local/bin/pipenv install --skip-lock
Restart as root
systemctl restart scibot-bookmarklet-sync scibot-bookmarklet
Install steps0. ssh in to the host that will serve the script
sudo yum install gcc libxml2 libxml2-devel libxslt libxslt-devel python36 python36-devel python36-pip
sudo alternatives --set python /usr/bin/python3.6
sudo pip install pipenv
git clone https://github.com/SciCrunch/scibot.git
cd scibot && python3.6 setup.py wheel && pipenv install dist/*.whl
export SCIBOT_USERNAME=someusername
export SCIBOT_GROUP=somegroupname
unset HISTFILE
export SCIBOT_API_TOKEN=sometoken
export 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-server
you should create a link to the log files folder in ~/scibot/ - get letsencrypt certs using certbot, follow directionshere (prefer standalone)
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 usebrew
)
- From your git folder run
git clone https://github.com/tgbugs/scibot.git
pushd scibot
pip3 install --user -e .
will install requirements and register thescibot folder that is under version control with python as the scibot module.popd
You should changelol
to something less guessable even if it is onlyrunning on localhost.
Run the following blocks in two separate terminals and connect tohttps://localhost:4443/bookmarklet
. If you tryhttp
you will geta connection error.
You will need to generate the self signed certs using openssl asdescribed in the comments inbookmarklet.py::main().Alternately comment out the ssl wrapping of the socket and usehttp
.
SCIBOT_SYNC=lol python -m scibot.sync
SCIBOT_USERNAME=scibot \SCIBOT_GROUP=dev-group \SCIBOT_GROUP2=dev-group \SCIBOT_GROUP_STAGING=__world__ \SCIBOT_API_TOKEN=hypothesis-api-key \SCIBOT_SYNC=lol \python -m scibot.bookmarklet
Make sure you have >=python3.6 and pip installed. Clone the repo andrunpython setup.py develop --user
.
SciBot adheres to the Contributor Covenant:https://www.contributor-covenant.org/
About
curation workflow automation and coordination