renamed "TrainRun" into "TrainRuns"

development
Martin Scheidt 2022-05-04 16:53:58 +02:00
parent 980899379d
commit 18ec0e5c54
13 changed files with 59 additions and 58 deletions

View File

@ -54,6 +54,6 @@ jobs:
- run: | - run: |
julia --project=docs -e ' julia --project=docs -e '
using Documenter: DocMeta, doctest using Documenter: DocMeta, doctest
using TrainRun using TrainRuns
DocMeta.setdocmeta!(TrainRun, :DocTestSetup, :(using TrainRun); recursive=true) DocMeta.setdocmeta!(TrainRuns, :DocTestSetup, :(using TrainRuns); recursive=true)
doctest(TrainRun)' doctest(TrainRuns)'

View File

@ -14,6 +14,7 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
* validation of YAML input via JSON schema * validation of YAML input via JSON schema
### Changed ### Changed
* renamed TrainRun into TrainRuns
* replaced settings::Dict with type Settings as struct * replaced settings::Dict with type Settings as struct
* replaced path::Dict with type Path as struct * replaced path::Dict with type Path as struct
* restructured examples/ and data/ in docs/ and test/ * restructured examples/ and data/ in docs/ and test/
@ -167,18 +168,18 @@ Modules and variables were renamed.
Proof of concept and master thesis submission. Proof of concept and master thesis submission.
[Unreleased]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.8...main [Unreleased]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.8...main
[0.8]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.7...v0.8 [0.8]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.7...v0.8
[0.7]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.6.2...v0.7 [0.7]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.6.2...v0.7
[0.6.2]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.6.1...v0.6.2 [0.6.2]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.6.1...v0.6.2
[0.6.1]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.6...v0.6.1 [0.6.1]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.6...v0.6.1
[0.6]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.5.3...v0.6 [0.6]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.5.3...v0.6
[0.5.3]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.5.2...v0.5.3 [0.5.3]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.5.2...v0.5.3
[0.5.2]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.5.1...v0.5.2 [0.5.2]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.5.1...v0.5.2
[0.5.1]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.5...v0.5.1 [0.5.1]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.5...v0.5.1
[0.5]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.4.1...v0.5 [0.5]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.4.1...v0.5
[0.4.1]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.4...v0.4.1 [0.4.1]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.4...v0.4.1
[0.4]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.3...v0.4 [0.4]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.3...v0.4
[0.3]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.2...v0.3 [0.3]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.2...v0.3
[0.2]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.1...v0.2 [0.2]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.1...v0.2
[0.1]: https://github.com/railtoolkit/TrainRun.jl/releases/tag/v0.1 [0.1]: https://github.com/railtoolkit/TrainRuns.jl/releases/tag/v0.1

View File

@ -3,7 +3,7 @@
# Visit https://bit.ly/cffinit to generate yours today! # Visit https://bit.ly/cffinit to generate yours today!
--- ---
cff-version: 1.2.0 cff-version: 1.2.0
title: TrainRun.jl title: TrainRuns.jl
message: 'If you use this software, please cite it using these metadata.' message: 'If you use this software, please cite it using these metadata.'
type: software type: software
authors: authors:
@ -22,12 +22,12 @@ identifiers:
- type: doi - type: doi
value: 10.5281/zenodo.6448564 value: 10.5281/zenodo.6448564
description: Current version description: Current version
url: 'https://www.railtoolkit.org/projects/TrainRun.jl/' url: 'https://www.railtoolkit.org/projects/TrainRuns.jl/'
repository: 'https://github.com/railtoolkit/TrainRun.jl' repository: 'https://github.com/railtoolkit/TrainRuns.jl'
abstract: >- abstract: >-
TrainRun.jl is a step towards open science and open data in railway engineering. TrainRuns.jl is a step towards open science and open data in railway engineering.
Its modular design offers the possibility to serve as a basis for future Its modular design offers the possibility to serve as a basis for future
optimization and development. TrainRun.jl is suitable for qualitative optimization and development. TrainRuns.jl is suitable for qualitative
calculations to compare different trains, and it is publicly available, and we calculations to compare different trains, and it is publicly available, and we
invite others to collaborate. invite others to collaborate.
keywords: keywords:

View File

@ -9,7 +9,7 @@ Please note we have a code of conduct, please follow it in all your interactions
Link your local git repository to Julia: Link your local git repository to Julia:
```console ```console
$ ln -s ~/path/to/TrainRun.jl ~/.julia/dev/TrainRun $ ln -s ~/path/to/TrainRuns.jl ~/.julia/dev/TrainRuns
``` ```
Have a look how to develop Julia packages: https://github.com/ShozenD/julia-pkg-dev Have a look how to develop Julia packages: https://github.com/ShozenD/julia-pkg-dev
@ -19,22 +19,22 @@ Pkg.add("Revise")
``` ```
and then just load with `using Revise` (preferably by putting it in the `~/.julia/config/startup.jl` file). and then just load with `using Revise` (preferably by putting it in the `~/.julia/config/startup.jl` file).
You can overide the standard TrainRun package with the local development branch (see linking above) with: You can overide the standard TrainRuns package with the local development branch (see linking above) with:
```julia ```julia
julia> # use the ] key julia> # use the ] key
(@v1.x) pkg> develop TrainRun (@v1.x) pkg> develop TrainRuns
(@v1.x) pkg> # use backspace (@v1.x) pkg> # use backspace
julia> using TrainRun # local development branch will be loaded julia> using TrainRuns # local development branch will be loaded
``` ```
If you want to add a dependency use: If you want to add a dependency use:
```julia ```julia
julia> # use the ] key julia> # use the ] key
(@v1.x) pkg> activate TrainRun (@v1.x) pkg> activate TrainRuns
(TrainRun) pkg> (TrainRuns) pkg>
``` ```
## TrainRun files ## TrainRuns files
TODO! TODO!
@ -44,7 +44,7 @@ TODO!
or related issues for context, before opening a new issue or related issues for context, before opening a new issue
* Including minimal examples is greatly appreciated * Including minimal examples is greatly appreciated
* If it's a bug, or unexpected behaviour, reproducing on the latest development version * If it's a bug, or unexpected behaviour, reproducing on the latest development version
(`Pkg.add(name="TrainRun", rev="main")`) is a good gut check and can streamline the process, (`Pkg.add(name="TrainRuns", rev="main")`) is a good gut check and can streamline the process,
along with including the first two lines of output from `versioninfo()` along with including the first two lines of output from `versioninfo()`
## Style Guidelines ## Style Guidelines
@ -54,12 +54,12 @@ TODO
## Git Recommendations For Pull Requests ## Git Recommendations For Pull Requests
* Avoid working from the `main` branch of your fork, creating a new branch will make it * Avoid working from the `main` branch of your fork, creating a new branch will make it
easier if TrainRun.jl `main` branch changes and you need to update your pull request; easier if TrainRuns.jl `main` branch changes and you need to update your pull request;
* All PRs and issues should be opened against the `main` branch not against the current release; * All PRs and issues should be opened against the `main` branch not against the current release;
* Run tests of your code before sending any commit to GitHub. Only push changes when * Run tests of your code before sending any commit to GitHub. Only push changes when
the tests of the change are passing locally. In particular note that it is not a problem the tests of the change are passing locally. In particular note that it is not a problem
if you send several commits in one push command to GitHub as CI will be run only once then; if you send several commits in one push command to GitHub as CI will be run only once then;
* If any conflicts arise due to changes in TrainRun.jl `main` branch, prefer updating your pull * If any conflicts arise due to changes in TrainRuns.jl `main` branch, prefer updating your pull
request branch with `git rebase` (rather than `git merge`), since the latter will introduce a merge request branch with `git rebase` (rather than `git merge`), since the latter will introduce a merge
commit that might confuse GitHub when displaying the diff of your PR, which makes your changes more commit that might confuse GitHub when displaying the diff of your PR, which makes your changes more
difficult to review. Alternatively use conflict resolution tool available at GitHub; difficult to review. Alternatively use conflict resolution tool available at GitHub;

View File

@ -1,4 +1,4 @@
name = "TrainRun" name = "TrainRuns"
uuid = "e4541106-d44c-4e00-b50b-ecdf479fcf92" uuid = "e4541106-d44c-4e00-b50b-ecdf479fcf92"
authors = ["Max Kannenberg", "Martin Scheidt", "contributors"] authors = ["Max Kannenberg", "Martin Scheidt", "contributors"]
version = "0.8.0" version = "0.8.0"

View File

@ -1,13 +1,13 @@
# TrainRun # TrainRuns
[![License: ISC](https://img.shields.io/badge/license-ISC-green.svg)](https://opensource.org/licenses/ISC) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6448563.svg)](https://doi.org/10.5281/zenodo.6448563) [![License: ISC](https://img.shields.io/badge/license-ISC-green.svg)](https://opensource.org/licenses/ISC) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6448563.svg)](https://doi.org/10.5281/zenodo.6448563)
[![Build Status](https://github.com/railtoolkit/TrainRun.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/railtoolkit/TrainRun.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Build Status](https://github.com/railtoolkit/TrainRuns.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/railtoolkit/TrainRuns.jl/actions/workflows/CI.yml?query=branch%3Amain)
------------ ------------
# About # About
TrainRun.jl is a step towards open science and open data in railway engineering. Its modular design offers the possibility to serve as a basis for future optimization and development. TrainRun.jl is suitable for qualitative calculations to compare different trains, and it is publicly available, and we invite others to collaborate. TrainRuns.jl is a step towards open science and open data in railway engineering. Its modular design offers the possibility to serve as a basis for future optimization and development. TrainRuns.jl is suitable for qualitative calculations to compare different trains, and it is publicly available, and we invite others to collaborate.
------------ ------------
@ -25,7 +25,7 @@ The required julia packages are
# Minimal working example # Minimal working example
```julia ```julia
import TrainRun import TrainRuns
train = Train("test/data/trains/freight.yaml") train = Train("test/data/trains/freight.yaml")
path = Path("test/data/paths/const.yaml") path = Path("test/data/paths/const.yaml")

View File

@ -1,3 +1,3 @@
[deps] [deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
TrainRun = "e4541106-d44c-4e00-b50b-ecdf479fcf92" TrainRuns = "e4541106-d44c-4e00-b50b-ecdf479fcf92"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env julia #!/usr/bin/env julia
import TrainRun import TrainRuns
paths=[] paths=[]
push!(paths, importFromYaml(:path, "data/paths/path_1_10km_nConst_vConst.yaml")) push!(paths, importFromYaml(:path, "data/paths/path_1_10km_nConst_vConst.yaml"))

View File

@ -1,6 +1,6 @@
#!/usr/bin/env julia #!/usr/bin/env julia
using TrainRun using TrainRuns
train = Train("test/data/trains/freight.yaml") train = Train("test/data/trains/freight.yaml")
path = Path("test/data/paths/const.yaml") path = Path("test/data/paths/const.yaml")

View File

@ -1,16 +1,16 @@
using TrainRun using TrainRuns
using Documenter using Documenter
DocMeta.setdocmeta!(TrainRun, :DocTestSetup, :(using TrainRun); recursive=true) DocMeta.setdocmeta!(TrainRuns, :DocTestSetup, :(using TrainRuns); recursive=true)
makedocs(; makedocs(;
modules=[TrainRun], modules=[TrainRuns],
authors="Max Kannenberg, Martin Scheidt, and contributors", authors="Max Kannenberg, Martin Scheidt, and contributors",
repo="https://github.com/railtoolkit/TrainRun.jl/blob/{commit}{path}#{line}", repo="https://github.com/railtoolkit/TrainRuns.jl/blob/{commit}{path}#{line}",
sitename="TrainRun.jl", sitename="TrainRuns.jl",
format=Documenter.HTML(; format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true", prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://railtoolkit.github.io/TrainRun.jl", canonical="https://railtoolkit.github.io/TrainRuns.jl",
assets=String[], assets=String[],
), ),
pages=[ pages=[
@ -19,6 +19,6 @@ makedocs(;
) )
deploydocs(; deploydocs(;
repo="github.com/railtoolkit/TrainRun.jl", repo="github.com/railtoolkit/TrainRuns.jl",
devbranch="development", devbranch="development",
) )

View File

@ -1,14 +1,14 @@
```@meta ```@meta
CurrentModule = TrainRun CurrentModule = TrainRuns
``` ```
# TrainRun # TrainRuns
Documentation for [TrainRun](https://github.com/railtoolkit/TrainRun.jl). Documentation for [TrainRuns](https://github.com/railtoolkit/TrainRuns.jl).
```@index ```@index
``` ```
```@autodocs ```@autodocs
Modules = [TrainRun] Modules = [TrainRuns]
``` ```

View File

@ -6,7 +6,7 @@
# __license__ = "ISC" # __license__ = "ISC"
__precompile__(true) __precompile__(true)
module TrainRun module TrainRuns
## loading standard library packages ## loading standard library packages
using UUIDs, Dates using UUIDs, Dates
@ -65,4 +65,4 @@ function trainrun(trainInput::Dict, path::Path, settings=Settings()::Settings)
return output return output
end # function trainrun end # function trainrun
end # module TrainRun end # module TrainRuns

View File

@ -5,7 +5,7 @@
# __copyright__ = "2021" # __copyright__ = "2021"
# __license__ = "ISC" # __license__ = "ISC"
using TrainRun, Test using TrainRuns, Test
trains = Dict() trains = Dict()
paths = Dict() paths = Dict()
@ -14,9 +14,9 @@ settings = Dict()
@testset "load data" begin @testset "load data" begin
println("testing load train data") println("testing load train data")
push!(trains, :freight => @time TrainRun.importFromYaml(:train, "test/data/trains/freight.yaml")) push!(trains, :freight => @time TrainRuns.importFromYaml(:train, "test/data/trains/freight.yaml"))
push!(trains, :local => @time TrainRun.importFromYaml(:train, "test/data/trains/local.yaml")) push!(trains, :local => @time TrainRuns.importFromYaml(:train, "test/data/trains/local.yaml"))
push!(trains, :longdistance => @time TrainRun.importFromYaml(:train, "test/data/trains/longdistance.yaml")) push!(trains, :longdistance => @time TrainRuns.importFromYaml(:train, "test/data/trains/longdistance.yaml"))
println("testing load path data") println("testing load path data")
push!(paths, :const => @time Path("test/data/paths/const.yaml")) push!(paths, :const => @time Path("test/data/paths/const.yaml"))