Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

swh:1:snp:b33649b2c5b0f3f9374db3e344d5a92f8f6e5fbe
  • Code
  • Branches (13)
  • Releases (2)
    • Branches
    • Releases
    • HEAD
    • refs/heads/0.1
    • refs/heads/BibTeX-sssom-mapping
    • refs/heads/agent-context
    • refs/heads/develop
    • refs/heads/force16
    • refs/heads/links-v3-schema
    • refs/heads/master
    • refs/heads/patch-travis
    • refs/heads/sssom-methodology
    • refs/tags/0.1-alpha
    • refs/tags/1.0
    • refs/tags/2.0
    • refs/tags/2.0-rc
    • 3.0
    • 2.1
  • c1dfb9f
  • /
  • CONTRIBUTING.md
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
content badge
swh:1:cnt:be66601b9e7cf5f3f201765ae1be0ca3708db906
directory badge
swh:1:dir:c1dfb9fee0aeda128fda1c7a7268f4c6e8d03d1e
revision badge
swh:1:rev:bdd852dde508e280338c31ca9fabb5f3842e2a79
snapshot badge
swh:1:snp:b33649b2c5b0f3f9374db3e344d5a92f8f6e5fbe

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: bdd852dde508e280338c31ca9fabb5f3842e2a79 authored by Morane Gruenpeter on 17 September 2025, 12:40:02 UTC
Merge pull request #361 from Mazztok45/swmath2codemeta
Tip revision: bdd852d
CONTRIBUTING.md
# Contribution Guide

This guide is intended for people who want to contribute to content of CodeMeta Git repository.

## Layout

The repository is laid out as such:

- `scripts/`: Python scripts to manipulate the crosswalk table.
- `properties_description.csv`: A CSV files with human-readable information about each CodeMeta property.
- `crosswalks/*.csv`: Two-column CSV files, that map between CodeMeta's properties and platform-specific terms.
- `crosswalk.csv`: An aggregated table of all CSV files mentioned above; intended to be the main resource for readers. Meant to be generated by a script and not be manually edited.

The repository has two major branches:

- `develop`: Any contribution that will change CodeMeta vocabulary should target this branch. Adding a new property, amending or removing an existing property will change the vocabulary.
- `master`: All other non-vocabulary changes, including mapping and crosswalk updates, should target this branch.
  - A minor amendment to a property *description* (not property *name* or *type* or *parent type*) can target this branch as well, as long as it does not change the semantic of the property.

## About pull requests

Do not commit changes to `crosswalk.csv`, as these will very likely create conflicts with other pull requests, and make either these PRs or yours unmergeable.

`crosswalk.csv` will be updated by repository maintainers when appropriate.

## Editing an existing mapping

1. Follow steps 1 and 2 from the "Contributing a new mapping" section below.
2. Open the CSV file in `crosswalks/` that contains the mapping you want to edit. You may change the second column (i.e. what comes after the comma on each line) to match the changes you want to make to the mapping.
3. Follow steps 4 onwards from the "Contributing a new mapping" section below.

## Contributing a new mapping

To add a new platform mapping to CodeMeta, you have to add a new CSV file to `crosswalks/`. Here are the instructions for doing so:

1. Fork the repository. This will create a copy of the codemeta repo in your own github profile.
2. Clone the codemeta repo that's in your github profile and continue working on it locally.
3. Create a new CSV file with your mapping in it in the `crosswalks/` folder. You could copy any other CSV file from `crosswalks/` to help you to write yours. The filename is free-form, but please avoid non-ASCII characters. The name is not used to build the aggregated table.
4. From the root of the repo, run `scripts/aggregate.py` using Python. This should involve something like opening a terminal, navigating to the root of the repo, and executing a command similar to the following: `python3 .\scripts\aggregate.py`. This will build an updated `crosswalk.csv` file using your new CSV file. You can open it up to check that it all looks good. This step is just to check that you haven't made any mistakes (such as editing the first column). You should not add the `crosswalk.csv` file to your commit. The real `crosswalk.csv` will be updated by a codemeta repo maintainer.
5. Commit your new CSV file with your mapping in it to the remote codemeta repo in your own github profile.
6. Go back to the original codemeta repo on the codemeta github profile. You should now see a yellow banner suggesting you open a "Compare & pull request". Click on this button (or navigate to Pull requests > New pull request). Add details of your new file/any changes you made and create the pull request.

## Adding a new CodeMeta property

1) **Adding the new property:**
To do so, you should first edit `properties_description.csv` and add a line with the appropriate cells there; and edit `codemeta.jsonld` as well.

2) **Update all existing mappings with the new property name:**
Add the new property name to each `crosswalks/*.csv` file, in the same position as in `properties_description.csv`.

3) **Test:**
Run `scripts/aggregate.py`. This will build the new `crosswalk.csv` with the new property; and raise an error if you made a mistake (such as editing the first column).

4) **Commit changes:**
You may then create a commit and send a pull request. Don't forget to **exclude** `crosswalk.csv` from the commit.

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API