Giter VIP home page Giter VIP logo

adscompstat's Introduction

ADSAbs 2.0

This is the Flask application for the new ADS website.

After making sure that you have python development files (package python-dev on debian-based systems) installed, the simple installation is:

$ virtualenv some-python
$ source some-python/bin/activate
$ pip install -U pip
$ pip install -U distribute
$ CFLAGS= pip install -r requirements.txt

You will need a running mongodb instance. Assuming, you are just testing things, you can do:

$ cat <<EOF> ./mongo_auth.js
use admin
db.addUser('foo','bar')
db.auth('foo','bar')
use adsabs
db.addUser('adsabs','adsabs')
use adsdata
db.addUser('adsdata','adsdata')
use adsgut
db.addUser('adsgut','adsgut')
EOF

$ mongo < ./mongo_auth.js

Then, edit config/local_config.py and add:

class LocalConfig(object):
    MONGOALCHEMY_USER = 'adsabs'
    MONGOALCHEMY_PASSWORD = 'adsabs'
    ADSDATA_MONGO_USER = 'adsdata'
    ADSDATA_MONGO_PASSWORD = 'adsdata'
    MONGODB_SETTINGS= {'HOST': 'mongodb://adsgut:adsgut@localhost/adsgut', 'DB': 'adsgut'}
    THUMBNAIL_MONGO_PASSWORD = None

For more details, see http://labs.adsabs.harvard.edu/trac/ads-invenio/wiki/BeerInstallation or look into the Jenkins task, where we test the setup: http://adswhy:9090/view/BEER/job/BEER-05-live-service/configure

Jenkins

You can have Jenkins automatically test your repository/branch:

  1. got to adswhy:9090 (login)
  2. click on 'create a new job'
  3. select 'copy from' = BEER-02-adsabs
  4. change some values:
    • the git url (and optionally the name of the branch you want to test)
    • port of a mongo db (MongoDB is created for each test, so you just want to avoid using a port that some other tests use)
    • email (to notify you of build problems)

adscompstat's People

Contributors

seasidesparrow avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

seasidesparrow

adscompstat's Issues

completeness summary task may fail if no bibcode/bibstem is available

If bibstem is of NoneType, then the check for bibstem length in tasks.py L355 will throw an exception as apparently the record can pass checks despite not having a bibstem:

{"asctime": "2023-12-11T19:45:19.700Z", "name": "completeness-statistics-pipeline", "processName": "ForkPoolWorker-4", "filename": "__init__.py", "funcName": "on_failure", "levelname": "ERROR", "lineno": 511, "module": "__init__", "threadName": "MainThread", "message": "Task=508102f1-97e0-468f-840f-23ad7e88c484 failed.\nargs=[None]\nkwargs={}\ntrace=Traceback (most recent call last):\n  File \"/usr/local/lib/python3.8/dist-packages/celery/app/trace.py\", line 385, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File \"/usr/local/lib/python3.8/dist-packages/celery/app/trace.py\", line 650, in __protected_call__\n    return self.run(*args, **kwargs)\n  File \"/app/adscompstat/tasks.py\", line 355, in task_completeness_per_bibstem\n    if len(bibstem) < 5:\nTypeError: object of type 'NoneType' has no len()\n", "timestamp": "2023-12-11T19:45:19.700Z", "hostname": "f0c0fc527d23"}

Master table cleanup of deleted bibstems

Bibstems can change or be deleted in the journals database, resulting in orphaned records in the master table. In order to address this, several things need to happen:

  • search for any bibstems in compstat.master with no corresponding entry in the issn_identifier table.
  • select the filename field of all matching records from the master table, and add these to a list of files to be retried
  • delete these records from compstat.master
  • rerun the records above just as if they were mismatched/unmatched records being retried.

Infrastructure already exists to rerun the records; we need a task that can do the search for unmatched bibstems, get the filenames in each record, add the filenames to a list, and delete the result set.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.