Worldwide Gender Differences in Public Code Contributions - Replication Package
Notice bibliographique
Résumé
<strong>Worldwide Gender Differences in Public Code Contributions - Replication Package</strong> This document describes how to replicate the findings of the paper: Davide Rossi and Stefano Zacchiroli, 2022, <em>Worldwide Gender Differences in Public Code Contributions</em>. In Software Engineering in Society (ICSE-SEIS'22), May 21-29, 2022, Pittsburgh, PA, USA. ACM, New York, NY, USA, 12 pages. https://doi.org/10.1145/3510458.3513011 This document comes with the software needed to mine and analyze the data presented in the paper. <strong>Prerequisites</strong> These instructions assume the use of the bash shell, the Python programming language, the PosgreSQL DBMS (version 11 or later), the zstd compression utility and various usual *nix shell utilities (cat, pv, ...), all of which are available for multiple architectures and OSs.<br> It is advisable to create a Python virtual environment and install the following PyPI packages: <code>click==8.0.3 cycler==0.10.0 gender-guesser==0.4.0 kiwisolver==1.3.2 matplotlib==3.4.3 numpy==1.21.3 pandas==1.3.4 patsy==0.5.2 Pillow==8.4.0 pyparsing==2.4.7 python-dateutil==2.8.2 pytz==2021.3 scipy==1.7.1 six==1.16.0 statsmodels==0.13.0</code> <strong>Initial data</strong> <code>swh-replica</code>, a PostgreSQL database containing a copy of Software Heritage data. The schema for the database is available at https://forge.softwareheritage.org/source/swh-storage/browse/master/swh/storage/sql/.<br> We retrieved these data from Software Heritage, in collaboration with the archive operators, taking an archive snapshot as of 2021-07-07. We cannot make these data available in full as part of the replication package due to both its volume and the presence in it of personal information such as user email addresses. However, equivalent data (stripped of email addresses) can be obtained from the Software Heritage archive dataset, as documented in the article: Antoine Pietri, Diomidis Spinellis, Stefano Zacchiroli, <em>The Software Heritage Graph Dataset: Public software development under one roof</em>. In proceedings of MSR 2019: The 16th International Conference on Mining Software Repositories, May 2019, Montreal, Canada. Pages 138-142, IEEE 2019. http://dx.doi.org/10.1109/MSR.2019.00030.<br> Once retrieved, the data can be loaded in PostgreSQL to populate <code>swh-replica</code>. <code>names.tab</code> - forenames and surnames per country with their frequency <code>zones.acc.tab</code> - countries/territories, timezones, population and world zones <code>c_c.tab</code> - ccTDL entities - world zones matches <strong>Data preparation</strong> Export data from the <code>swh-replica</code> database to create <code>commits.csv.zst</code> and <code>authors.csv.zst</code> <code>sh> ./export.sh</code> Run the authors cleanup script to create <code>authors--clean.csv.zst</code> <code>sh> ./cleanup.sh authors.csv.zst</code> Filter out implausible names and create <code>authors--plausible.csv.zst</code> <code>sh> pv authors--clean.csv.zst | unzstd | ./filter_names.py 2> authors--plausible.csv.log | zstdmt > authors--plausible.csv.zst</code> <strong>Gender detection</strong> Run the gender guessing script to create <code>author-fullnames-gender.csv.zst</code> <code>sh> pv authors--plausible.csv.zst | unzstd | ./guess_gender.py --fullname --field 2 | zstdmt > author-fullnames-gender.csv.zst</code> <strong>Database creation and data ingestion</strong> Create the PostgreSQL DB <code>sh> createdb gender-commit </code>Notice that from now on when prepending the <code>psql></code> prompt we assume the execution of psql on the <code>gender-commit</code> database. Import data into PostgreSQL DB <code>sh> ./import_data.sh</code> <strong>Zone detection</strong> Extract commits data from the DB and create <code>commits.tab</code>, that is used as input for the gender detection script<br> <code>sh> psql -f extract_commits.sql gender-commit</code> Run the world zone detection script to create <code>commit_zones.tab.zst</code> <code>sh> pv commits.tab | ./assign_world_zone.py -a -n names.tab -p zones.acc.tab -x -w 8 | zstdmt > commit_zones.tab.zst </code>Use <code>./assign_world_zone.py --help</code> if you are interested in changing the script parameters. Read zones assignment data from the file into the DB<br> <code>psql> \copy commit_culture from program 'zstdcat commit_zones.tab.zst | cut -f1,6 | grep -Ev ''\s$'''</code> <strong>Extraction and graphs</strong> Run the script to execute the queries to extract the data to plot from the DB. This creates <code>commits_tz.tab</code>, <code>authors_tz.tab</code>, <code>commits_zones.tab</code>, <code>authors_zones.tab</code>, and <code>authors_zones_1620.tab</code>.<br> Edit <code>extract_data.sql</code> if you whish to modify extraction parameters (start/end year, sampling, ...). <code>sh> ./extract_data.sh</code> Run the script to create the graphs from all the previously extracted tabfiles. This will generate <code>commits_tzs.pdf</code>, <code>authors_tzs.pdf</code>, <code>commits_zones.pdf</code>, <code>authors_zones.pdf</code>, and <code>authors_zones_1620.pdf</code>. <code>sh> ./create_charts.sh</code> <strong>Additional graphs</strong> This package also includes some already-made graphs <code>authors_zones_1.pdf</code>: stacked graphs showing the ratio of female authors per world zone through the years, considering all authors with at least one commit per period <code>authors_zones_2.pdf</code>: ditto with at least two commits per period <code>authors_zones_10.pdf</code>: ditto with at least ten commits per period
Récupéré en direct depuis OpenAlex et désinversé. Les résumés ne sont pas conservés dans cette base de données : les index inversés représentent 8,6 Go des 9,3 Go de texte de la base, et le serveur dispose de 13 Go libres.
Comment cette classification a été obtenuedéplier
Prédiction distillée sur la base complète
Imitation des enseignantsNi prévalence calibrée, ni vérité terrain. Validation humaine à venir. Apprise à partir de 10 348 étiquettes directes de Codex et de 10 348 étiquettes directes de Gemma. Le mode candidate est l'union des têtes enseignantes seuillées; le consensus est leur intersection. Ces sorties portent le statut machine_predicted_unvalidated et ne sont ni des étiquettes humaines ni des étiquettes directes de modèles de pointe.
Scores Codex et Gemma par catégorie
| Catégorie | Codex | Gemma |
|---|---|---|
| Métarecherche | 0,001 | 0,002 |
| Méta-épidémiologie (sens strict) | 0,000 | 0,000 |
| Méta-épidémiologie (sens large) | 0,000 | 0,000 |
| Bibliométrie | 0,001 | 0,002 |
| Études des sciences et des technologies | 0,003 | 0,000 |
| Communication savante | 0,002 | 0,000 |
| Science ouverte | 0,003 | 0,003 |
| Intégrité de la recherche | 0,000 | 0,001 |
| Charge utile insuffisante (le modèle a refusé de juger) | 0,033 | 0,003 |
Scores machine (provisoires)
Les deux têtes enseignantes du modèle étudiant, lues sur ce travail. Un score ordonne la base pour la relecture; il n'affirme jamais une catégorie, et le statut de validation accompagne chaque rangée tel quel.
Scores de référence d'un modèle non mature (critères de maturité non atteints, 7 itérations). Un score ordonne; il n'affirme jamais une catégorie.
score_only:v0-immature-baseline · tel quel depuis la passe de notation : score_only signifie que le nombre peut ordonner les travaux, et qu'aucune étiquette de catégorie n'en découleClassification
machine, non validéePrédiction automatique; les deux têtes enseignantes s’accordent sur ce qui est montré ici.
Le détail, modèle par modèle et score par score, se trouve en fin de page sous « Comment cette classification a été obtenue ».