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

Remove unused endpoints #29

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
869877c
fix tests, remove those not applicable to the GO version of biolink-api
sierra-moxon Aug 25, 2021
761afb4
update to python 3.7.4
sierra-moxon Aug 25, 2021
34fe85c
remove pytests as they don't apply to the GO version of this api
sierra-moxon Aug 25, 2021
fe30707
add dockerfile, update .travis
sierra-moxon Aug 25, 2021
c1ae1c1
update requirements test for travis
sierra-moxon Aug 25, 2021
0815de6
small fixes to README and travis testing
sierra-moxon Aug 25, 2021
81bdd65
revert ontobio
sierra-moxon Aug 25, 2021
93ccfec
install ontobio on its own
sierra-moxon Aug 25, 2021
87f42b3
pin Flask
sierra-moxon Aug 25, 2021
0576791
move to actions
sierra-moxon Aug 25, 2021
7f9a91b
move to actions
sierra-moxon Aug 25, 2021
3dc9ce0
move to actions
sierra-moxon Aug 25, 2021
af89343
tweak actions
sierra-moxon Aug 25, 2021
f8324dd
app starts, try tests
sierra-moxon Aug 25, 2021
3d76048
app starts, try tests
sierra-moxon Aug 25, 2021
7bdcd08
tweak actions
sierra-moxon Aug 25, 2021
b189336
try reusing pythonpath
sierra-moxon Aug 25, 2021
64a6cad
try reusing pythonpath
sierra-moxon Aug 25, 2021
2c009b1
try reusing pythonpath
sierra-moxon Aug 25, 2021
b5be238
formatting of tests
sierra-moxon Aug 25, 2021
24b11dd
formatting of tests
sierra-moxon Aug 25, 2021
e5d48fc
formatting of tests
sierra-moxon Aug 25, 2021
b7bec2f
formatting of tests
sierra-moxon Aug 25, 2021
09868da
formatting of tests
sierra-moxon Aug 25, 2021
f2004bc
got working from a docker container
sierra-moxon Aug 25, 2021
9a4e46c
format fixes
sierra-moxon Sep 1, 2021
909c082
fix Dockerfile to echo biolink-api dir structure
sierra-moxon Jan 19, 2022
dafd8ac
fixing up test branch for running on AWS
sierra-moxon Feb 17, 2022
f7708a7
change 5000 to 8888 for tests to run on AWs
sierra-moxon Feb 17, 2022
c3037c3
change venv commands a little to accommodate ubuntu on AWs
sierra-moxon Feb 24, 2022
f6dd788
fix itsdangerous to 2.1.1 after update
sierra-moxon Feb 24, 2022
89a2ed3
clean up PEP in route to debugging dependencies
sierra-moxon Mar 2, 2022
dbaf29f
remove stub code for unused endpoints
sierra-moxon Mar 2, 2022
ce4900d
send in the url parameter to use golr instead of monarch
sierra-moxon Mar 3, 2022
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
23 changes: 23 additions & 0 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run-tests
on: [push]
jobs:
run-pr-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-python@v2
name: setup python
with:
python-version: 3.7
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
export PYTHONPATH=.:$PYTHONPATH
python ./biolink/app.py &
sleep 15
cd tests && behave -f plain
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

307 changes: 0 additions & 307 deletions CONTRIBUTING.md

This file was deleted.

40 changes: 40 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
FROM python:3.7-slim

WORKDIR /biolink-api

VOLUME /config

RUN apt-get -y update && apt-get install -y git curl

COPY requirements.txt ./
COPY wsgi.py ./
COPY logging.conf ./

COPY biolink ./biolink
COPY biomodel ./biomodel
COPY biowikidata ./biowikidata
COPY causalmodels ./causalmodels
COPY conf ./conf
COPY scigraph ./scigraph
COPY tests ./tests
COPY .git ./.git

RUN mkdir /biolink-api/scripts
# COPY docker ./scripts

ENV PYTHONPATH "${PYTHONPATH}:/biolink-api"

ENV PATH="/biolink-api/scripts/:$PATH"

RUN pip install -r requirements.txt

ENTRYPOINT ["python"]
CMD ["biolink/app.py"]

EXPOSE 8888


# docker build -t name_of_image folder_containing_dockerfile (names image and stores it)
# docker run -d --name sierra_test -p 8888:8888 go_api (expose ports and name the container)
# docker rm sierra_test (removes image)
# docker port sierra_test (see the port mapping)
8 changes: 0 additions & 8 deletions README-dependencies.md

This file was deleted.

11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ The Gene Ontology API instance is accessible here:

https://api.geneontology.org/api/

Is is an implementation of both the [BioLink Model](https://github.com/biolink/biolink-model) and [BioLink Implementation](https://github.com/biolink/biolink-api) which rely on [Ontobio](https://github.com/biolink/ontobio)
It is an implementation of both the [BioLink Model](https://github.com/biolink/biolink-model)
and [BioLink Implementation](https://github.com/biolink/biolink-api) which rely on [Ontobio](https://github.com/biolink/ontobio)

## Running the server

Expand All @@ -14,16 +15,16 @@ After checking out this repo:
./start-server.sh
```

This uses gunicorn and starts a server on 8888 by default. pyvenv is
This uses gunicorn and starts a server on 5000 by default. pyvenv is
activated automatically.

Then look at:

http://localhost:8888/api/
http://localhost:5000/api/

For the swagger docs

To run in development mode:
To run locally in development mode:

```
pyvenv venv
Expand All @@ -33,5 +34,7 @@ export PYTHONPATH=.:$PYTHONPATH
python biolink/app.py
```

Production AWS environment details
[Production AWS Details](docs/prod.md).


1 change: 1 addition & 0 deletions biolink/api/bio/association_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ def parse_taxon_pivot(taxon_pivot, key):
counts_map[taxon] = counts
return counts_map


def merge_counts(d1, d2):
d = {}
d1_key_set = set(x for x in d1.keys())
Expand Down
3 changes: 2 additions & 1 deletion biolink/api/bio/closure_bins.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
'CL:0000000PHENOTYPE': 'Cellular'
}


def create_closure_bin(fcmap={}):
"""
Given a facet count dict from golr_query (i.e. map of class ID to count)
Expand All @@ -42,7 +43,7 @@ def create_closure_bin(fcmap={}):
for curie, label in closure_map.items():
lmap[label] = 0
idmap[curie] = 0
for k,v in fcmap.items():
for k, v in fcmap.items():
if k in closure_map:
label = closure_map[k]

Expand Down
Loading