Naming Conventions

Source: naming_conventions.md

Version: 2024.09.13

The following describes AgResearch naming conventions for any eResearch project or dataset.

Requirements

  • All names MUST fulfill needs of their users, user groups, or Communities of Practice.

  • All names MUST be interoperable across Linux, Windows and Mac operating systems.

  • All names MUST be parseable by a set of regular expressions defined in this notebook.

Common Needs

  • To be able to list all projects and datasets in a chronological order, all names MUST start with four-digit version of the current year eg. 2023.

  • All names MUST be case insensitive. Do not assume case sensitivity across operating systems eg. Project, PROJECT, project are three different names on Linux, but it is the same name on Windows.

  • The ONLY accepted character between the year and the project name/title is _ an underscore. Example 2024_myproject_title.
    Legacy records might show a hyphen instead.

We are storing the name in lowercase in the projects database.

  • All names MUST only contain lowercase letters, digits, underscore and hyphen characters to achieve interoperability across the operating systems.

  • All names MUST have between 8 to 64 characters in total. Minimum amount of characters is derived from the current dataset names and maximum of 64 was agreed during a eRI project review on 2 February 2023.

RegExp for Common Needs

We can derive the following regular expression from the common needs:

([0-9]{4})([a-z0-9_]{4,60})

Here is a sample Python code to illustrate the naming convention regular expression in action for existing datasets with shortest and longest names that currently exist in AgResearch HPC:

import re common = r"([0-9]{4})([a-zA-Z0-9_-]{4,60})" sample_names = [ "2010_SVS" "2011_KCCG" "2012_GCAM" "2013_Hyperspectral_Curiosity_HSI_Lamb", "2014_Clostridium_butyricum_OPP0023470", "2015_Rumen_Microbes_Genome_SequenceData", ] for sample_name in sample_names: matches = re.findall(common, sample_name) print(matches)

Links