Skip to content

sciety/sciety-labs

Repository files navigation

Sciety Labs (Experimental)

Sciety Labs is a place for early stage experiments related to discovery of preprints and the Sciety community. We will test out some ideas before adding them to Sciety.

Prerequisites

When using a Python virtual environment:

When using Docker:

Credentials

GCP credentials

A user with access to BigQuery in the elife-data-pipeline GCP project. Login via:

gcloud auth application-default login

OpenSearch

When configured, it will use OpenSearch instead of BigQuery to look up Semantic Scholar paper ids.

name description
OPENSEARCH_HOST Hostname to OpenSearch
OPENSEARCH_PORT Port to OpenSearch, e.g. 9200
OPENSEARCH_USERNAME_FILE_PATH File path to file containing the username
OPENSEARCH_PASSWORD_FILE_PATH File path to file containing the password
OPENSEARCH_INDEX_V2_NAME The index to use
OPENSEARCH_INDEX_V2_EMBEDDING_VECTOR_MAPPING_NAME Optional. When specified, it will use the OpenSearch embedding vector mapping to provide article recommendations for a single article (not yet used for lists). Otherwise it will continue to use Semantic Scholar.

Configuration

The following environment variables can be used to configure the site:

name description
SCIETY_LABS_COOKIEBOT_IDENTIFIER The cookiebot identifier. (Not included if blank)
SCIETY_LABS_GOOGLE_TAG_MANAGER_ID The Google Tag Manager (GTM) id. (Not included if blank)

Development using a Python Virtual Environment (venv)

Install Python via pyenv

pyenv as recommended as it makes it easier to install multiple Python versions side by side.

The Python version for this project is configured in .python-version.

First venv setup

This will create the virtual environment and install dependencies.

make dev-venv

Install or update dependencies (from requirements)

make dev-install

Run linting and unit tests

make dev-test

Watch unit tests

make dev-watch

Start server

make dev-start

Development using a Docker

Build

make build

Start server (using Docker)

make start

View Docker Compose logs

make logs

Stop server (using Docker)

make stop

About

Early stage experiments related to discovery of preprints and the Sciety community.

Resources

License

Stars

Watchers

Forks

Packages 4