Skip to main content

No project description provided

Project description

evedesign_server

PyPI - Version PyPI - Python Version

Scope

evedesign_server is a lightweight pipeline execution runner and REST API built on top of the evedesign package. It allows to execute design pipelines from a single specification file either locally or through a REST API with additional functions for job status and result retrieval.

Note: job execution from the job queue must be implemented by a custom piece of glue code that retrieves jobs from the queue and submits it to the respective execution environment.

Setup

Python package installation

pip install evedesign_server[api,pipeline]

This installs the full version of the package with all functionality.

  • The api option is required to host the REST API
  • The pipeline option is required to execute design pipelines

You can leave away either option if the functionality is not needed. Installing without options gives a lightweight version of the package for data validation purpose only.

Configuration for API and pipeline runner

Settings are managed with Pydantic Settings in config.py. The following settings need to be defined with environment variables for the REST API and tracking job results during execution (not needed for local execution without job status tracking):

# connection string of PostgreSQL database for tracking job metadata and job queue
DESIGNSERVER_DB_CONNECTION_STRING=postgresql://...

# arbitrary unique name to identify the current worker
DESIGNSERVER_WORKER_NAME=

# S3 bucket for storing input specification and result files
DESIGNSERVER_AWS_ACCESS_KEY_ID=
DESIGNSERVER_AWS_SECRET_ACCESS_KEY=
DESIGNSERVER_AWS_REGION_NAME=
DESIGNSERVER_AWS_S3_BUCKET_NAME=

# supabase URL/public key for user authentication
DESIGNSERVER_SUPABASE_URL=
DESIGNSERVER_SUPABASE_ANON_KEY=

Database setup

Run the following command once to prepare all required database tables (requires DESIGNSERVER_DB_CONNECTION_STRINGto be set, cf. above):

from designserver_api.db.engine import create_all
create_all()

Model files

Model files need to be downloaded once before running any design jobs. Execute the setup command with the Docker container or python -m evedesign_server.backends.generic setup. Model files will be stored to MODEL_PARAM_ROOT (cf. config.py, /models by default, overwrite the environment variable to choose a different directory or bind it to a directory when executing through Docker).

Job execution

Input specification

Depending on job type, instantiate one of the following Pydantic schemas, serialize it to JSON with model_dump() and store it as a file; cf. schemas.py:

  • PipelineSpec
  • SingleMutationScanSpec
  • ProteinToDnaSpec

Running design jobs

Jobs can be executed from the command line either by

  • building the Docker image and running it
  • running python -m evedesign_server.backends.generic

Both receive the same arguments as detailed in the next section.

Execution by job ID

This mode will fetch the input specification JSON file from the S3 bucket (specs/<job_id>) and store the results there as well (results/<job_id). If the database connection string is specified, the job status will be tracked in the database.

run <job_id>

Execution from local file

This mode will execute a local specification file (JSON format) and also store the results locally. If job_id and the database connection string are specified, the job status will be tracked in the database.

run <input_spec_path> <result_file_path> [<job_id>]

License

evedesign_server is released under the MIT license.

Contact

For general questions or inquiries about evedesign please reach out to hello@evedesign.bio.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evedesign_server-0.0.1.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evedesign_server-0.0.1-py3-none-any.whl (41.4 kB view details)

Uploaded Python 3

File details

Details for the file evedesign_server-0.0.1.tar.gz.

File metadata

  • Download URL: evedesign_server-0.0.1.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for evedesign_server-0.0.1.tar.gz
Algorithm Hash digest
SHA256 96552f943af221bceb1ff97805e5015b90f1d7093f1bb2ef798b3cc8c2c680b7
MD5 d1d011a761fff6daf3291b88954b1d27
BLAKE2b-256 1f800fc255122e7afd15e90aa9a0b4e900dc1cb8605fbec81284a9eeb0ab2217

See more details on using hashes here.

File details

Details for the file evedesign_server-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for evedesign_server-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4e7626452d89fc8d2eb9f2ea38ce5c6ccdf6b04a9b4676223221638edddf559
MD5 0e70028f00108a7dead78dc6f5934ac3
BLAKE2b-256 38daf81ec485aceb1ae45c9e56ac77e26915886f887a2b26dddd04588c45a78b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page