Discussing directory structure preferences for the "Artworks & Rules" repository

Extended from the discussion thread.

Creating another thread to explore more about the directory structure we would consider having down the line in the renewed repository for storing the artworks and rules for the Fedora Badges system.

I have been thinking of some directory structures that could help better organize our comprehensive list of badges in our inventory. Feel free to choose which ones you prefer and do provide a reason why.

  1. Option A

    root ..................................... REPOSITORY ROOT
    |__ current .............................. DIRECTORY of CURRENT BADGES
    |   |__ flock_2023_attendee .............. UNIQUE BADGE SLUG
    |   |   |__ flock_2023_attendee.svg ...... ARTWORK in SVG FORMAT
    |   |   |__ flock_2023_attendee.yml ...... RULES in YML FORMAT
    |   |   |__ flock_2023_attendee.stl ...... ARTWORK in STL FORMAT
    |   |   |__ flock_2023_attendee.png ...... ARTWORK in PNG FORMAT
    |__ retired .............................. DIRECTORY of RETIRED BADGES
        |__ helping_hand ..................... UNIQUE BADGE SLUG
            |__ helping_hand.svg ............. ARTWORK in SVG FORMAT
            |__ helping_hand.yml ............. RULES in YML FORMAT
            |__ helping_hand.stl ............. ARTWORK in STL FORMAT
            |__ helping_hand.png ............. ARTWORK in PNG FORMAT
    

    Why?

    • This directory structure allows for keeping the artworks and rules together in the same directory.
    • The current and retired badges are stored separately in different directories.
  2. Option B

    root ..................................... REPOSITORY ROOT
    |__ current .............................. DIRECTORY of CURRENT BADGES
    |   |__ flock_2023_attendee .............. UNIQUE BADGE SLUG
    |   |   |__ artworks ..................... DIRECTORY of ARTWORKS
    |   |   |   |__ flock_2023_attendee.svg .. ARTWORK in SVG FORMAT
    |   |   |   |__ flock_2023_attendee.png .. ARTWORK in PNG FORMAT
    |   |   |   |__ flock_2023_attendee.stl .. ARTWORK in STL FORMAT
    |   |   |__ flock_2023_attendee.yml ...... RULES in YML FORMAT
    |__ retired .............................. DIRECTORY of RETIRED BADGES
        |__ helping_hand ..................... UNIQUE BADGE SLUG
            |__ artworks ..................... DIRECTORY of ARTWORKS
            |   |__ helping_hand.svg ......... ARTWORK in SVG FORMAT
            |   |__ helping_hand.png ......... ARTWORK in PNG FORMAT
            |   |__ helping_hand.stl ......... ARTWORK in STL FORMAT
            |__ helping_hand.yml ............. RULES in YML FORMAT
    

    Why?

    • This directory structure allows for keeping the rules one directory level up the one for artworks.
    • The current and retired badges are stored separately in different directories.
  3. Option C

    root ..................................... REPOSITORY ROOT
    |__ artworks ............................. DIRECTORY of ARTWORKS
    |   |__ current .......................... DIRECTORY of CURRENT BADGES
    |   |   |__ flock_2023_attendee .......... UNIQUE BADGE SLUG
    |   |   |   |__ flock_2023_attendee.svg .. ARTWORK in SVG FORMAT
    |   |   |   |__ flock_2023_attendee.png .. ARTWORK in PNG FORMAT
    |   |   |   |__ flock_2023_attendee.stl .. ARTWORK in STL FORMAT
    |   |__ retired .......................... DIRECTORY of RETIRED BADGES
    |   |   |__ helping_hand ................. UNIQUE BADGE SLUG
    |   |   |   |__ helping_hand.svg ......... ARTWORK in SVG FORMAT
    |   |   |   |__ helping_hand.png ......... ARTWORK in PNG FORMAT
    |   |   |   |__ helping_hand.stl ......... ARTWORK in STL FORMAT
    |__ register ............................. DIRECTORY of RULES
        |__ current .......................... DIRECTORY of CURRENT BADGES
        |   |__ flock_2023_attendee.yml ...... RULES in YML FORMAT
        |__ retired .......................... DIRECTORY of RETIRED BADGES
            |__ helping_hand.yml ............. RULES in YML FORMAT
    

    Why?

    • This directory structure allows for keeping the artworks and rules in different directories.
    • The current and retired badges are stored separately in different directories.
  4. Option D (or Option A with less idempotence)

    root ..................................... REPOSITORY ROOT
    |__ current .............................. DIRECTORY of CURRENT BADGES
    |   |__ flock_2023_attendee .............. UNIQUE BADGE SLUG
    |   |   |__ draw.svg ..................... ARTWORK in SVG FORMAT
    |   |   |__ draw.stl ..................... ARTWORK in STL FORMAT
    |   |   |__ draw.png ..................... ARTWORK in PNG FORMAT
    |   |   |__ rule.yml ..................... RULES in YML FORMAT
    |__ retired .............................. DIRECTORY of RETIRED BADGES
        |__ helping_hand ..................... UNIQUE BADGE SLUG
            |__ draw.svg ..................... ARTWORK in SVG FORMAT
            |__ draw.stl ..................... ARTWORK in STL FORMAT
            |__ draw.png ..................... ARTWORK in PNG FORMAT
            |__ rule.yml ..................... RULES in YML FORMAT
    

    Why?

    • Having the same set of names for artworks and rules allows for easier automation.
    • The current and retired badges are stored separately in different directories.
  5. Option E (or Option B with less idempotence)

    root ..................................... REPOSITORY ROOT
    |__ current .............................. DIRECTORY of CURRENT BADGES
    |   |__ flock_2023_attendee .............. UNIQUE BADGE SLUG
    |   |   |__ artworks ..................... DIRECTORY of ARTWORKS
    |   |   |   |__ draw.svg ................. ARTWORK in SVG FORMAT
    |   |   |   |__ draw.png ................. ARTWORK in PNG FORMAT
    |   |   |   |__ draw.stl ................. ARTWORK in STL FORMAT
    |   |   |__ rule.yml ..................... RULES in YML FORMAT
    |__ retired .............................. DIRECTORY of RETIRED BADGES
        |__ helping_hand ..................... UNIQUE BADGE SLUG
            |__ artworks ..................... DIRECTORY of ARTWORKS
            |   |__ draw.svg ................. ARTWORK in SVG FORMAT
            |   |__ draw.png ................. ARTWORK in PNG FORMAT
            |   |__ draw.stl ................. ARTWORK in STL FORMAT
            |__ rule.yml ..................... RULES in YML FORMAT
    

    Why?

    • Having the same set of names for artworks and rules allows for easier automation.
    • The current and retired badges are stored separately in different directories.
  6. Option F (or Option C with less idempotence)

    root ..................................... REPOSITORY ROOT
    |__ artworks ............................. DIRECTORY of ARTWORKS
    |   |__ current .......................... DIRECTORY of CURRENT BADGES
    |   |   |__ flock_2023_attendee .......... UNIQUE BADGE SLUG
    |   |   |   |__ draw.svg ................. ARTWORK in SVG FORMAT
    |   |   |   |__ draw.png ................. ARTWORK in PNG FORMAT
    |   |   |   |__ draw.stl ................. ARTWORK in STL FORMAT
    |   |__ retired .......................... DIRECTORY of RETIRED BADGES
    |   |   |__ helping_hand ................. UNIQUE BADGE SLUG
    |   |   |   |__ draw.svg ................. ARTWORK in SVG FORMAT
    |   |   |   |__ draw.png ................. ARTWORK in PNG FORMAT
    |   |   |   |__ draw.stl ................. ARTWORK in STL FORMAT
    |__ register ............................. DIRECTORY of RULES
        |__ current .......................... DIRECTORY of CURRENT BADGES
        |   |__ flock_2023_attendee.yml ...... RULES in YML FORMAT
        |__ retired .......................... DIRECTORY of RETIRED BADGES
            |__ helping_hand.yml ............. RULES in YML FORMAT
    

    Why?

    • Having the same set of names for artworks and rules allows for easier automation.
    • The current and retired badges are stored separately in different directories.

I’m not sure this needs to be discussed separately. But, well, here we are…

I don’t think that would work in the current setup. The rules need to be on the backend server, while the artwork is stored on the frontend server. I believe Ansible just copies entire directories[1].

Regarding current and retired, I’d say, everything that’s not retired is current. So, the current/ could be left out.

I don’t really see an advantage in that. The file extension clearly indicates the type of file.

This option confuses me the most…

The other options are variations on a theme. I think having multiple files named draw.png in different directories, will eventually lead to disaster (accidental overrides, etc.). So, I’m not in favor of any of those.

Why not extend on the current layout?

fedora-badges/
├── LICENSE
├── png
│   ├── community
│   │   ├── planet-bloggin-it-01.png
│   │   └── ...
│   ├── events
│   │   ├── events-bitcamp-2016.png     #possibly drop leading 'event-' part
│   │   ├── events-rhsummit2023.png     #possibly drop leading 'event-' part
│   │   └── ...
│   ├── quality
│   │   ├── tester-01.png               #according to slug 'discovery-of-the-footprints-tester-ii.png'
│   │   └── ...
│   └── retired
├── README.md
├── rules
│   ├── community
│   │   ├── planet-bloggin-it-01.yml
│   │   └── ...
│   ├── events
│   ├── quality
│   │   ├── tester-01.yml
│   │   └── ...
│   └── retired
│       ├── helping-hand.yml
│       ├── pkgdb-old-yeller.yml
│       └── ...
├── site.yml
└── svg
    ├── community
    │   ├── planet-bloggin-it-06.svg
    │   └── planet-bloggin-it-07.svg
    ├── events
    │   ├── events-bitcamp-2016.svg
    │   ├── events-rhsummit2023.svg
    │   └── ...
    ├── quality
    └── retired
        ├── badge-muse-01.svg
        ├── irc-secretary-general.svg
        └── ...


  1. I know that can be adjusted, but it keeps things simple. :kiss: ↩︎