Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding CITATION.cff #17

Merged
merged 5 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict # checks for files that contain merge conflict strings
- id: check-toml # checks toml files for parseable syntax
- id: debug-statements # checks for debugger imports and py37+ `breakpoint()` calls in python source
- id: check-merge-conflict # checks for files that contain merge conflict strings
- id: check-toml # checks toml files for parseable syntax
- id: debug-statements # checks for debugger imports and py37+ `breakpoint()` calls in python source

- repo: https://github.com/citation-file-format/cffconvert
rev: 054bda51dbe278b3e86f27c890e3f3ac877d616c
hooks:
- id: validate-cff

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ its best to adhere to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>
Fixed
-----

0.2.1 (2024-11-28)
==================

Added
-----

- CITATION.cff to record contribution credits and hold metadata for citations. See `Citation File Format (CFF) <https://citation-file-format.github.io/>`_ for further information. The collective term ``The hdf5view Developers`` has been defined, which includes all contributors to hdf5view as shown in the
`contributors graph of the repository <https://github.com/tgwoodcock/hdf5view/graphs/contributors>`_.
- Pre-commit hook to ensure that the CITATION.cff is correctly formatted.

Changed
-------

- Updated the documentation so that the new method of recording package credits is explained in the Contributing guide.
- Updated the LICENSE file and ``About...`` entry in the ``Help`` menu of the application to reflect the new method of recording package credits.

0.2.0 (2024-11-25)
==================

Expand Down
23 changes: 23 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
authors:
- family-names: Swarbrick
given-names: Martin
- family-names: Woodcock
given-names: Thomas George
orcid: "https://orcid.org/0000-0003-2351-973X"
affiliation: "Leibniz Institute for Solid State and Materials Research (ROR: https://ror.org/04zb59n70)"
- name: The hdf5view Developers
website: "https://github.com/tgwoodcock/hdf5view/graphs/contributors"
cff-version: 1.2.0
date-released: "2024-11-28"
keywords:
- research
- data
- plantuml
- chada
- moda
- workflow
license: MIT
message: "Please use these metadata in any citations of the software."
repository-code: "https://github.com/tgwoodcock/hdf5view"
title: "hdf5view"
version: 0.2.1
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Martin Swarbrick
Copyright (c) 2019 The hdf5view Developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "hdf5view"
author = "hdf5view developers"
author = "The hdf5view Developers"
copyright = f"2019-%Y, {author}"
release = hdf5view.__version__
version = hdf5view.__version__
Expand Down
14 changes: 14 additions & 0 deletions docs/dev/contribution_credits.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
====================
Contribution Credits
====================

We maintain a `Citation File Format (CFF) <https://citation-file-format.github.io/>`_ file:
`CITATION.cff <https://github.com/tgwoodcock/hdf5view/blob/main/CITATION.cff>`_ in order to
give credit to contributors and to provide metadata for citing hdf5view.

Under the ``Authors`` key, the initial author is listed first, followed by the current project host and maintainer, then
the collective term ``The hdf5view Developers``, which includes all contributors to hdf5view as shown in the
`contributors graph of the repository <https://github.com/tgwoodcock/hdf5view/graphs/contributors>`_.

If you are one of ``The hdf5view Developers`` and would prefer to be additionally named as an author, in ``CITATION.cff`` please
open an `issue <https://github.com/tgwoodcock/hdf5view/issues>`_.
3 changes: 2 additions & 1 deletion docs/dev/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ If you would like to contribute code, such as fixing a bug or adding a new featu

installing_a_development_environment
code_style
using_git
using_git
contribution_credits
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
handle\_open\_docs
==================

.. currentmodule:: hdf5view.mainwindow

.. automethod:: MainWindow.handle_open_docs
3 changes: 3 additions & 0 deletions docs/reference/generated/hdf5view.mainwindow.MainWindow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@
MainWindow.handle_open_about


MainWindow.handle_open_docs


MainWindow.handle_open_file


Expand Down
2 changes: 1 addition & 1 deletion src/hdf5view/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""hdf5view: a simple viewer for HDF5 files."""

__version__ = "0.2.0"
__version__ = "0.2.1"
15 changes: 13 additions & 2 deletions src/hdf5view/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

import os
from datetime import datetime

import h5py
from qtpy import API_NAME
Expand Down Expand Up @@ -404,12 +405,22 @@ def handle_open_prefs(self):

def handle_open_about(self):
"""Show the about dialog."""
y = datetime.now().year
url1 = "https://github.com/tgwoodcock/hdf5view/graphs/contributors"
url2 = "https://github.com/tgwoodcock/hdf5view/blob/main/LICENSE"
url3 = "https://github.com/tgwoodcock/hdf5view/blob/main/CITATION.cff"
url4 = "https://github.com/tgwoodcock/hdf5view"
s1 = "The hdf5view Developers"
s2 = "Distributed under the terms of the"
QMessageBox.about(
self,
f"About {WINDOW_TITLE}",
(
f"<p>HDF5View {__version__}</p>"
"<p>Copyright(c) 2019 - Martin Swarbrick</p>"
f"<p>hdf5view {__version__}</p>"
f"<p>Copyright(c) 2019-{y} <a href={url1}>{s1}</a></p>"
f"<p>{s2} <a href={url2}>MIT License</a></p>"
f"<p>Citation metadata: <a href={url3}>CITATION.cff</a></p>"
f"<p>Source code: <a href={url4}>github repository</a></p>"
),
)

Expand Down