Wikidata:WikiProject Informatics/Forges

In FOSS development communities, a forge (Q3077240) is a web-based collaborative software platform for both developing and sharing computer applications. The term forge refers to a common prefix or suffix adopted by various platforms created after the example of SourceForge.

The wikidata Forges project goal is to define conventions to unify the description of Forge items. When a forge is published under a Free Software license, additional items and qualifiers are based on the FLOSS project. For instance the based on (Q30171963) property is already defined in the FLOSS project and does not need to be re-defined here.

Scope edit

A software qualifies as a forge when:

  • it is web based
  • supports the development computer applications
  • can be used for sharing computer applications

It does not qualify as a forge when it relies on a third party software for that purpose. For instance Redmine or Trac are Bug tracking systems rather than forges because they do not support the development process. Although they can be used to browse a VCS where the software is developed, they lack all other features that would allow developers to work collaboratively on such a repository such as sharing access permissions or reviewing proposed modifications.

Properties edit

Title ID Data type Description Examples Inverse
instance ofP31Iteminstance of: that class of which this subject is a particular example and member; different from P279 (subclass of); for example: K2 is an instance of mountain; volcano is a subclass of mountain (and an instance of volcanic landform)Forgejo <instance of> issue tracking system-

Forges provide multiple services in a central place such as repository hosting services, issue tracking etc. It makes it an instance of such a service.

Software repository qualifiers edit

When a forge is an instance of an online software repository (PyPI, Docker Registry, etc.), the supported protocols are further specified by the following qualifiers.

Title ID Data type Description Examples Inverse
instance of with qualifier includingP1012Itemthe online package system supported by the forgeForgejo <instance of> software repository
<including> Python Package Index
-

Queries edit

List all Forges edit

SELECT ?forge ?forgeLabel
WHERE 
{
  {
    ?forge wdt:P31 wd:Q3077240. # Must be of a forge
  }
  FILTER NOT EXISTS { ?forge wdt:P31+ wd:Q35127 } # website: exclude online services running a forge, only keep forge software
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en language
}
Try it!

List all active Forges edit

SELECT ?forge ?forgeLabel
WHERE 
{
  {
    ?forge wdt:P31 wd:Q3077240. # Must be of a forge
    MINUS {
        ?forge p:P2669 ?ignore0. # Do not include items with a discontinued date as documented in https://www.wikidata.org/wiki/Wikidata:WikiProject_Informatics/FLOSS#inception/discontinued_date, i.e. forges that are obsolete
    }
  }
  FILTER NOT EXISTS { 
    ?forge wdt:P31+ wd:Q35127.
  } # website: exclude online services running a forge, only keep forge software

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en language
}
Try it!

List of features supported by a forge edit

Each feature is associated with a instance of (P31).

SELECT ?forge ?forgeLabel ?instanceOf ?instanceOfLabel
WHERE 
{

  {
    ?forge wdt:P31 wd:Q3077240. # Must be of a forge
    VALUES (?instanceOf ?instanceOfLabel) {
       (wd:Q3133368 "repository")
       (wd:Q1480561 "issue tracker") 
       (wd:Q16947796 "CI")
       (wd:Q16920237 "code review")
       (wd:Q6686945 "wiki")
       (wd:Q63067479 "mailing list")
       (wd:Q1334294 "software repository")
#      (wd:Q68712963 "pull request")
    }
    ?forge wdt:P31 ?instanceOf.
    MINUS {
        ?forge p:P582 ?ignore0. # Do not include items with end time, i.e. forges that are obsolete
    }
  }
  FILTER NOT EXISTS { 
    ?forge wdt:P31+ wd:Q35127.
  } # website: exclude online services running a forge, only keep forge software

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # Helps get the label in your language, if not, then en language
}
Try it!

TODO: Note that not every platform supports pull request (Q68712963) but there are also patch-based requests etc. So we may want something more generic than pull request (Q68712963) as a discriminant. See #Instance of pull request.

Forges by publication date edit

# Collaborative software by creation date
# Author: [[User:Valerio Bozzolan]] and contributors
# Date: 2024
# License: CC 0, public domain
# https://www.wikidata.org/wiki/User:Valerio_Bozzolan
#defaultView:Timeline
SELECT
  ?item
  ?itemLabel
  ((SAMPLE(?image)) AS ?image) # Expose whatever logo. Just one.
  ((MIN(?pub_date)) AS ?date)  # Minimum date. (between publication date and inception).
WHERE 
{
  # Item MUST be a "forge" or any subclass of it
  ?item wdt:P31/wdt:P279* wd:Q3077240.
  
  # Item MUST have a publication date or inception date.
  ?item wdt:P577|wdt:P571 ?pub_date.
  
  # Item MAY have a lovely logo.
  OPTIONAL {
    ?item wdt:P154 ?image.  
  }
  
  # English label
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

# Group by item
GROUP BY ?item ?itemLabel
Try it!

TODO: it would be nice if the timeline showed both the start and the end date, but this feature is not supported by Wikidata Query Service. An ad-hoc tool (on Toolforge?) would be probably needed for this kind of visualizations.

ForgesBot edit

ForgesBot is a command line tool dedicated to this project.