Skip to content

Commit

Permalink
Merge pull request #347 from opentargets/il-3354
Browse files Browse the repository at this point in the history
chore(molecule): set `drugType` nulls to `Unknown`
  • Loading branch information
ireneisdoomed authored Aug 14, 2024
2 parents 241c60e + fb02256 commit 9afdfd2
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 28 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build

on:
release:
types:
- published
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write

env:
TAG: ${{ github.ref_name }}
SCALA_VERSION: 2.12.12
OUTPUT_PATH: target/scala-2.12

steps:
- id: prepare-tag
name: Prepare tag
run: echo "TAG=$(echo $TAG | sed 's/^v//')" >> $GITHUB_ENV

- id: checkout
name: Check out repo
uses: actions/checkout@v4

- id: scala-setup
name: Install Scala
uses: olafurpg/setup-scala@v11
with:
java-version: [email protected]

- id: cache
name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cache/coursier
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}

- id: linter
name: Lint code
run: sbt ++${{ env.SCALA_VERSION }} scalafmtCheckAll

- id: compile
name: Compile code
run: sbt ++${{ env.SCALA_VERSION }} clean compile

- id: test
name: Run tests
run: sbt ++${{ env.SCALA_VERSION }} coverage test coverageReport

- id: assembly
name: Build jar
run: sbt ++${{env.SCALA_VERSION }} 'set test in assembly := {}' assembly

- id: rename
name: Rename jar
run: mv ${{ env.OUTPUT_PATH }}/etl-backend-*.jar ${{ env.OUTPUT_PATH }}/etl-backend-${{ env.TAG }}.jar

- id: push-to-release
uses: svenstaro/upload-release-action@v2
with:
file: ${{ env.OUTPUT_PATH }}/etl-backend-${{ env.TAG }}.jar
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/opentargets/platform-etl-backend.svg?branch=master)](https://travis-ci.com/opentargets/platform-etl-backend)
![Build status](https://github.com/opentargets/platform-etl-backend/actions/workflows/build.yaml/badge.svg)

# Open Targets Post-Pipeline ETL process

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ object Molecule extends LazyLogging {
col("molecule_chembl_id").as("id"),
col("molecule_structures.canonical_smiles").as("canonicalSmiles"),
col("molecule_structures.standard_inchi_key").as("inchiKey"),
coalesce(col("molecule_type"), lit("unknown")).as("drugType"),
coalesce(col("molecule_type"), lit("Unknown")).as("drugType"),
col("chebi_par_id"),
col("black_box_warning").as("blackBoxWarning"),
col("pref_name").as("name"),
Expand Down

0 comments on commit 9afdfd2

Please sign in to comment.