-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mgcam/devel
Initial project scaffold
- Loading branch information
Showing
7 changed files
with
117 additions
and
0 deletions.
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
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 |
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,9 @@ | ||
.DS_Store | ||
*~ | ||
__pycache__ | ||
*.egg-info | ||
.vscode | ||
.eggs | ||
build | ||
.pytest_cache | ||
.vscode |
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,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 |
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,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.
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,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 |
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,8 @@ | ||
import pytest | ||
|
||
import npg_porch_cli.api as porchApi | ||
|
||
|
||
def test_addition(): | ||
|
||
assert porchApi.add_two(1, 2) == 3 |