Skip to content

Commit

Permalink
adds formatting workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinKaisermayer committed Dec 16, 2024
1 parent fdfe14b commit c5fd57c
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
style = "blue"
format_markdown = true
format_docstrings = true
31 changes: 31 additions & 0 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: format-pr
on:
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/cache@v2
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".")'
# https://github.com/marketplace/actions/create-pull-request
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
title: "Automatic JuliaFormatter.jl run"
branch: auto-juliaformatter-pr
delete-branch: true
labels: formatting, automated pr, no changelog
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
TimeSeries.jl
============
[![Build Status](https://github.com/JuliaStats/TimeSeries.jl/workflows/CI/badge.svg?branch=master)](https://github.com/JuliaStats/TimeSeries.jl/actions?query=workflow%3ACI)
[![Coverage Status](https://codecov.io/gh/JuliaStats/TimeSeries.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaStats/TimeSeries.jl)

[![Latest Documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaStats.github.io/TimeSeries.jl/dev)
[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaStats.github.io/TimeSeries.jl/stable)

[![Build Status](https://github.com/JuliaStats/TimeSeries.jl/workflows/CI/badge.svg)](https://github.com/JuliaStats/TimeSeries.jl/actions?query=workflow%3ACI)
[![Coverage Status](https://codecov.io/gh/JuliaStats/TimeSeries.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaStats/TimeSeries.jl)

[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/JuliaDiff/BlueStyle)

TimeSeries aims to provide a lightweight framework for working with time series data in Julia.
Documentation is provided [here](http://juliastats.github.io/TimeSeries.jl/latest/).

## Installation
Assuming that you already have Julia correctly installed, it suffices to import TimeSeries.jl in the standard way:

```julia
using Pkg
Pkg.add("TimeSeries")
```

## Examples

```julia
using TimeSeries
using Dates

dates = Date(2018, 1, 1):Day(1):Date(2018, 12, 31)
ta = TimeArray(dates, rand(length(dates)))

timestamps = DateTime(2018, 1, 1):Hour(1):DateTime(2018, 12, 31)
ta = TimeArray(timestamps, rand(length(timestamps)))
```

0 comments on commit c5fd57c

Please sign in to comment.