-
Notifications
You must be signed in to change notification settings - Fork 2
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
Updated to v1.0 #12
Merged
Updated to v1.0 #12
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
bbfc916
Updated to v1.0
mwalzer a00f820
activate autodoc/sphinx for readthedocs.io
mwalzer 014d4fc
trying to fix autodoc, added a examples doc template
mwalzer 39fec86
seems readthedocs can't do w/o requirements.txt :(
mwalzer f17baa7
updated version in setup.py, minimised requirements.txt
mwalzer c02b875
Adding autodoc result rst files
mwalzer 316cf87
inheritance diagram works fine locally
mwalzer 8d0fe6a
index experiment with readthedocs
mwalzer d9322bb
improved the load function for less manual typing/wrapping
mwalzer e09e75f
added first functional version of a SemanticCheck class
mwalzer c4b30bf
fixed version checks
mwalzer b4e8c99
fixed semanticvalidation issues:
mwalzer 0b7919e
adding first draft for validation tests
mwalzer 8351577
improved pre-validation checks
mwalzer 81951ba
improved JsonSerialisable usability and syntaxcheck
mwalzer 3928ba6
temp fix for schema source in syntactic validation
mwalzer 3313ff3
url fix for 3928ba6
mwalzer 0596050
more JS convenient validation return object
mwalzer aed91fe
fixed rectify function for load of full mzQC dict and mzQC file objec…
mwalzer 453b6b9
Adding ASMS21 demo notebook
mwalzer 6b177db
fixed tests to reflect version and schema changes
mwalzer ebf0dba
Added jupyter readme for asms21
mwalzer 54d1614
Update README.md
mwalzer 2cad4a3
updated the Dockerfiles
mwalzer 9849e2b
Merge branch 'v1.0.0' of github.com:bigbio/mzqc-pylib into v1.0.0
mwalzer 83aedff
updated ipynb s
mwalzer a0e0c02
delete 4.5 steps to mzQC (basically a clone of mzqc in 5...)
mwalzer 0725c4f
update docker base image
mwalzer b8277d7
updated workshop ipynb dockerfile
mwalzer a1468ab
updated license and files with version impact
mwalzer e625b46
Adding a Validator API (as part of heroku online availability
mwalzer 293dd97
Added syntax validation docu and fix to default schema location
mwalzer 28e3629
fix issue #14
mwalzer 6807efc
removed checked TODOs from comments
mwalzer a61da97
fix some URLs after orga move
mwalzer deb4484
updated sphinx doc (static pages and source config)
mwalzer a09b9cb
fix code-block markup in static sphinx page?
mwalzer 29021a3
fix code-block markup in static sphinx page!
mwalzer 618f3c1
finish renaming repo
mwalzer d94ba54
switching container repo config
mwalzer cda759d
switching container repo config
mwalzer 6b5a667
Merge branch 'v1.0.0' of github.com:MS-Quality-hub/mzqc-pylib into v1…
mwalzer a5f0c2a
githubactions pip chokes on the rename
mwalzer c03cf23
update readme badge
mwalzer 25bc39f
using v1.0.0 Dockerfile for now
mwalzer 5d3cca9
improve container build tags
mwalzer 36b6ef0
switch to official docker GH actions
mwalzer 8156e37
correct gh action target repo for container_build
mwalzer 9d1b56c
correcting registry target repo in container_build
mwalzer d371cd8
fudging with container tags
mwalzer 24e1cdf
fudging with container tags
mwalzer cbd41c0
fudging with container tags
mwalzer 5594b41
finished adjusting the container tags
mwalzer b7515f5
updated release gh action
mwalzer ce640f0
Added circle r/w test
mwalzer 0694325
Merge branch 'v1.0.0' of github.com:MS-Quality-hub/mzqc-pylib into v1…
mwalzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,45 @@ | ||
name: container-build | ||
name: container-build-and-push | ||
on: | ||
pull_request: | ||
types: ['opened', 'edited', 'reopened', 'synchronize'] | ||
|
||
jobs: | ||
build: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: mwalzer/mzqc-pylib | ||
username: ${{ secrets.quay_user_mzqc_action }} | ||
password: ${{ secrets.quay_pw_mzqc_action }} | ||
registry: quay.io | ||
dockerfile: containers/Dockerfile | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set tags | ||
run: echo mwalzerpymzqc:${GITHUB_REF##*/} | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
# - | ||
# name: Login to DockerHub | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Login to quay.io | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.quay_user_mzqc_action }} | ||
password: ${{ secrets.quay_pw_mzqc_action }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: containers/Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
tags: | | ||
quay.io/mwalzer/pymzqc:latest_pullrequest_build | ||
quay.io/mwalzer/pymzqc:${{ github.head_ref }}_${{ github.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,41 @@ | ||
name: release-container | ||
on: | ||
release: | ||
types: ['published', 'prereleased'] | ||
types: ['published'] | ||
jobs: | ||
build: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: mwalzer/mzqc-pylib | ||
username: ${{ secrets.quay_user_mzqc_action }} | ||
password: ${{ secrets.quay_pw_mzqc_action }} | ||
registry: quay.io | ||
tag_names: true | ||
dockerfile: containers/Dockerfile | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
# - | ||
# name: Login to DockerHub | ||
# uses: docker/login-action@v1 | ||
# with: | ||
# username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Login to quay.io | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.quay_user_mzqc_action }} | ||
password: ${{ secrets.quay_pw_mzqc_action }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: containers/Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
tags: | | ||
quay.io/mwalzer/pymzqc:latest | ||
quay.io/mwalzer/pymzqc:${{ github.event.release.tag_name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
|
||
mzqc/__pycache__/ | ||
|
||
tests/__pycache__/ | ||
|
||
.mypy_cache/ | ||
|
||
.pytest_cache/ | ||
|
||
mzqc_pylib.egg-info/ | ||
pymzqc.egg-info/ | ||
|
||
_build/ | ||
doc/build/** | ||
|
||
doc/source/codegen/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: gunicorn mzqc_heroku_validator:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#sudo apt update | ||
#sudo apt install python3 python3-pip python3-flask | ||
#pip install Flask | ||
#pip install git+https://github.com/MS-Quality-hub/pymzqc.git@v1.0.0 | ||
#pip install flask-restful | ||
#pip install gunicorn | ||
|
||
import json | ||
from flask import Flask | ||
from flask import Flask, jsonify, request | ||
from flask_restful import Resource, Api | ||
from flask_cors import CORS | ||
|
||
from mzqc.MZQCFile import MzQcFile as mzqc_file | ||
from mzqc.MZQCFile import JsonSerialisable as mzqc_io | ||
from mzqc.SemanticCheck import SemanticCheck | ||
from mzqc.SyntaxCheck import SyntaxCheck | ||
|
||
app = Flask(__name__) | ||
api = Api(app) | ||
CORS(app) | ||
|
||
class Status(Resource): | ||
def get(self): | ||
try: | ||
return {'status': 'API is running'} | ||
except: | ||
return {'status': 'API fetch was unsuccessful'} | ||
|
||
class Validator(Resource): | ||
def post(self): | ||
default_unknown = jsonify({"general": "No mzQC structure detectable."}) | ||
inpu = request.form.get('validator_input', None) | ||
try: | ||
target = mzqc_io.FromJson(inpu) | ||
except Exception as e: | ||
return default_unknown | ||
|
||
if type(target['mzQC']) != mzqc_file: | ||
return default_unknown | ||
else: | ||
safe = target['mzQC'] | ||
removed_items = list(filter(lambda x: not x.uri.startswith('http'), safe.controlledVocabularies)) | ||
safe.controlledVocabularies = list(filter(lambda x: x.uri.startswith('http'), safe.controlledVocabularies)) | ||
print(safe) | ||
sem_val_res = SemanticCheck().validate(safe) | ||
print(sem_val_res) | ||
proto_response = {k: [str(i) for i in v] for k,v in sem_val_res.items()} | ||
proto_response.update({"unrecognised CVs": [str(it) for it in removed_items]}) | ||
print(proto_response) | ||
valt = mzqc_io.ToJson(target) | ||
syn_val_res = SyntaxCheck().validate(valt) | ||
proto_response.update(syn_val_res) | ||
# convert val_res ErrorTypes to strings | ||
# add note on removed CVs | ||
return jsonify(proto_response) | ||
return default_unknown | ||
|
||
|
||
api.add_resource(Status, '/','/status/') | ||
api.add_resource(Validator, '/validator/') | ||
|
||
if __name__ == '__main__': | ||
app.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
git+git://github.com/MS-Quality-hub/pymzqc.git@v1.0.0 | ||
aniso8601==9.0.1 | ||
argon2-cffi==20.1.0 | ||
async-generator==1.10 | ||
attrs==21.2.0 | ||
backcall==0.2.0 | ||
bleach==3.3.1 | ||
certifi==2021.5.30 | ||
cffi==1.14.6 | ||
chardet==4.0.0 | ||
charset-normalizer==2.0.3 | ||
click==8.0.1 | ||
cycler==0.10.0 | ||
debugpy==1.3.0 | ||
decorator==4.4.2 | ||
defusedxml==0.7.1 | ||
entrypoints==0.3 | ||
fastobo==0.10.1 | ||
Flask==2.0.1 | ||
Flask-Cors==3.0.10 | ||
Flask-RESTful==0.3.9 | ||
gunicorn==20.1.0 | ||
idna==3.2 | ||
ipykernel==6.0.3 | ||
ipython==7.25.0 | ||
ipython-genutils==0.2.0 | ||
ipywidgets==7.6.3 | ||
itsdangerous==2.0.1 | ||
jedi==0.18.0 | ||
Jinja2==3.0.1 | ||
jsonschema==3.2.0 | ||
jupyter==1.0.0 | ||
jupyter-client==6.1.12 | ||
jupyter-console==6.4.0 | ||
jupyter-core==4.7.1 | ||
jupyterlab-pygments==0.1.2 | ||
jupyterlab-widgets==1.0.0 | ||
kiwisolver==1.3.1 | ||
MarkupSafe==2.0.1 | ||
matplotlib==3.4.2 | ||
matplotlib-inline==0.1.2 | ||
mistune==0.8.4 | ||
nbclient==0.5.3 | ||
nbconvert==6.1.0 | ||
nbformat==5.1.3 | ||
nest-asyncio==1.5.1 | ||
networkx==2.5.1 | ||
notebook==6.4.0 | ||
numpy==1.21.1 | ||
packaging==21.0 | ||
pandocfilters==1.4.3 | ||
parso==0.8.2 | ||
pexpect==4.8.0 | ||
pickleshare==0.7.5 | ||
Pillow==8.3.1 | ||
prometheus-client==0.11.0 | ||
prompt-toolkit==3.0.19 | ||
pronto==2.4.2 | ||
ptyprocess==0.7.0 | ||
pycparser==2.20 | ||
Pygments==2.9.0 | ||
pyparsing==2.4.7 | ||
pyrsistent==0.18.0 | ||
python-dateutil==2.8.2 | ||
pytz==2021.1 | ||
pyzmq==22.1.0 | ||
qtconsole==5.1.1 | ||
QtPy==1.9.0 | ||
requests==2.26.0 | ||
Send2Trash==1.7.1 | ||
six==1.16.0 | ||
terminado==0.10.1 | ||
testpath==0.5.0 | ||
tornado==6.1 | ||
traitlets==5.0.5 | ||
urllib3==1.26.6 | ||
wcwidth==0.2.5 | ||
webencodings==0.5.1 | ||
Werkzeug==2.0.1 | ||
widgetsnbextension==3.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-3.8.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from mzqc_heroku_validator import app | ||
|
||
if __name__ == '__main__': | ||
app.run() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical OSS Vulnerability:
pkg:pypi/pillow@8.3.1
1 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies
Components
pkg:pypi/pillow@8.3.1
CRITICAL Vulnerabilities (1)