# Beman Standard tree tweaks

**URL:** <https://discourse.bemanproject.org/t/beman-standard-tree-tweaks/143>\
**Category:** Beman Project Development\
**Created:** [July 2, 2024, 11:01am UTC](https://discourse.bemanproject.org/t/beman-standard-tree-tweaks/143 "2024-07-02T11:01:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neatudarius](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/neatudarius/32/70_2.png) [@neatudarius](https://discourse.bemanproject.org/u/neatudarius)\
**Post date:** [July 2, 2024, 11:01am UTC](https://discourse.bemanproject.org/t/beman-standard-tree-tweaks/143/1 "2024-07-02T11:01:52Z")

</div>

If we are tweaking the tree hierarchy (check [CMake add\_subdirectory shorthands](https://discourse.bemanproject.org/t/cmake-add-subdirectory-shorthands/142/1) - CC: @dsankel ), I also propose to add a requirement / recommendation to the standard relative to the `tests` directory/. I’m fine with any convention, if it’s a convention.

The full tree from `Beman.Optional26` is:

- `include/Beman/Optional26/` - public header interface (as stated in the standard); NO change proposed here.
- `src/Beman/Optional26/` (only prefix `src/` is stated in the standard`) - I would also add `suffix Beman/$Library` to the standard)
- `src/Beman/Optional26/tests` (folder for tests) - not mentioned in the standard.
- `examples/` (folder for public examples; it can be optional) - not mentioned in the standard.
- `docs/` (folder for docs; it can be optional) - not mentioned in the standard.
- `scripts/` (folder for scripts; it can be optional) - not mentioned in the standard.
- `papers/` (folder for papers; it can be optional) - not mentioned in the standard.

I would like your input. I think it’s better to have explicit requirements / recommendations for all mentioned aspects.

---

<div class="post-metadata">

**Author:** ![dsankel](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/dsankel/32/5_2.png) [@dsankel](https://discourse.bemanproject.org/u/dsankel)\
**Post date:** [July 3, 2024, 6:49am UTC](https://discourse.bemanproject.org/t/beman-standard-tree-tweaks/143/2 "2024-07-03T06:49:08Z")

</div>

> [@neatudarius](#):
>
> - `src/Beman/Optional26/` (only prefix `src/` is stated in the standard`) - I would also add `suffix Beman/$Library` to the standard)

Looks good to me.

> [@](#):
>
> - `src/Beman/Optional26/tests` (folder for tests) - not mentioned in the standard.

The extra directory might make these tests a bit cumbersome to work with. What you think about having unit tests live next to the source files with filenames matching a convention (e.g. ending in `.test.cpp`)? Integration tests could live in `<root>/tests/`.

> [@](#):
>
> - `examples/` (folder for public examples; it can be optional) - not mentioned in the standard.
> - `docs/` (folder for docs; it can be optional) - not mentioned in the standard.
> - `papers/` (folder for papers; it can be optional) - not mentioned in the standard.

These look good to me. I think the standard could recommend these directory names.

> [@](#):
>
> - `scripts/` (folder for scripts; it can be optional) - not mentioned in the standard.

I’ve seen this directory used in many repositories, but I’ve never understood the criteria for files in here.

---

<div class="post-metadata">

**Author:** ![neatudarius](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.bemanproject.org/neatudarius/32/70_2.png) [@neatudarius](https://discourse.bemanproject.org/u/neatudarius)\
**Post date:** [July 3, 2024, 4:34pm UTC](https://discourse.bemanproject.org/t/beman-standard-tree-tweaks/143/3 "2024-07-03T16:34:15Z")

</div>

> [@dsankel](#):
>
> > [@](#):
> >
> > - `src/Beman/Optional26/tests` (folder for tests) - not mentioned in the standard.
> 
> The extra directory might make these tests a bit cumbersome to work with. What you think about having unit tests live next to the source files with filenames matching a convention (e.g. ending in `.test.cpp`)? .

I’m fine with your proposal, but I would prefer `*.t.cpp` suffix for shorter file names). Would that be OK with you?

> [@dsankel](#):
>
> Integration tests could live in `<root>/tests/`.

Yes, I will also add this on my list.

> [@dsankel](#):
>
> > [@](#):
> >
> > - `scripts/` (folder for scripts; it can be optional) - not mentioned in the standard.
> 
> I’ve seen this directory used in many repositories, but I’ve never understood the criteria for files in here.

We deliver C++ libraries. Any script in this context is a non production code? So any `*.sh` would end up in `scripts/`?

Also, I would like to add this topic on our weekly sync agenda.
