Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/new_problem_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: New Problem Check

on:
push:
branches:
- main
paths:
- "utils/new_problem.yaml"
pull_request:
Comment thread
CIGbalance marked this conversation as resolved.
Expand Down Expand Up @@ -32,6 +34,7 @@ jobs:
pip install -r utils/requirements.txt

- name: Run New Problem Check
if: ${{ hashFiles('utils/new_problem.yaml') != '' }}
run: |
python utils/validate_yaml.py utils/new_problem.yaml

24 changes: 21 additions & 3 deletions utils/README.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This folder contains utility scripts for working with the YAML format to describ

The intended way of adding a new problem to the repository is thus as follows:

* Change the [new_problem.yaml](new_problem.yaml) template file to fit the new problem.
* Create a file in 'utils/new_problem.yaml' based on the template (see below).
* Create a PR with the changes (for example with a fork).

What happens in the background then is:
Expand All @@ -13,7 +13,7 @@ What happens in the background then is:
* Then the PR should be reviewed manually.
* When the PR is merged into the main branch, a second script runs (which doesn't exist yet), that adds the content of [new_problem.yaml](new_problem.yaml) to the [problems.yaml](../problems.yaml) file, and reverts the changes to the new_problem.yaml.

:alert: Note that the GitHubActions do not exist yet either, this is a WIP.
:warning: Note that the GitHubActions do not exist yet either, this is a WIP.

## validate_yaml.py

Expand All @@ -23,9 +23,27 @@ This script checks the new content for the following:
* The required fields are present.
* Specific fields are unique across the new set of problems (e.g. name)

:alert: Execute from root of the repository. Tested with python 3.12
:warning: Execute from root of the repository. Tested with python 3.12

```bash
pip install -r utils/requirements.txt
python utils/validate_yaml.py utils/new_problem.yaml
```

## new problem example

```yaml
- name: example-problem-name
suite/generator/single: suite
objectives: '1'
dimensionality: scalable
variable type: continuous
constraints: 'no'
dynamic: 'no'
noise: 'no'
multimodal: 'yes'
multi-fidelity: 'no'
reference: ''
implementation: ''
source (real-world/artificial): ''
textual description: 'This is a dummy template'
14 changes: 0 additions & 14 deletions utils/new_problem.yaml

This file was deleted.

Loading