-
Notifications
You must be signed in to change notification settings - Fork 1
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 #132 from sanger/develop
Merge develop into master
- Loading branch information
Showing
47 changed files
with
1,168 additions
and
700 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 |
---|---|---|
@@ -1,7 +1,22 @@ | ||
.coverage | ||
.dockerignore | ||
.DS_Store | ||
.editorconfig | ||
.env | ||
.env.example | ||
.git | ||
.github | ||
.gitignore | ||
.mypy_cache | ||
.pytest_cache | ||
.release-version | ||
coverage.xml | ||
docker-compose.yml | ||
Dockerfile | ||
forlint.sh | ||
htmlcov | ||
LICENSE | ||
mypy.ini | ||
pyproject.toml | ||
README.md | ||
setup.cfg |
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,15 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[{*.yml,Dockerfile}] | ||
indent_size = 2 |
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 |
---|---|---|
@@ -1,13 +1,2 @@ | ||
DB_DBNAME=baracoda_dev | ||
DB_HOST=localhost | ||
DB_PASSWORD=postgres | ||
DB_PORT=5432 | ||
DB_USER=postgres | ||
FLASK_APP=baracoda | ||
FLASK_ENV=development | ||
SEQUENCE_NAME=heron | ||
SEQUENCE_START=200000 | ||
SLACK_API_TOKEN=xoxb-123 | ||
SLACK_CHANNEL_ID=Cxxx | ||
SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://postgres:postgres@localhost:5432/baracoda_dev" | ||
SETTINGS_PATH=config/defaults.py | ||
# path to the settings file which flask will use | ||
SETTINGS_PATH=config/development.py |
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 @@ | ||
# use publicly acessible env variables in this file | ||
# https://flask.palletsprojects.com/en/1.1.x/cli/#environment-variables-from-dotenv | ||
|
||
# https://flask.palletsprojects.com/en/1.1.x/cli/#application-discovery | ||
FLASK_APP=baracoda | ||
|
||
# https://flask.palletsprojects.com/en/1.1.x/cli/#setting-command-options | ||
FLASK_RUN_HOST=0.0.0.0 | ||
FLASK_RUN_PORT=8000 | ||
|
||
# https://flask.palletsprojects.com/en/1.1.x/config/#environment-and-debug-features | ||
FLASK_ENV=development |
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "07:00" | ||
timezone: Europe/London | ||
open-pull-requests-limit: 10 |
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: Check release bump | ||
# Checks that the .release-version file has been updated | ||
name: Check release version | ||
|
||
on: | ||
pull_request: | ||
|
@@ -8,20 +9,31 @@ on: | |
|
||
jobs: | ||
check: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set excluded release types | ||
run: >- | ||
if [ "${{ github.base_ref }}" = "master" ]; then | ||
echo "exclude_types=draft|prerelease" >> $GITHUB_ENV | ||
elif [ "${{ github.base_ref }}" = "develop" ]; then | ||
echo "exclude_types=draft" >> $GITHUB_ENV | ||
else | ||
exit 1; | ||
fi | ||
- name: Get the latest release | ||
id: last_release | ||
uses: InsonusK/[email protected] | ||
with: | ||
myToken: ${{ github.token }} | ||
exclude_types: ${{ env.exclude_types }} | ||
view_top: 1 | ||
|
||
- name: get latest-release | ||
id: last_release | ||
uses: InsonusK/[email protected] | ||
with: | ||
myToken: ${{ github.token }} | ||
view_top: 1 | ||
|
||
- name: Compare release names | ||
run: | | ||
if [ "${{ steps.last_release.outputs.tag_name }}" = "$(printf '%s\n' $(cat .release-version)_develop)" ] || | ||
[ "${{ steps.last_release.outputs.tag_name }}" = "$(printf '%s\n' $(cat .release-version))" ]; then exit 1; fi | ||
- name: Compare releases | ||
run: >- | ||
if [ "${{ steps.last_release.outputs.tag_name }}" = "$(printf 'v%s-develop\n' $(cat .release-version))" ] || | ||
[ "${{ steps.last_release.outputs.tag_name }}" = "$(printf 'v%s\n' $(cat .release-version))" ]; then | ||
exit 1; | ||
fi |
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,124 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
pull_request: | ||
branches: | ||
- develop | ||
- master | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install pipenv | ||
run: | | ||
pip install pipenv | ||
- name: Install dependencies | ||
run: | | ||
pipenv sync --dev --system | ||
- name: Check format with black | ||
run: | | ||
# stop the build if there are black formatting errors | ||
python -m black --check . | ||
flake8: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install pipenv | ||
run: | | ||
pip install pipenv | ||
- name: Install dependencies | ||
run: | | ||
pipenv sync --dev --system | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 | ||
mypy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install pipenv | ||
run: | | ||
pip install pipenv | ||
- name: Install dependencies | ||
run: | | ||
pipenv sync --dev --system | ||
- name: Run mypy | ||
run: | | ||
python -m mypy . | ||
test: | ||
runs-on: ubuntu-18.04 | ||
services: | ||
postgres: | ||
image: postgres:9.6 | ||
ports: | ||
- 5432:5432 | ||
env: | ||
POSTGRES_USER: "postgres" | ||
POSTGRES_PASSWORD: "postgres" | ||
POSTGRES_DB: "baracoda_test" | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 20s | ||
--health-timeout 10s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install pipenv | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pipenv | ||
- name: Install dependencies | ||
run: | | ||
pipenv sync --dev --system | ||
- name: Test with pytest | ||
run: | | ||
SETTINGS_PATH=config/test.py python -m pytest -vsx | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 |
Oops, something went wrong.