Skip to content

Commit

Permalink
Remove TODO and add example.yaml as special-case campaign template (+…
Browse files Browse the repository at this point in the history
… documentation) that can be used to run the Bernese EXAMPLAE campaign.
  • Loading branch information
xidus committed May 27, 2024
1 parent 0f218a6 commit 327481b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
13 changes: 13 additions & 0 deletions docs/manual/configuration-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ The types of configuration are shown in the table below:

The details of each kind is explained below.

### Campaign-configuration templates included in the package

There are also a couple of default campaign templates that come with the package:

* A default campaign which is empty.
* Usage: Selected by default if none given by the user.
* A campaign-template for the example campaign.
* This is a special campaign template that does not use the dates given by
the user, but which overrules them with the dates for which there are
data in the campaign EXAMPLE that comes with Bernese 5.4.
* Usage: copy this template into the EXAMPLE campaign and add a metadata
section.


## The built-in configuration file

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ ab =
bsw/campaign_header.yaml
bsw/MENU_CMP.INP
bsw/templates/default.yaml
bsw/templates/example.yaml
configuration/env.yaml
country_code/ISO-3166-1-alpha-3.yaml
station/1.03.STA
Expand Down
6 changes: 6 additions & 0 deletions src/ab/bsw/templates/example.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Custom section for some specific dates not in a range, as the example campaign
# has data from three two-day periods. The section itself is not used by
# AutoBernese, so the name 'custom' could be anything. The section just contains
# a list of dates that, with the added YAML anchor may be referenced elsewhere
# in the YAML document. This way the dates can be easily edited and re-used in
# the relevant BPETask sections below.
custom:
dates: &dates
- 2019-02-13
Expand Down
4 changes: 2 additions & 2 deletions src/ab/pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
campaign_header = base.joinpath("bsw/campaign_header.yaml")

# Campaign templates included in the package
# TODO: Make this a section in the documentation
template_campaign = base.joinpath("bsw/templates/default.yaml")
template_campaign_default = base.joinpath("bsw/templates/default.yaml")
template_campaign_example = base.joinpath("bsw/templates/example.yaml")
3 changes: 2 additions & 1 deletion tests/ab/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ def test_package_data_exist():

assert pkg.bpe_runner.is_file()
assert pkg.template_campaign_menu_list.is_file()
assert pkg.template_campaign.is_file()
assert pkg.template_campaign_default.is_file()
assert pkg.template_campaign_example.is_file()
assert pkg.campaign_header.is_file()

0 comments on commit 327481b

Please sign in to comment.