From 18ec0e5c54aea6a46037f01768a4124e95677151 Mon Sep 17 00:00:00 2001 From: Martin Scheidt Date: Wed, 4 May 2022 16:53:58 +0200 Subject: [PATCH] renamed "TrainRun" into "TrainRuns" --- .github/workflows/CI.yml | 6 ++--- CHANGELOG.md | 31 +++++++++++++------------ CITATION.cff | 10 ++++---- CONTRIBUTING.md | 20 ++++++++-------- Project.toml | 2 +- README.md | 8 +++---- docs/Project.toml | 2 +- docs/examples/ExtendedWorkingExample.jl | 2 +- docs/examples/MinimalWorkingExample.jl | 2 +- docs/make.jl | 14 +++++------ docs/src/index.md | 8 +++---- src/{TrainRun.jl => TrainRuns.jl} | 4 ++-- test/runtests.jl | 8 +++---- 13 files changed, 59 insertions(+), 58 deletions(-) rename src/{TrainRun.jl => TrainRuns.jl} (98%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b6f7afc..f104c87 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -54,6 +54,6 @@ jobs: - run: | julia --project=docs -e ' using Documenter: DocMeta, doctest - using TrainRun - DocMeta.setdocmeta!(TrainRun, :DocTestSetup, :(using TrainRun); recursive=true) - doctest(TrainRun)' + using TrainRuns + DocMeta.setdocmeta!(TrainRuns, :DocTestSetup, :(using TrainRuns); recursive=true) + doctest(TrainRuns)' diff --git a/CHANGELOG.md b/CHANGELOG.md index 301df1f..992cad2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security. * validation of YAML input via JSON schema ### Changed +* renamed TrainRun into TrainRuns * replaced settings::Dict with type Settings as struct * replaced path::Dict with type Path as struct * restructured examples/ and data/ in docs/ and test/ @@ -167,18 +168,18 @@ Modules and variables were renamed. Proof of concept and master thesis submission. -[Unreleased]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.8...main -[0.8]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.7...v0.8 -[0.7]: https://github.com/railtoolkit/TrainRun.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.1]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.6...v0.6.1 -[0.6]: https://github.com/railtoolkit/TrainRun.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.2]: https://github.com/railtoolkit/TrainRun.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]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.4.1...v0.5 -[0.4.1]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.4...v0.4.1 -[0.4]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.3...v0.4 -[0.3]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.2...v0.3 -[0.2]: https://github.com/railtoolkit/TrainRun.jl/compare/v0.1...v0.2 -[0.1]: https://github.com/railtoolkit/TrainRun.jl/releases/tag/v0.1 \ No newline at end of file +[Unreleased]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.8...main +[0.8]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.7...v0.8 +[0.7]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.6.2...v0.7 +[0.6.2]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.6.1...v0.6.2 +[0.6.1]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.6...v0.6.1 +[0.6]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.5.3...v0.6 +[0.5.3]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.5.2...v0.5.3 +[0.5.2]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.5.1...v0.5.2 +[0.5.1]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.5...v0.5.1 +[0.5]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.4.1...v0.5 +[0.4.1]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.4...v0.4.1 +[0.4]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.3...v0.4 +[0.3]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.2...v0.3 +[0.2]: https://github.com/railtoolkit/TrainRuns.jl/compare/v0.1...v0.2 +[0.1]: https://github.com/railtoolkit/TrainRuns.jl/releases/tag/v0.1 \ No newline at end of file diff --git a/CITATION.cff b/CITATION.cff index f2822e0..7b696cd 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -3,7 +3,7 @@ # Visit https://bit.ly/cffinit to generate yours today! --- cff-version: 1.2.0 -title: TrainRun.jl +title: TrainRuns.jl message: 'If you use this software, please cite it using these metadata.' type: software authors: @@ -22,12 +22,12 @@ identifiers: - type: doi value: 10.5281/zenodo.6448564 description: Current version -url: 'https://www.railtoolkit.org/projects/TrainRun.jl/' -repository: 'https://github.com/railtoolkit/TrainRun.jl' +url: 'https://www.railtoolkit.org/projects/TrainRuns.jl/' +repository: 'https://github.com/railtoolkit/TrainRuns.jl' 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 - 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 invite others to collaborate. keywords: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf5bac4..dbc6ddb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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: ```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 @@ -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). -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> # use the ] key -(@v1.x) pkg> develop TrainRun +(@v1.x) pkg> develop TrainRuns (@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: ```julia julia> # use the ] key -(@v1.x) pkg> activate TrainRun -(TrainRun) pkg> +(@v1.x) pkg> activate TrainRuns +(TrainRuns) pkg> ``` -## TrainRun files +## TrainRuns files TODO! @@ -44,7 +44,7 @@ TODO! or related issues for context, before opening a new issue * Including minimal examples is greatly appreciated * 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()` ## Style Guidelines @@ -54,12 +54,12 @@ TODO ## Git Recommendations For Pull Requests * 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; * 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 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 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; diff --git a/Project.toml b/Project.toml index a5fefaf..d09852c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -name = "TrainRun" +name = "TrainRuns" uuid = "e4541106-d44c-4e00-b50b-ecdf479fcf92" authors = ["Max Kannenberg", "Martin Scheidt", "contributors"] version = "0.8.0" diff --git a/README.md b/README.md index de40d17..7663b08 100644 --- a/README.md +++ b/README.md @@ -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) -[![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 -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 ```julia -import TrainRun +import TrainRuns train = Train("test/data/trains/freight.yaml") path = Path("test/data/paths/const.yaml") diff --git a/docs/Project.toml b/docs/Project.toml index b513025..59ca3f3 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,3 +1,3 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -TrainRun = "e4541106-d44c-4e00-b50b-ecdf479fcf92" +TrainRuns = "e4541106-d44c-4e00-b50b-ecdf479fcf92" diff --git a/docs/examples/ExtendedWorkingExample.jl b/docs/examples/ExtendedWorkingExample.jl index f6a4123..1dadfc7 100644 --- a/docs/examples/ExtendedWorkingExample.jl +++ b/docs/examples/ExtendedWorkingExample.jl @@ -1,6 +1,6 @@ #!/usr/bin/env julia -import TrainRun +import TrainRuns paths=[] push!(paths, importFromYaml(:path, "data/paths/path_1_10km_nConst_vConst.yaml")) diff --git a/docs/examples/MinimalWorkingExample.jl b/docs/examples/MinimalWorkingExample.jl index d760abc..129bb2b 100644 --- a/docs/examples/MinimalWorkingExample.jl +++ b/docs/examples/MinimalWorkingExample.jl @@ -1,6 +1,6 @@ #!/usr/bin/env julia -using TrainRun +using TrainRuns train = Train("test/data/trains/freight.yaml") path = Path("test/data/paths/const.yaml") diff --git a/docs/make.jl b/docs/make.jl index f2bf563..c9fb66a 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,16 +1,16 @@ -using TrainRun +using TrainRuns using Documenter -DocMeta.setdocmeta!(TrainRun, :DocTestSetup, :(using TrainRun); recursive=true) +DocMeta.setdocmeta!(TrainRuns, :DocTestSetup, :(using TrainRuns); recursive=true) makedocs(; - modules=[TrainRun], + modules=[TrainRuns], authors="Max Kannenberg, Martin Scheidt, and contributors", - repo="https://github.com/railtoolkit/TrainRun.jl/blob/{commit}{path}#{line}", - sitename="TrainRun.jl", + repo="https://github.com/railtoolkit/TrainRuns.jl/blob/{commit}{path}#{line}", + sitename="TrainRuns.jl", format=Documenter.HTML(; prettyurls=get(ENV, "CI", "false") == "true", - canonical="https://railtoolkit.github.io/TrainRun.jl", + canonical="https://railtoolkit.github.io/TrainRuns.jl", assets=String[], ), pages=[ @@ -19,6 +19,6 @@ makedocs(; ) deploydocs(; - repo="github.com/railtoolkit/TrainRun.jl", + repo="github.com/railtoolkit/TrainRuns.jl", devbranch="development", ) diff --git a/docs/src/index.md b/docs/src/index.md index 217d810..4cd232d 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,14 +1,14 @@ ```@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 ``` ```@autodocs -Modules = [TrainRun] +Modules = [TrainRuns] ``` diff --git a/src/TrainRun.jl b/src/TrainRuns.jl similarity index 98% rename from src/TrainRun.jl rename to src/TrainRuns.jl index aacaa89..eca0419 100644 --- a/src/TrainRun.jl +++ b/src/TrainRuns.jl @@ -6,7 +6,7 @@ # __license__ = "ISC" __precompile__(true) -module TrainRun +module TrainRuns ## loading standard library packages using UUIDs, Dates @@ -65,4 +65,4 @@ function trainrun(trainInput::Dict, path::Path, settings=Settings()::Settings) return output end # function trainrun -end # module TrainRun +end # module TrainRuns diff --git a/test/runtests.jl b/test/runtests.jl index a85821f..3476764 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,7 +5,7 @@ # __copyright__ = "2021" # __license__ = "ISC" -using TrainRun, Test +using TrainRuns, Test trains = Dict() paths = Dict() @@ -14,9 +14,9 @@ settings = Dict() @testset "load data" begin println("testing load train data") - push!(trains, :freight => @time TrainRun.importFromYaml(:train, "test/data/trains/freight.yaml")) - push!(trains, :local => @time TrainRun.importFromYaml(:train, "test/data/trains/local.yaml")) - push!(trains, :longdistance => @time TrainRun.importFromYaml(:train, "test/data/trains/longdistance.yaml")) + push!(trains, :freight => @time TrainRuns.importFromYaml(:train, "test/data/trains/freight.yaml")) + push!(trains, :local => @time TrainRuns.importFromYaml(:train, "test/data/trains/local.yaml")) + push!(trains, :longdistance => @time TrainRuns.importFromYaml(:train, "test/data/trains/longdistance.yaml")) println("testing load path data") push!(paths, :const => @time Path("test/data/paths/const.yaml"))