Skip to content

Commit

Permalink
Merge pull request #1 from mgcam/devel
Browse files Browse the repository at this point in the history
Initial project scaffold
  • Loading branch information
nerdstrike authored Apr 24, 2024
2 parents 5b2c711 + c61f59e commit a5e9dbd
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will install Python dependencies and run tests
name: Python application

on:
push:
branches: [master, devel]
pull_request:
branches: [master, devel]

jobs:

test-packaging:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Poetry
run: |
pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'

- name: Run poetry install
run: |
poetry env use '3.11'
poetry install
- name: Run pytest
run: |
poetry run pytest
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.DS_Store
*~
__pycache__
*.egg-info
.vscode
.eggs
build
.pytest_cache
.vscode
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Change Log for npg_porch Project

The format is based on [Keep a Changelog](http://keepachangelog.com/).
This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [0.0.1]

### Added

# Initial project scaffold
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[tool.poetry]
name = "npg_porch_cli"
version = "0.0.1"
authors = [
"Marina Gourtovaia",
"Kieron Taylor",
"Jennifer Liddle",
]
description = "CLI client for communicating with npg_porch JSON API"
readme = "README.md"
license = "GPL-3.0-or-later"

[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.dev-dependencies]
black = "^22.3.0"
flake8 = "^4.0.1"
pytest = "^7.1.1"
isort = { version = "^5.10.1", extras = ["colors"] }

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.isort]
profile = "black"

[tool.pytest.ini_options]
addopts = [
"--import-mode=importlib",
]
Empty file added src/npg_porch_cli/__init__.py
Empty file.
22 changes: 22 additions & 0 deletions src/npg_porch_cli/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2024 Genome Research Ltd.
#
# Author: Marina Gourtovaia <[email protected]>
#
# This file is part of npg_langqc.
#
# npg_porch_cli is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.


def add_two(a, b):
return a + b
8 changes: 8 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest

import npg_porch_cli.api as porchApi


def test_addition():

assert porchApi.add_two(1, 2) == 3

0 comments on commit a5e9dbd

Please sign in to comment.