Data Package, Directory and Repository Names and Versions

It seems to me that the advice in Publishing Data Packages - FAQ on what to call the directory and repository a data package is stored in doesn’t consider data package versions.

The FAQ says,

Data Package Name

The Data Package name is used in the name field of the datapackage.json.

This name is also frequently used for the folder/directory in which the Data Package is stored.

and also says,

Data Package Folder Names and Structure

It is standard practice to use the Data Package name (from the datapackage.json) for the name of the folder/directory in which the Data Package is kept.

If storing in e.g. git(hub) this would also be the the name of the repository.

I’m wondering if this should be refined to,

The directory a data package is stored in should be called the data package name.

If data package versioning is being used, the directory name should be called the data package name appended with the data package version, e.g.

Given a data package containing data about “population by country” and a version number of "1.2.3", then the data package name should be "population-by-country_v1.2.3"

If a data package is stored in a repository (e.g. GitHub) with the primary purpose of holding that data package, then the repository should be called the data package name.

Thoughts? :thinking:

2 Likes

my only thought here is i prefer versions to be in a subdirectory, like jquery’s cdn:
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js

So to be clear, If I had a repository with the primary purpose of holding “population by country” data and I was using data package versioning, then I would expect the following structure

population-by-country   #repository name

|- population-by-country_v0.1.0
|     |
|     |- data
|     |    |- population-by-country.csv
|     |
|     |- datapackage.json
|     |- README.md
|
|- population-by-country_v0.2.0
|     |
      |- data
      |    |- population-by-country.csv
      |
      |- datapackage.json
      |- README.md

@jalbertbowden is that what you meant by sub-directories? (sorry I couldn’t understand the link you provided)

sorry for the confusion. essentially what you have, except the subs don’t repeat the name, they’re just the version number.
in the url you can see jquery has its own directory, the directory following it is that particular version.

1 Like

My counter to that would be:

  • what if you had a repository that held more than one data package? In that case you’d need the name and version for the directory names.
  • what if the directories were not in a repository? Again you’d need name in front of version

I guess the options are, either:

  • Be consistent with the naming directories
  • Have a specific recommendation for repositories with only one data package inside

@jalbertbowden I’d be interested to hear the advantages of your suggestion