somesy

A CLI tool for synchronizing software project metadata

https://github.com/materials-data-science-and-informatics/somesy

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.7%) to scientific vocabulary

Keywords

fair metadata
Last synced: 6 months ago · JSON representation ·

Repository

A CLI tool for synchronizing software project metadata

Basic Info
Statistics
  • Stars: 13
  • Watchers: 2
  • Forks: 2
  • Open Issues: 15
  • Releases: 15
Topics
fair metadata
Created almost 3 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Authors Codemeta

README.md

Docs CI Test Coverage Docs Coverage PyPIPkgVersion OpenSSF Best Practices fair-software.eu

HMC Logo

somesy

Somesy (software metadata sync) is a CLI tool to avoid messy software project metadata by keeping it in sync.

Description

Many development tools either declare or need information about the software project they are used in, such as: the project name, description, version, repository url, license or project authors. Most such tools come with configuration files and conventions that are specific to the programming language or chosen technology. Emerging best practices for FAIR software metadata require to add even more files where such metadata must be stated.

If good project metadata was a fire-and-forget issue, this would be acceptable, but software is never standing still - maintainers change, contributors come and go, the version number is regularly increased, the project might be moved to a different location. Properly maintaining this kind of information in various files scattered around the project is usually tedious, error-prone and time consuming manual labor.

Somesy automates the synchronization of software project metadata and frees your time to focus on your actual work.

You can find more information on configuring, using and contributing to somesy in the documentation.

Getting Started

Platform Support

Starting with version 0.3.0, somesy supports Linux, MacOS and Windows.

Make sure that you use the latest version in order to avoid any problems.

! info

Poetry changed location of its project metadata with its version 2. Starting with version **0.7.0**, `somesy` supports both major versions of `poetry`, version 1 and 2.

Installing somesy

Somesy requires Python >=3.8. To get a first impression, you can install the latest stable version of somesy from PyPI using pip:

bash pip install somesy

Note

If you use somesy as a pre-commit hook, you don't have to install somesy on your PC nor add it as a dependency in your Python project. Pre-commit will handle the installation automatically.

Configuring somesy

Yes, somesy is another tool with its own configuration. However, for your project metadata it is hopefully the last file you need, and the only one you have to think about, somesy will take care of the others for you!

To get started, create a file named somesy.toml:

```toml [project] name = "my-amazing-project" version = "0.1.0" description = "Brief description of my amazing software."

keywords = ["some", "descriptive", "keywords"] license = "MIT" repository = "https://github.com/username/my-amazing-project"

This is you, the proud author of your project:

[[project.people]] given-names = "Jane" family-names = "Doe" email = "j.doe@example.com" orcid = "https://orcid.org/0000-0000-0000-0001" author = true # is a full author of the project (i.e. appears in citations) maintainer = true # currently maintains the project (i.e. is a contact person)

this person is an acknowledged contributor, but not author or maintainer:

[[project.people]] given-names = "Another" family-names = "Contributor" email = "a.contributor@example.com" orcid = "https://orcid.org/0000-0000-0000-0002"

... but for scientific publications, this contributor should be listed as author:

publication_author = true

add an organization as a maintainer

[[project.entities]] name = "My Super Organization" email = "info@my-super-org.com" website = "https://my-super-org.com" rorid = "https://ror.org/02nv7yv05" # highly recommended set a ror id for your organization

[config] verbose = true # show detailed information about what somesy is doing ```

As Helmholtz Metadata Collaboration (HMC), our goal is to increase usage of metadata and improve metadata quality. Therefore, some fields in somesy.toml are set as required fields. This is to increase rigour and completeness of metadata recorded with somesy .

Alternatively, you can also add the somesy configuration to an existing pyproject.toml, package.json, Project.toml, or fpm.toml file. The somesy manual contains examples showing how to do that.

Using somesy

Once somesy is installed and configured, somesy can take over and manage your project metadata. Now you can run somesy simply by using

bash somesy sync

The information in your somesy.toml is used as the primary and authoritative source for project metadata, which is used to update all supported (and enabled) target files. You can find an overview of supported formats further below.

By default, somesy will create (if they did not exist) or update CITATION.cff and codemeta.json files in your repository. If you happen to use

  • pyproject.toml (in Python projects),
  • package.json (in JavaScript projects),
  • Project.toml (in Julia projects),
  • fpm.toml (in Fortran projects),
  • pom.xml (in Java projects),
  • mkdocs.yml (in projects using MkDocs),
  • Cargo.toml (in Rust projects)

then somesy would also update the respective information there.

You can see call available options with somesy --help, all of these can also be conveniently set in your somesy.toml file.

Somesy as a pre-commit hook

We highly recommend to use somesy as a pre-commit hook. A pre-commit hook runs on every commit to automatically point out issues or fix them on the spot, so if you do not use pre-commit in your project yet, you should start today! When used this way, somesy can fix most typical issues with your project metadata even before your changes can leave your computer.

To add somesy as a pre-commit hook, add it to your .pre-commit-config.yaml file in the root folder of your repository:

yaml repos: # ... (your other hooks) ... - repo: https://github.com/Materials-Data-Science-and-Informatics/somesy rev: 'v0.7.2' hooks: - id: somesy

Note

Please add the latest version of Somesy to your project. You can update the version of Somesy in your config file now and later to use the newest versions as they become available.

Note that pre-commit gives somesy the staged version of files, so when using somesy with pre-commit, keep in mind that

  • if somesy changed some files, you need to git add them again (and rerun pre-commit)
  • if you explicitly run pre-commit, make sure to git add all changed files (just like before a commit)

Supported File Formats

Here is an overview of all the currently supported files and formats.

| Input Formats | Status | | Target Formats | Status | | -------------- | ------ | --- | ---------------------------------------- | ------ | | (.)somesy.toml | ✓ | | - | ✓ | | pyproject.toml | ✓ | | pyproject.toml (setuptools and poetry) | ✓(1.) | | package.json | ✓ | | package.json (JavaScript) | ✓(2.) | | Project.toml | ✓ | | Project.toml (Julia) | ✓ | | fpm.toml | ✓ | | fpm.toml (Fortran) | ✓(3.) | | | ✓ | | pom.toml (Java) | ✓(4.) | | Cargo.toml | ✓ | | Cargo.toml (Rust) | ✓ | | | | | mkdocs.yml | ✓(5.) | | | | | CITATION.cff | ✓ | | | | | codemeta.json | ✓(6.) |

Notes:

  1. note that somesy does not support setuptools or poetry dynamic fields
  2. package.json only supports one author, so somesy will pick the first listed author
  3. fpm.toml only supports one author and maintainer, so somesy will pick the first listed author and maintainer
  4. pom.xml has no concept of maintainers, but it can have multiple licenses (somesy only supports one main project license)
  5. mkdocs.yml is a bit special, as it is not a project file, but a documentation file. somesy will only update it if it exists and is enabled in the configuration
  6. For handling codemeta.json different options exists: Either (A) somesy removes any prior existing codemata.json files and re-creates it anew, or (B) somesy merges an existing codemeta.json with the information handled by somesy. See the user manual for additional details about CodeMeta handling.

How to Cite

If you want to cite this project in your scientific work, please use the citation file in the repository.

Acknowledgements

We kindly thank all authors and contributors.

HMC Logo    FZJ Logo


This project was developed at the Institute for Materials Data Science and Informatics (IAS-9) of the Jülich Research Center and funded by the Helmholtz Metadata Collaboration (HMC), an incubator-platform of the Helmholtz Association within the framework of the Information and Data Science strategic initiative.

Owner

  • Name: Materials Data Science and Informatics
  • Login: Materials-Data-Science-and-Informatics
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
type: software
message: If you use this software, please cite it using this metadata.

title: somesy
version: 0.7.3
abstract: A CLI tool for synchronizing software project metadata.
url: https://materials-data-science-and-informatics.github.io/somesy
repository-code: https://github.com/Materials-Data-Science-and-Informatics/somesy
license: MIT
keywords:
  - metadata
  - FAIR
authors:
  - orcid: https://orcid.org/0000-0003-2637-0432
    email: m.soylu@fz-juelich.de
    given-names: Mustafa
    family-names: Soylu
  - email: a.pirogov@fz-juelich.de
    orcid: https://orcid.org/0000-0002-5077-7497
    family-names: Pirogov
    given-names: Anton
  - email: v.hofmann@fz-juelich.de
    orcid: https://orcid.org/0000-0002-5149-603X
    family-names: Hofmann
    given-names: Volker
  - email: s.sandfeld@fz-juelich.de
    orcid: https://orcid.org/0000-0001-9560-4728
    family-names: Sandfeld
    given-names: Stefan
contact:
  - email: m.soylu@fz-juelich.de
    family-names: Soylu
    given-names: Mustafa
    orcid: https://orcid.org/0000-0003-2637-0432

CodeMeta (codemeta.json)

{
  "@context": [
    "https://doi.org/10.5063/schema/codemeta-2.0",
    "https://w3id.org/software-iodata",
    "https://raw.githubusercontent.com/jantman/repostatus.org/master/badges/latest/ontology.jsonld",
    "https://schema.org",
    "https://w3id.org/software-types"
  ],
  "@type": "SoftwareSourceCode",
  "author": [
    {
      "@type": "Person",
      "givenName": "Mustafa",
      "familyName": "Soylu",
      "email": "m.soylu@fz-juelich.de",
      "@id": "https://orcid.org/0000-0003-2637-0432",
      "identifier": "https://orcid.org/0000-0003-2637-0432"
    },
    {
      "@type": "Person",
      "givenName": "Anton",
      "familyName": "Pirogov",
      "email": "a.pirogov@fz-juelich.de",
      "@id": "https://orcid.org/0000-0002-5077-7497",
      "identifier": "https://orcid.org/0000-0002-5077-7497"
    }
  ],
  "name": "somesy",
  "description": "A CLI tool for synchronizing software project metadata.",
  "version": "0.7.3",
  "keywords": [
    "metadata",
    "FAIR"
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Mustafa",
      "familyName": "Soylu",
      "email": "m.soylu@fz-juelich.de",
      "@id": "https://orcid.org/0000-0003-2637-0432",
      "identifier": "https://orcid.org/0000-0003-2637-0432"
    }
  ],
  "license": [
    "https://spdx.org/licenses/MIT"
  ],
  "softwareHelp": "https://materials-data-science-and-informatics.github.io/somesy",
  "codeRepository": "https://github.com/Materials-Data-Science-and-Informatics/somesy",
  "buildInstructions": "https://materials-data-science-and-informatics.github.io/somesy",
  "contributor": [
    {
      "@type": "Person",
      "givenName": "Jens",
      "familyName": "Brder",
      "email": "j.broeder@fz-juelich.de",
      "@id": "https://orcid.org/0000-0001-7939-226X",
      "identifier": "https://orcid.org/0000-0001-7939-226X"
    },
    {
      "@type": "Person",
      "givenName": "Volker",
      "familyName": "Hofmann",
      "email": "v.hofmann@fz-juelich.de",
      "@id": "https://orcid.org/0000-0002-5149-603X",
      "identifier": "https://orcid.org/0000-0002-5149-603X"
    },
    {
      "@type": "Person",
      "givenName": "Stefan",
      "familyName": "Sandfeld",
      "email": "s.sandfeld@fz-juelich.de",
      "@id": "https://orcid.org/0000-0001-9560-4728",
      "identifier": "https://orcid.org/0000-0001-9560-4728"
    }
  ],
  "url": "https://materials-data-science-and-informatics.github.io/somesy"
}

GitHub Events

Total
  • Create event: 14
  • Release event: 6
  • Issues event: 20
  • Watch event: 5
  • Delete event: 10
  • Issue comment event: 10
  • Push event: 68
  • Pull request event: 21
  • Pull request review comment event: 5
  • Pull request review event: 5
Last Year
  • Create event: 14
  • Release event: 6
  • Issues event: 20
  • Watch event: 5
  • Delete event: 10
  • Issue comment event: 10
  • Push event: 68
  • Pull request event: 21
  • Pull request review comment event: 5
  • Pull request review event: 5

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 67
  • Total pull requests: 64
  • Average time to close issues: 3 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 11
  • Total pull request authors: 2
  • Average comments per issue: 0.64
  • Average comments per pull request: 0.83
  • Merged pull requests: 61
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 16
  • Pull requests: 20
  • Average time to close issues: 21 days
  • Average time to close pull requests: about 3 hours
  • Issue authors: 6
  • Pull request authors: 1
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mustafasoylu (33)
  • apirogov (11)
  • broeder-j (4)
  • GonozalIX (4)
  • flrnslbch (3)
  • hofmannv (3)
  • stexandev (2)
  • hlmore (2)
  • Mojeeb-Rahman (1)
  • GGoetzelmann (1)
  • craquet (1)
Pull Request Authors
  • mustafasoylu (63)
  • apirogov (14)
Top Labels
Issue Labels
enhancement (49) bug (13) documentation (3) support (1)
Pull Request Labels
enhancement (37) bug (14) documentation (8)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 195 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 15
  • Total maintainers: 3
pypi.org: somesy

A CLI tool for synchronizing software project metadata.

  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 195 Last month
Rankings
Dependent packages count: 7.6%
Forks count: 23.0%
Stargazers count: 23.4%
Average: 30.8%
Dependent repos count: 69.4%
Maintainers (3)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
  • softprops/action-gh-release v1 composite
poetry.lock pypi
  • anybadge 1.14.0 develop
  • black 23.3.0 develop
  • cfgv 3.3.1 develop
  • coverage 7.2.5 develop
  • distlib 0.3.6 develop
  • exceptiongroup 1.1.1 develop
  • fhconfparser 2022 develop
  • filelock 3.12.0 develop
  • ghp-import 2.1.0 develop
  • griffe 0.27.5 develop
  • hypothesis 6.75.2 develop
  • identify 2.5.24 develop
  • importlib-resources 5.12.0 develop
  • iniconfig 2.0.0 develop
  • interrogate 1.5.0 develop
  • isort 5.12.0 develop
  • jinja2 3.1.2 develop
  • licensecheck 2023.1.1 develop
  • markdown 3.3.7 develop
  • markdown-exec 1.6.0 develop
  • markdown-include 0.8.1 develop
  • markupsafe 2.1.2 develop
  • mergedeep 1.3.4 develop
  • mike 1.1.2 develop
  • mkdocs 1.4.3 develop
  • mkdocs-autorefs 0.4.1 develop
  • mkdocs-coverage 0.2.7 develop
  • mkdocs-gen-files 0.4.0 develop
  • mkdocs-literate-nav 0.6.0 develop
  • mkdocs-macros-plugin 0.7.0 develop
  • mkdocs-material 9.1.12 develop
  • mkdocs-material-extensions 1.1.1 develop
  • mkdocs-section-index 0.3.5 develop
  • mkdocstrings 0.21.2 develop
  • mkdocstrings-python 1.0.0 develop
  • mypy-extensions 1.0.0 develop
  • nodeenv 1.8.0 develop
  • pastel 0.2.1 develop
  • pathspec 0.11.1 develop
  • platformdirs 3.5.1 develop
  • pluggy 1.0.0 develop
  • poethepoet 0.18.1 develop
  • pre-commit 3.3.1 develop
  • py 1.11.0 develop
  • pygments-ansi-color 0.2.0 develop
  • pymdown-extensions 9.11 develop
  • pytest 7.3.1 develop
  • pytest-cov 4.0.0 develop
  • pytest-mock 3.10.0 develop
  • pyyaml 6.0 develop
  • pyyaml-env-tag 0.1 develop
  • regex 2023.5.5 develop
  • requirements-parser 0.5.0 develop
  • sortedcontainers 2.4.0 develop
  • tabulate 0.9.0 develop
  • termcolor 2.3.0 develop
  • toml 0.10.2 develop
  • tomli 2.0.1 develop
  • types-setuptools 67.7.0.2 develop
  • verspec 0.1.0 develop
  • virtualenv 20.23.0 develop
  • watchdog 3.0.0 develop
  • attrs 21.4.0
  • certifi 2023.5.7
  • cffconvert 2.0.0
  • charset-normalizer 3.1.0
  • click 8.1.3
  • colorama 0.4.6
  • commonmark 0.9.1
  • dnspython 2.3.0
  • docopt 0.6.2
  • email-validator 2.0.0.post2
  • idna 3.4
  • importlib-metadata 6.6.0
  • jsonschema 3.2.0
  • packaging 23.1
  • pydantic 1.10.7
  • pygments 2.15.1
  • pykwalify 1.8.0
  • pyrsistent 0.19.3
  • python-dateutil 2.8.2
  • requests 2.30.0
  • rich 12.6.0
  • ruamel-yaml 0.17.26
  • ruamel-yaml-clib 0.2.7
  • setuptools 67.7.2
  • shellingham 1.5.0.post1
  • six 1.16.0
  • tomlkit 0.11.8
  • typer 0.7.0
  • typing-extensions 4.5.0
  • urllib3 2.0.2
  • wrapt 1.15.0
  • zipp 3.15.0
pyproject.toml pypi
  • cffconvert ^2.0.0
  • importlib-metadata ^6.0.0
  • packaging ^23.1
  • pydantic ^1.10.6
  • python ^3.8
  • ruamel-yaml ^0.17.21
  • tomlkit ^0.11.6
  • typer ^0.7.0
  • wrapt ^1.15.0
tests/data/package.json npm
  • jest ^27.0.6 development
  • axios ^0.21.1
  • lodash ^4.17.21
tests/data/pyproject.toml pypi
  • pydantic ^1.10.2
  • python ^3.8
tests/data/pom.xml maven
tests/data/Cargo.toml cargo