Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.11.0 #251

Merged
78 commits merged into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
d9c4cd3
remove sentence-transformers
nleroy917 Dec 11, 2023
304cbcc
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
nleroy917 Dec 11, 2023
80e9c25
bug fixing
nleroy917 Dec 11, 2023
b66a366
Added favorites endpoints #74
khoroshevskyi Dec 12, 2023
5363fe5
get rid of token passing everywhere
nleroy917 Dec 13, 2023
f9dbdd0
finish useSession cleanup
nleroy917 Dec 13, 2023
b605fc6
work on POP interface
nleroy917 Dec 13, 2023
4b03d32
more work on the POPs
nleroy917 Dec 13, 2023
aa15435
swap to fastembed
nleroy917 Dec 13, 2023
3b8ac74
work on favorites
nleroy917 Dec 13, 2023
59dcd1c
updated favorites to stars
khoroshevskyi Dec 13, 2023
fd82c09
Merge branch 'dev' into favorites_api
khoroshevskyi Dec 13, 2023
3b3d16b
Merge pull request #246 from pepkit/favorites_api
nleroy917 Dec 14, 2023
556803e
work on stars functionality
nleroy917 Dec 14, 2023
c56c5f5
workon stars
nleroy917 Dec 14, 2023
19870ea
updated pepdbagent method naming
khoroshevskyi Dec 14, 2023
3d1910e
workon search
nleroy917 Dec 14, 2023
f314e27
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
nleroy917 Dec 14, 2023
aac94b3
more tweaks
nleroy917 Dec 14, 2023
4a85642
search thru stars
nleroy917 Dec 14, 2023
277f07e
more updates :)
nleroy917 Dec 14, 2023
2ea9f30
yet more changes
nleroy917 Dec 14, 2023
12c6c28
Added get endpoint wht reg_paths list
khoroshevskyi Dec 17, 2023
c606652
about page
nleroy917 Dec 18, 2023
ca32a9b
Updated error message
khoroshevskyi Dec 18, 2023
e335bb2
work on POP interface - its almost done
nleroy917 Dec 19, 2023
0fca875
Merge remote-tracking branch 'refs/remotes/origin/reg_paths_list' int…
nleroy917 Dec 19, 2023
cb5b0ec
Merge pull request #247 from pepkit/reg_paths_list
nleroy917 Dec 19, 2023
a2432f6
landing button alignment (#229)
nleroy917 Dec 19, 2023
937a8ac
Merge pull request #249 from pepkit/reg_paths_list
nleroy917 Dec 19, 2023
fca82c9
search page updates
nleroy917 Dec 19, 2023
5d0de5c
bump version
nleroy917 Dec 19, 2023
2166a1e
remove yarn.lock
nleroy917 Dec 19, 2023
fe47851
ignore yarn.lock
nleroy917 Dec 19, 2023
92cdf36
change to lowercase
nleroy917 Dec 19, 2023
6395263
safegaurd against dangling pointers to deleted PEPs in a POP
nleroy917 Dec 19, 2023
8991220
update reqs
nleroy917 Dec 22, 2023
b8691be
release candidate
nleroy917 Dec 22, 2023
ccadbdb
Updated About page
khoroshevskyi Dec 24, 2023
28758c5
added backend forking
khoroshevskyi Jan 2, 2024
2667dfe
Merge branch 'master' into dev
khoroshevskyi Jan 2, 2024
e0da8ba
Fixed load_db script
khoroshevskyi Jan 2, 2024
8ad08ea
Added post, delete, patch, and get sample endpoints
khoroshevskyi Jan 8, 2024
cda04da
Merge pull request #254 from pepkit/backend_forking
khoroshevskyi Jan 9, 2024
4282a5f
using pr suggestions, fixed sample endpoints
khoroshevskyi Jan 9, 2024
e19d5a3
Merge pull request #258 from pepkit/256_sample_endpoints
khoroshevskyi Jan 9, 2024
f7bcc9f
updated requirements
khoroshevskyi Jan 10, 2024
2007342
update reqs
nleroy917 Jan 10, 2024
7d68bb7
padding to pop interface
nleroy917 Jan 10, 2024
4992080
more tweaks to the project page
nleroy917 Jan 10, 2024
08d86d7
Added views endpoints
khoroshevskyi Jan 10, 2024
d95dfe5
better ux for stars
nleroy917 Jan 10, 2024
7c93b3e
pop selector tab
nleroy917 Jan 10, 2024
6c6bc53
revert for now
nleroy917 Jan 11, 2024
e2a2679
disable projects > 5000
nleroy917 Jan 11, 2024
e2a958d
search things
nleroy917 Jan 11, 2024
709131f
fix searching bug
nleroy917 Jan 11, 2024
0b1e92f
workon add to pop
nleroy917 Jan 11, 2024
471fb7d
bump version
nleroy917 Jan 11, 2024
f6f72fa
move edit meta form save buttons to the end for consistency
nleroy917 Jan 11, 2024
558a58d
Merge branch 'dev' into views_endpoints
khoroshevskyi Jan 11, 2024
816a17a
Added views endpoints 2
khoroshevskyi Jan 11, 2024
5ec0f06
lint
khoroshevskyi Jan 12, 2024
a9911b9
updated forking
khoroshevskyi Jan 12, 2024
5d99b99
Fixed uploading projects issue
khoroshevskyi Jan 12, 2024
07b8583
Merge pull request #259 from pepkit/views_endpoints
nleroy917 Jan 12, 2024
d5c8816
conditionally render 'forked-from' box
nleroy917 Jan 12, 2024
976838b
Merge remote-tracking branch 'refs/remotes/origin/dev' into dev
nleroy917 Jan 12, 2024
97e6dee
add 'forked-from' to project card
nleroy917 Jan 12, 2024
9bd11cf
work towards converting a PEP to a POP
nleroy917 Jan 12, 2024
cd0bd70
POPs only toggle
nleroy917 Jan 12, 2024
0d89594
more workon things
nleroy917 Jan 12, 2024
0c454f7
add download button to schema selector. add description of the validator
nleroy917 Jan 13, 2024
3de97f7
bump cutoff for search
nleroy917 Jan 14, 2024
18e0254
remove UI from API deployment
nleroy917 Jan 16, 2024
6fe2860
remove unused imports
nleroy917 Jan 16, 2024
cd62ac7
update Dockerfile to no longer build UI
nleroy917 Jan 16, 2024
88ba230
update deployment
nsheff Jan 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ node_modules/
pephub/data
postgres/
.idea
qdrant_storage/
qdrant_storage/
local_cache/
83 changes: 83 additions & 0 deletions .github/workflows/deploy-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# This workflow will build and push a new container image to Amazon ECR,
# and then will deploy a new task definition to Amazon ECS, when a release is created
#
# To use this workflow, you will need to complete the following set-up steps:
#
# 1. Create an ECR repository to store your images.
# For example: `aws ecr create-repository --repository-name my-ecr-repo --region us-east-2`.
# Replace the value of `ECR_REPOSITORY` in the workflow below with your repository's name.
# Replace the value of `aws-region` in the workflow below with your repository's region.
#
# 2. Create an ECS task definition, an ECS cluster, and an ECS service.
# For example, follow the Getting Started guide on the ECS console:
# https://us-east-2.console.aws.amazon.com/ecs/home?region=us-east-2#/firstRun
# Replace the values for `service` and `cluster` in the workflow below with your service and cluster names.
#
# 3. Store your ECS task definition as a JSON file in your repository.
# The format should follow the output of `aws ecs register-task-definition --generate-cli-skeleton`.
# Replace the value of `task-definition` in the workflow below with your JSON file's name.
# Replace the value of `container-name` in the workflow below with the name of the container
# in the `containerDefinitions` section of the task definition.
#
# 4. Store an IAM user access key in GitHub Actions secrets named `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
# See the documentation for each action used below for the recommended IAM policies for this IAM user,
# and best practices on handling the access key credentials.

on:
push:
branches:
- master
workflow_dispatch:
inputs: null

name: Deploy pephub.databio.org API to AWS - primary

jobs:
deploy:
env:
server: primary
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Build, tag, and push image to Amazon ECR
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: pephub
IMAGE_TAG: ${{ github.sha }}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG deployment/pephub.databio.org/.
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"

- name: Fill in the new image ID in the Amazon ECS task definition
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: deployment/task_defs/primary.json
container-name: pephub-container
image: ${{ steps.build-image.outputs.image }}

- name: Deploy Amazon ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
service: pephub-service-primary
cluster: yeti
wait-for-service-stability: true
26 changes: 15 additions & 11 deletions .github/workflows/deploy-dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,26 @@ on:
- created
workflow_dispatch:
inputs: null

name: Deploy to Dockerhub on release

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push to DockerHub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: databio/pephub
tags: latest
tag_with_ref: true
- name: Build and Push to DockerHub
uses: docker/build-push-action@v5
with:
push: true
context: '{{defaultContext}}:mysubdir'
tags: databio/pephub:latest
45 changes: 0 additions & 45 deletions Dockerfile

This file was deleted.

2 changes: 2 additions & 0 deletions deployment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
.env
48 changes: 48 additions & 0 deletions deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# pephub.databio.org
This is the publically available instance of [PEPhub](https://github.com/pepkit/pephub) provided by the Sheffield lab. You can view the deployed instance at https://pephub.databio.org

## Development
### Build the container
```
docker build -t pephub.databio.org .
```


### Run

PEPhub requires many parameters to run. You can read more about those [here](https://github.com/pepkit/pephub/blob/master/docs/server-settings.md). These must be injected as environment variables. You can manually do this and inject one-by-one. There is an example script in this repo called [launch_docker.sh](launch_docker.sh).

```
launch_docker.sh
```

The basic steps are:

1. Initialize env vars

```
source /home/nsheff/code/pephub/environment/production.env
```

2. Run with docker:

```
docker run --rm -p 80:80 \
--env POSTGRES_HOST=$POSTGRES_HOST \
--env POSTGRES_DB=$POSTGRES_DB \
--env POSTGRES_USER=$POSTGRES_USER \
--env POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
--env QDRANT_HOST=$QDRANT_HOST \
--env QDRANT_PORT=$QDRANT_PORT \
--env QDRANT_ENABLED=$QDRANT_ENABLED \
--env QDRANT_API_KEY=$QDRANT_API_KEY \
--env HF_MODEL=$HF_MODEL \
--env GH_CLIENT_ID=$GH_CLIENT_ID \
--env GH_CLIENT_SECRET=$GH_CLIENT_SECRET \
--env REDIRECT_URI=$REDIRECT_URI \
--env SERVER_ENV=$SERVER_ENV \
--name pephub pephub
```

3. Visit http://localhost:80 to view the server.

22 changes: 22 additions & 0 deletions deployment/dockerhub/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -------------
# BUILD BACKEND
# -------------
FROM python:3.10-slim
LABEL authors="Nathan LeRoy, Nathan Sheffield"

RUN apt-get update
RUN apt-get install -y gcc
RUN apt-get install -y libpq-dev
RUN apt-get install -y --no-install-recommends git

EXPOSE 5432
EXPOSE 6333
EXPOSE 80

WORKDIR /app
COPY . /app

RUN python -m pip install --upgrade pip
RUN pip install -r requirements/requirements-all.txt --no-cache-dir

CMD ["uvicorn", "pephub.main:app", "--host", "0.0.0.0", "--port", "80"]
16 changes: 16 additions & 0 deletions deployment/launch_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

docker run -p 80:80 \
--env POSTGRES_HOST=$POSTGRES_HOST \
--env POSTGRES_DB=$POSTGRES_DB \
--env POSTGRES_USER=$POSTGRES_USER \
--env POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
--env QDRANT_HOST=$QDRANT_HOST \
--env QDRANT_PORT=$QDRANT_PORT \
--env QDRANT_ENABLED=$QDRANT_ENABLED \
--env QDRANT_API_KEY=$QDRANT_API_KEY \
--env HF_MODEL=$HF_MODEL \
--env GH_CLIENT_ID=$GH_CLIENT_ID \
--env GH_CLIENT_SECRET=$GH_CLIENT_SECRET \
--env BASE_URI=$BASE_URI \
databio.pephub.org
2 changes: 2 additions & 0 deletions deployment/pephub.databio.org/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM databio/pephub:latest
# pass - nothing else is needed
20 changes: 20 additions & 0 deletions deployment/schemas.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pipelines/ProseqPEP:
name: "PEPPRO"
docs: "http://peppro.databio.org"
schema: "http://schema.databio.org/pipelines/ProseqPEP.yaml"
pep/2.0.0:
name: "PEP v2.0.0"
docs: "http://pep.databio.org"
schema: "http://schema.databio.org/pep/2.0.0.yaml"
pipelines/pepatac:
name: "PEPATAC"
docs: "http://pepatac.databio.org"
schema: "http://schema.databio.org/pipelines/pepatac.yaml"
pipelines/bedmaker:
name: "bedmaker"
docs: "http://bedbase.org"
schema: "http://schema.databio.org/pipelines/bedmaker.yaml"
bulker/manifest:
name: "bulker"
docs: "http://bulker.io"
schema: "http://schema.databio.org/bulker/manifest.yaml"
Loading
Loading