Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

curation workflow automation and coordination

License

NotificationsYou must be signed in to change notification settings

SciCrunch/scibot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI version

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

Getting Started

Capturing the bookmarklet

Visithttps://HOST:PORT/bookmarklet and follow the instructions.

Using the bookmarklet

Visit an article that contains RRIDs, click the bookmarklet

Checking results in the browser

The found RRIDs are logged to the JavaScript console

Checking results on the server

The found RRIDs are logged to timestamped files, along with the text and html of the article that was scanned for RRIDs

Setup on Gentoo

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

Setup on ubuntu 18.04

Setexport PATH=~/.local/bin:${PATH} in~/.bashrc

  1. sudo apt-get install build-essential python3-dev libxml2-dev libxslt1-dev
  2. pip3 install --user pip pipenv
  3. git clone https://github.com/SciCrunch/scibot.git
  4. cd scibot && pipenv install --skip-lock
  5. pipenv shell to get an environment with acess to all the required libraries.
  6. Inside the pipenv shell (after following steps 6-10 below) you shouldbe able to run commands likepython scibot/export.py.

Setup on amazon

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

Updating

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

manual setup

Install steps0. ssh in to the host that will serve the script

  1. sudo yum install gcc libxml2 libxml2-devel libxslt libxslt-devel python36 python36-devel python36-pip
  2. sudo alternatives --set python /usr/bin/python3.6
  3. sudo pip install pipenv
  4. git clone https://github.com/SciCrunch/scibot.git
  5. cd scibot && python3.6 setup.py wheel && pipenv install dist/*.whl
  6. export SCIBOT_USERNAME=someusername
  7. export SCIBOT_GROUP=somegroupname
  8. unset HISTFILE
  9. export SCIBOT_API_TOKEN=sometoken
  10. export SCIBOT_SYNC=somerandomnumber (e.g. runhead -c 100 /dev/urandom | tr -dc 'a-zA-Z0-9' every time)
  11. create a screen session
  12. in the screen session runpipenv run scibot-server you should create a link to the log files folder in ~/scibot/
  13. get letsencrypt certs using certbot, follow directionshere (prefer standalone)

Development setup

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)

  1. From your git folder rungit clone https://github.com/tgbugs/scibot.git
  2. pushd scibot
  3. pip3 install --user -e . will install requirements and register thescibot folder that is under version control with python as the scibot module.
  4. popd

Dev server

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

If all else fails

Make sure you have >=python3.6 and pip installed. Clone the repo andrunpython setup.py develop --user.

CoC

SciBot adheres to the Contributor Covenant:https://www.contributor-covenant.org/

About

curation workflow automation and coordination

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp