Skip to content

Commit

Permalink
Merge pull request #14 from FAIRDataPipeline/rr/fixes
Browse files Browse the repository at this point in the history
Small fixes to package
  • Loading branch information
soniamitchell committed Aug 27, 2021
2 parents 0be35c0 + 220d44e commit aa435fb
Show file tree
Hide file tree
Showing 15 changed files with 129 additions and 76 deletions.
File renamed without changes.
34 changes: 34 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Documentation

on:
push:
branches:
- main
tags:
- '*'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up julia
uses: julia-actions/setup-julia@latest
with:
version: '1'
arch: x64
- name: Install dependencies
run: |
import Pkg
Pkg.develop(Pkg.PackageSpec(path=pwd()))
Pkg.instantiate()
Pkg.add(url="https://github.com/mjb3/DiscretePOMP.jl")
shell: julia --project=docs/ --color=yes {0}
- name: Build and deploy
run: |
julia --project=docs/ --color=yes docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
24 changes: 0 additions & 24 deletions .github/workflows/docs.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:

jobs:
dp-tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
julia-version:
- '1.4'
- '1'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
experimental:
- false
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up julia
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.arch }}
- name: Build package
uses: julia-actions/julia-buildpkg@master
- name: Running
uses: julia-actions/julia-runtest@master
- name: Process coverage
uses: julia-actions/julia-processcoverage@v1
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
- name: Codecov
uses: codecov/codecov-action@v1
20 changes: 0 additions & 20 deletions .github/workflows/testing.yml

This file was deleted.

4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NEWS

- v0.50.8
- Register Zenodo doi
- v0.51.0
- Register new name with General
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DataPipeline"
uuid = "9ced6f0a-eb77-43a8-bbd1-bbf3031b0d12"
authors = ["mjb3 <[email protected]>"]
version = "0.50.8-zenodotest"
version = "0.50.8-zenodotest6"

[deps]
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
Expand Down Expand Up @@ -38,4 +38,4 @@ HTTP = "0.9"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test"]
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
# DataPipeline.jl

**The [FAIR Data Pipeline][dp_docs] in Julia**

[![dev docs][docs-dev-img]][docs-dev-url]
![Package tests](https://github.com/FAIRDataPipeline/DataPipeline.jl/workflows/Tests/badge.svg)
[![JuliaNightly][nightly-img]][nightly-url]
| **Documentation** | **Build Status** | **DOI** |
|:-----------------:|:--------------------------:|:--------------------------:|
| [![stable docs][docs-stable-img]][docs-stable-url] | [![Package Testing][testing-img]][testing-url] | [![Zenodo][zenodo-badge]][zenodo-url] |
| [![dev docs][docs-dev-img]][docs-dev-url] | [![Julia Nightly][nightly-img]][nightly-url] | |

## Features

- Conveniently download Data Products from the [SCRC Data Registry](https://data.scrc.uk/).
- File hash-based version checking: new data is downloaded only when necessary.
- A SQLite layer for convenient pre-processing (typically aggregation, and the joining of disparate datasets based on common identifiers.)
- Easily register model code or realisations (i.e. 'runs') with a single line of code.

## Installation

The [current version of the] package is not yet registered and must be added via the package manager Pkg. From the REPL type `]` to enter Pkg mode and run:
The package is now registered with General and can be added via the package manager Pkg. From the REPL type `]` to enter Pkg mode and run:

```
pkg> add https://github.com/FAIRDataPipeline/DataPipeline.jl
```julia
pkg> add DataPipeline
```

## Usage
Expand All @@ -27,7 +30,17 @@ See the [package documentation][docs] for instructions and examples.

[dp_docs]: https://fairdatapipeline.github.io/docs/introduction/

[docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg
[docs-stable-url]: https://fairdatapipeline.github.io/DataPipeline.jl/stable/

[docs-dev-img]: https://img.shields.io/badge/docs-dev-blue.svg
[docs-dev-url]: https://fairdatapipeline.github.io/DataPipeline.jl/dev/

[testing-img]: https://github.com/FAIRDataPipeline/DataPipeline.jl/actions/workflows/testing.yaml/badge.svg
[testing-url]: https://github.com/FAIRDataPipeline/DataPipeline.jl/actions/workflows/testing.yaml

[nightly-img]: https://github.com/FAIRDataPipeline/DataPipeline.jl/actions/workflows/nightly.yaml/badge.svg
[nightly-url]: https://github.com/FAIRDataPipeline/DataPipeline.jl/actions/workflows/nightly.yaml

[zenodo-badge]: https://zenodo.org/badge/302237736.svg
[zenodo-url]: https://zenodo.org/badge/latestdoi/302237736
4 changes: 4 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"

[compat]
DataFrames = "0.21, 0.22, 1"
Documenter = "0.26"
YAML = "0.4"
11 changes: 5 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using Documenter, DataPipeline
using Documenter
using DataPipeline

makedocs(sitename="[SCRC] DataPipeline.jl docs")
makedocs(sitename="FAIRDataPipeline DataPipeline.jl docs")

deploydocs(
repo = "github.com/FAIRDataPipeline/DataPipeline.jl.git",
devbranch = "main",
)
deploydocs(repo = "github.com/FAIRDataPipeline/DataPipeline.jl.git",
devbranch = "main")
14 changes: 7 additions & 7 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The example is also provided as working code (including the accompanying configu
The package is not currently registered and must be added via the package manager Pkg. From the REPL type `]` to enter Pkg mode and run:

```
pkg> add https://github.com/ScottishCovidResponse/DataPipeline.jl
pkg> add https://github.com/FAIRDataPipeline/DataPipeline.jl
```

## 1. Preliminaries: import packages
Expand All @@ -47,12 +47,12 @@ data_config = "/examples/simple/data_config.yaml" # (see 2b)
submission_script = "julia examples/simple/main.jl" # (see 2c)
```
### 2a. The *model_config.yaml* file
The **'model config'** file concept is used throughout the SCRC data pipeline, (i.e. not just within this package.) In this example, it is used to store information about both the model code (step 3,) and the individual code run (step 6.) The example below is also given [here]("https://raw.githubusercontent.com/ScottishCovidResponse/DataPipeline.jl/main/examples/simple/data_config.yaml").
The **'model config'** file concept is used throughout the SCRC data pipeline, (i.e. not just within this package.) In this example, it is used to store information about both the model code (step 3,) and the individual code run (step 6.) The example below is also given [here]("https://raw.githubusercontent.com/FAIRDataPipeline/DataPipeline.jl/main/examples/simple/data_config.yaml").

``` yaml
# model
model_name: "DRU simple example"
model_repo: "https://github.com/ScottishCovidResponse/DataPipeline.jl"
model_name: "DataPipeline simple example"
model_repo: "https://github.com/FAIRDataPipeline/DataPipeline.jl"
# NB. ^ because the example is part of this package - replace with your own repo
model_version: "0.0.4"
model_description: "A simple SEIR simulation for demonstrating use of the DataPipeline.jl package."
Expand Down Expand Up @@ -213,8 +213,8 @@ code_release_id = DataPipeline.register_github_model(model_config, scrc_access_t
Here we have used a .yaml configuration file but for illustration, the code is roughly equivalent to this:

``` julia
model_name = "DRU simple example"
model_repo = "https://github.com/ScottishCovidResponse/DataPipeline.jl"
model_name = "DataPipeline simple example"
model_repo = "https://github.com/FAIRDataPipeline/DataPipeline.jl"
model_version = "0.0.1"
model_description = " ... " (nb. insert description)
model_docs = "https://mjb3.github.io/DiscretePOMP.jl/stable/"
Expand Down Expand Up @@ -245,6 +245,6 @@ DataPipeline.registry_commit_status(db) # optional: display status

## Finished!

That concludes the example. A complete working example of this code can be found [here](https://github.com/ScottishCovidResponse/DataPipeline.jl/tree/main/examples/simple).
That concludes the example. A complete working example of this code can be found [here](https://github.com/FAIRDataPipeline/DataPipeline.jl/tree/main/examples/simple).

Please note that certain features, notably the registration of Data Products (i.e. model 'inputs' and 'outputs') is currently still a work in progress. See the home page for more information.
4 changes: 2 additions & 2 deletions docs/src/snip.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Depth = 3

## Getting started - package installation

The package is not currently registered and must be added via the package manager Pkg. From the REPL type `]` to enter Pkg mode and run:
The package is now registered in General, so can be added via the package manager Pkg. From the REPL type `]` to enter Pkg mode and run:

```
pkg> add https://github.com/ScottishCovidResponse/DataPipeline.jl
pkg> add DataPipeline
```

``` julia
Expand Down
4 changes: 2 additions & 2 deletions examples/simple/model_config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model
model_name: "DRU simple example"
model_repo: "https://github.com/ScottishCovidResponse/DataPipeline.jl"
model_name: "DataPipeline simple example"
model_repo: "https://github.com/FAIRDataPipeline/DataPipeline.jl"
# NB. ^ because the example is part of this package - replace with your own repo
model_version: "0.0.6"
model_description: "A simple SEIR simulation for demonstrating use of the DataPipeline.jl package [v0.4.1]"
Expand Down
5 changes: 2 additions & 3 deletions examples/simulation/main.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## formerly Scotland_run_dru.jl

using Simulation
using Unitful
using Unitful.DefaultSymbols
Expand Down Expand Up @@ -277,4 +275,5 @@ function run_model_dr(times::Unitful.Time, interval::Unitful.Time, timestep::Uni
end
## run
times = 2months; interval = 1day; timestep = 1day
run_model_dr(times, interval, timestep, do_plot=true, save=true data_dir="examples/simulation/data/")
run_model_dr(times, interval, timestep, do_plot=true, save=true,
data_dir="examples/simulation/data/")
3 changes: 1 addition & 2 deletions src/fdp_i.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
### new interface for FAIR data pipeline ###
# - implements: https://scottishcovidresponse.github.io/docs/data_pipeline/interface/
# - UPDATED 29/6: https://fairdatapipeline.github.io/docs/interface/example0/
# - implements: https://fairdatapipeline.github.io/docs/interface/example0/

## BASELINE FDP FUNCTIONALITY:
# fdp pull config.yaml
Expand Down

2 comments on commit aa435fb

@soniamitchell
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: "Pre-release version not allowed"

Please sign in to comment.