Skip to content

Commit

Permalink
add ci pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kaktus42 committed Jan 17, 2025
1 parent b96b46a commit 0ecc6ee
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 8 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint and Build

on: push

jobs:
lint_and_build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 🛎️
uses: actions/checkout@v4
- name: Install Python 3.10 🐍
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up runner 📦
run: pip install -r requirements.txt -r requirements-dev.txt
- name: "Black: Code Formatting 👮🏽‍♀️"
run: black --check medconb_client.py
- name: "Pylama: Linting 🧹"
run: ruff check medconb_client.py
- name: Run mypy 👮🏽‍♀️
run: mypy medconb_client.py
- name: Build 🏗️
run: python -m build
15 changes: 7 additions & 8 deletions medconb_client.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import logging
from dataclasses import dataclass
from typing import Optional, overload, Callable
from collections import UserList
from uuid import UUID
from dataclasses import dataclass
from typing import Optional, overload

from pydantic import BaseModel
import pandas as pd
from gql import Client as GQLClient, gql
from gql.transport.requests import RequestsHTTPTransport
from gql import Client as GQLClient
from gql import gql
from gql.transport.aiohttp import AIOHTTPTransport
from msal import PublicClientApplication
from pydantic import BaseModel


class Workspace(BaseModel):
Expand Down Expand Up @@ -279,7 +277,8 @@ async def get_codelist_by_name(
mode = "phenotype"
else:
raise ValueError(
"Invalid arguments: Specify either codelist_collection_name or phenotype_collection_name and phenotype_name"
"Invalid arguments: Specify either codelist_collection_name or"
" phenotype_collection_name and phenotype_name"
)

candidates = await self._search_codelist(codelist_name)
Expand Down
3 changes: 3 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ mkdocs-gen-files
mkdocs-literate-nav
mkdocs-jupyter
mkdocs-glightbox
black
ruff
mypy

0 comments on commit 0ecc6ee

Please sign in to comment.