Skip to content

Commit

Permalink
chore: Set up CI pipeline (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Karanjot786 authored Jul 2, 2024
1 parent 4243597 commit 2c0851f
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 2 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry install
- name: Lint with Ruff
run: |
poetry run ruff check src/ tests/
- name: Type check with Mypy
run: |
poetry run mypy src/
- name: Run security checks with Bandit
run: |
poetry run bandit -r src/
- name: Install test dependencies
run: |
poetry add pytest pytest-cov pytest-mock
- name: Run tests
run: |
poetry run pytest --cov=src
- name: Generate documentation
run: |
poetry run sphinx-build -b html docs/ docs/_build/html
48 changes: 46 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "wrroc-ga4gh-cloud-converter"
name = "CrateGen"
version = "0.1.0"
description = "A tool for converting TES and WES to WRROC"
authors = ["Elixir Cloud AAI <[email protected]>"]
authors = ["Karanjot Singh <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/elixir-cloud-aai/wrroc-ga4gh-cloud-converter"
Expand All @@ -30,5 +30,49 @@ pytest = "^6.2.4"
sphinx = "^3.5.4"
pre-commit = "^2.13.0"

[tool.poetry.group.lint.dependencies]
ruff = "^0.4.4"
typos = "^1.21.0"

[tool.poetry.group.docs.dependencies]
sphinx = "^7.3.7"
sphinx-autodoc-typehints = "^2.1.0"
furo = "^2024.5.6"

[tool.poetry.group.security.dependencies]
bandit = "^1.7.8"
safety = "^3.2.0"

[tool.poetry.group.test.dependencies]
pytest = "^6.2.4"
pytest-cov = "^5.0.0"
pytest-mock = "^3.6.1"

[tool.poetry.group.types.dependencies]
mypy = "^1.10.0"

[tool.bandit]
skips = [
"B321", # FTP-related functions are being called.
"B402", # A FTP-related module is being imported.
]

[tool.ruff]
select = ["B", "D", "E", "F", "I", "PL", "SIM", "UP"]

ignore = [
"D203", # conflicts with D202 as formatter removes black line before class docstring
"D206", # conflicts with E101, `format.indent-style="tab"`
"D213", # conflicts with D212, would have been ignored regardless
]

per-file-ignores = {
"src/wrroc_converter/**/*.py" = ["D"],
"tests/**/*.py" = ["D"]
}

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.typos.default.extend-words]
mke = 'mke'

0 comments on commit 2c0851f

Please sign in to comment.