Skip to content

Commit

Permalink
DEV 2005 add gitlab ci (#409)
Browse files Browse the repository at this point in the history
* add gitlab ci

* update deps

* remove requiremtns.txt in tox

* get db var from env

* format setup.py

---------

Co-authored-by: Arthur Collet <acollet@uchicago.edu>
  • Loading branch information
qiaouchicago and a-collet committed Jul 21, 2023
1 parent e843b7f commit ae5dd8e
Show file tree
Hide file tree
Showing 12 changed files with 164 additions and 242 deletions.
46 changes: 46 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---

include:
- project: nci-gdc/gitlab-templates
ref: 0.2.1
file:
- templates/global/full.yaml
- templates/python/full.yaml
- templates/common/python.yaml

tox:
stage: test
parallel:
matrix:
- PYTHON_VERSION: ['3.6', '3.7', '3.8']
image: ${BASE_CONTAINER_REGISTRY}/python${PYTHON_VERSION}-builder:${BASE_CONTAINER_VERSION}
services:
- name: docker.osdc.io/ncigdc/ci-postgres-13:feat_dev-1924-postgres-init-script-3673ef90
alias: postgres
tags:
- dind
variables:
# these are for postgres docker
POSTGRES_HOST_AUTH_METHOD: trust
PG_HOST: postgres
PG_INIT_SQL: |
create user test with superuser password 'test';
create database automated_test with owner test;
create database dev_models with owner test;
before_script:
- !reference [.load_github_key, script]
- pip install "tox<4"
script:
- tox -r -e py


# used by release
.python_versions:
parallel:
matrix:
- BUILD_PY_VERSION: [python3.6]
- RELEASE_PY_VERSION: [python3.6]

release:
before_script:
- git fetch --unshallow || true
6 changes: 3 additions & 3 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2022-10-14T21:28:31Z",
"generated_at": "2023-07-21T18:27:05Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -60,7 +60,7 @@
"hashed_secret": "5d0fa74acf95d1d6bebd0d37f76a94e77d604fd9",
"is_secret": false,
"is_verified": false,
"line_number": 41,
"line_number": 35,
"type": "Basic Auth Credentials"
}
],
Expand All @@ -69,7 +69,7 @@
"hashed_secret": "5d0fa74acf95d1d6bebd0d37f76a94e77d604fd9",
"is_secret": false,
"is_verified": false,
"line_number": 36,
"line_number": 38,
"type": "Basic Auth Credentials"
}
]
Expand Down
10 changes: 0 additions & 10 deletions dev-requirements.in

This file was deleted.

238 changes: 40 additions & 198 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,246 +2,88 @@
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
#
# pip-compile --output-file=dev-requirements.txt dev-requirements.in
# pip-compile --extra=dev --output-file=dev-requirements.txt
#
argon2-cffi==21.3.0
# via notebook
argon2-cffi-bindings==21.2.0
# via argon2-cffi
async-generator==1.10
# via nbclient
attrs==22.2.0
# via
# -c requirements.txt
# gdcdictionary
# jsonschema
# pytest
backcall==0.2.0
# via ipython
bleach==4.1.0
# via nbconvert
cffi==1.15.1
# via
# -c requirements.txt
# argon2-cffi-bindings
# via cryptography
coverage[toml]==6.2
# via pytest-cov
dataclasses==0.8 ; python_version < "3.7"
# via
# -r dev-requirements.in
# argon2-cffi
cryptography==3.4.8
# via gdc-ng-models
decorator==5.1.1
# via
# -c requirements.txt
# ipython
# traitlets
defusedxml==0.7.1
# via nbconvert
entrypoints==0.4
# via
# jupyter-client
# nbconvert
# via gdcdatamodel (setup.py)
gdc-ng-models @ git+https://github.com/NCI-GDC/gdc-ng-models.git@1.6.4
# via gdcdatamodel (setup.py)
gdcdictionary @ git+https://github.com/NCI-GDC/gdcdictionary.git@2.6.6
# via gdcdatamodel (setup.py)
graphviz==0.19.1
# via gdcdatamodel (setup.py)
importlib-metadata==4.8.3
# via
# -c requirements.txt
# jsonschema
# pluggy
# pytest
iniconfig==1.1.1
# via pytest
ipykernel==5.5.6
# via
# ipywidgets
# jupyter
# jupyter-console
# notebook
# qtconsole
ipython==7.16.3
# via
# ipykernel
# ipywidgets
# jupyter-console
ipython-genutils==0.2.0
# via
# ipykernel
# ipywidgets
# nbformat
# notebook
# qtconsole
# traitlets
ipywidgets==7.7.5
# via jupyter
jedi==0.17.2
# via ipython
jinja2==3.0.3
# via
# nbconvert
# notebook
jsonschema==3.2.0
# via
# -c requirements.txt
# nbformat
jupyter==1.0.0
# via -r dev-requirements.in
jupyter-client==7.1.2
# via
# -r dev-requirements.in
# ipykernel
# jupyter-console
# nbclient
# notebook
# qtconsole
jupyter-console==6.4.3
# via
# -r dev-requirements.in
# jupyter
jupyter-core==4.9.2
# via
# -r dev-requirements.in
# jupyter-client
# nbconvert
# nbformat
# notebook
# qtconsole
jupyterlab-pygments==0.1.2
# via nbconvert
jupyterlab-widgets==1.1.4
# via ipywidgets
markupsafe==2.0.1
# via jinja2
mistune==0.8.4
# via nbconvert
nbclient==0.5.9
# via nbconvert
nbconvert==6.0.7
# via
# jupyter
# notebook
nbformat==5.1.3
# via
# nbclient
# nbconvert
# notebook
nest-asyncio==1.5.6
# via
# jupyter-client
# nbclient
# notebook
notebook==6.4.10
# via
# -r dev-requirements.in
# jupyter
# widgetsnbextension
# gdcdatamodel (setup.py)
# gdcdictionary
packaging==21.3
# via
# bleach
# pytest
# qtpy
pandocfilters==1.5.0
# via nbconvert
parso==0.7.1
# via jedi
pexpect==4.8.0
# via ipython
pickleshare==0.7.5
# via ipython
# via pytest
pluggy==1.0.0
# via pytest
prometheus-client==0.16.0
# via notebook
prompt-toolkit==3.0.36
psqlgraph @ git+https://github.com/NCI-GDC/psqlgraph.git@4.0.1
# via gdcdatamodel (setup.py)
psycopg2==2.9.6
# via
# ipython
# jupyter-console
ptyprocess==0.7.0
# via
# pexpect
# terminado
# gdc-ng-models
# psqlgraph
py==1.11.0
# via pytest
pycparser==2.21
# via
# -c requirements.txt
# cffi
pygments==2.14.0
# via
# ipython
# jupyter-console
# jupyterlab-pygments
# nbconvert
# qtconsole
# via cffi
pyparsing==3.0.9
# via packaging
pyrsistent==0.18.0
# via
# -c requirements.txt
# gdcdatamodel (setup.py)
# jsonschema
pytest==7.0.1
# via
# -r dev-requirements.in
# gdcdatamodel (setup.py)
# pytest-cov
pytest-cov==4.0.0
# via -r dev-requirements.in
python-dateutil==2.8.2
# via jupyter-client
pyzmq==25.0.2
# via
# jupyter-client
# notebook
# qtconsole
qtconsole==5.2.2
# via jupyter
qtpy==2.0.1
# via qtconsole
send2trash==1.8.2
# via notebook
# via gdcdatamodel (setup.py)
pytz==2020.5
# via
# gdc-ng-models
# gdcdatamodel (setup.py)
pyyaml==6.0.1
# via gdcdictionary
rstr==3.0.0
# via psqlgraph
six==1.16.0
# via jsonschema
sqlalchemy==1.3.24
# via
# -c requirements.txt
# bleach
# jsonschema
# python-dateutil
# traitlets
terminado==0.12.1
# via notebook
testpath==0.6.0
# via nbconvert
# gdc-ng-models
# psqlgraph
tomli==1.2.3
# via
# coverage
# pytest
tornado==6.1
# via
# ipykernel
# jupyter-client
# notebook
# terminado
traitlets==4.3.3
# via
# ipykernel
# ipython
# ipywidgets
# jupyter-client
# jupyter-core
# nbclient
# nbconvert
# nbformat
# notebook
# qtconsole
typing-extensions==4.1.1
# via
# -c requirements.txt
# argon2-cffi
# importlib-metadata
wcwidth==0.2.6
# via prompt-toolkit
webencodings==0.5.1
# via bleach
widgetsnbextension==3.6.4
# via ipywidgets
# via importlib-metadata
xlocal==0.5
# via psqlgraph
zipp==3.6.0
# via
# -c requirements.txt
# importlib-metadata
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
"gdc-ng-models @ git+https://github.com/NCI-GDC/gdc-ng-models.git@1.6.4#egg=gdc-ng-models",
"psqlgraph @ git+https://github.com/NCI-GDC/psqlgraph.git@4.0.1#egg=psqlgraph",
],
extras_require={
"dev": [
"pytest",
"pytest-cov",
],
"jupyter": [
"notebook",
"jupyter",
"jupyter-client",
"jupyter-console",
"jupyter-core"
]
},
package_data={
"gdcdatamodel": [
"xml_mappings/*.yaml",
Expand Down

0 comments on commit ae5dd8e

Please sign in to comment.