Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
csadorf committed May 19, 2019
2 parents e531625 + afb5a3f commit cbe589d
Show file tree
Hide file tree
Showing 17 changed files with 346 additions and 52 deletions.
8 changes: 6 additions & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
current_version = 1.0.0
current_version = 1.1.0
commit = True
tag = True
tag = False
message = Bump up to version {new_version}.

[bumpversion:file:setup.py]
Expand All @@ -10,3 +10,7 @@ message = Bump up to version {new_version}.

[bumpversion:file:doc/conf.py]

[bumpversion:file:CITATION.cff]

[bumpversion:file:.zenodo.json]

8 changes: 0 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ jobs:
<<: *test-template
docker:
- image: circleci/python:3.5
test-3.4:
<<: *test-template
docker:
- image: circleci/python:3.4
test-2.7:
<<: *test-template
docker:
Expand Down Expand Up @@ -159,9 +155,6 @@ workflows:
- test-2.7:
requires:
- style-check
- test-3.4:
requires:
- style-check
- test-3.5:
requires:
- style-check
Expand All @@ -187,7 +180,6 @@ workflows:
only: /release\/.*/
requires:
- test-2.7
- test-3.4
- test-3.5
- test-3.6
- test-3.7
Expand Down
87 changes: 87 additions & 0 deletions .sync-zenodo-metadata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/usr/bin/env python
"""Synchronize authors and contributor metadata.
This script synchronizes the metadata provided in the CITATION.cff and
the contributors.yaml file with the metadata stored in the .zenodo.json
file.
All authors should be listed in the CITATION.cff file, while contributors
should be listed in the contributors.yaml file.
Both files use the [citation file-format][1] for [person objects][2].
[1] https://citation-file-format.github.io/
[2] https://citation-file-format.github.io/1.0.3/specifications/#/person-objects
"""
from dataclasses import dataclass

import click
import json
from ruamel.yaml import load, Loader


@dataclass
class Contributor:
last_names: str
first_names: str
affiliation: str
orcid: str = None

@classmethod
def from_citation_author(cls, **citation):
return cls(
last_names=citation.pop('family-names'),
first_names=citation.pop('given-names'),
**citation)

def as_zenodo_creator(self):
ret = dict(
name='{} {}'.format(self.first_names, self.last_names),
affiliation=self.affiliation)
if self.orcid:
ret['orcid'] = self.orcid.lstrip('https://orcid.org/')
return ret


@click.command()
@click.pass_context
@click.option('--check', default=False, is_flag=True,
help="Return with non-zero exit code if metadata needs to be updated.")
@click.option('-i', '--in-place', type=bool, is_flag=True,
help="Modify metadata in place.")
def sync(ctx, in_place=False, check=True):

with open('CITATION.cff', 'rb') as file:
citation = load(file.read(), Loader=Loader)
authors = [
Contributor.from_citation_author(**author)
for author in citation['authors']]

with open('contributors.yaml', 'rb') as file:
contributors = load(file.read(), Loader=Loader)['contributors']
contributors = [Contributor.from_citation_author(
**contributor) for contributor in contributors]

with open('.zenodo.json', 'rb') as file:
zenodo = json.loads(file.read())
zenodo_updated = zenodo.copy()
zenodo_updated['creators'] = [a.as_zenodo_creator() for a in authors]
zenodo_updated['contributors'] = [c.as_zenodo_creator()
for c in contributors if c not in authors]
for key in ('version', 'keywords'):
zenodo_updated[key] = citation[key]

modified = json.dumps(zenodo, sort_keys=True) != json.dumps(zenodo_updated, sort_keys=True)
if modified:
if in_place:
with open('.zenodo.json', 'wb') as file:
file.write(json.dumps(zenodo_updated, indent=4, sort_keys=True).encode('utf-8'))
else:
click.echo(json.dumps(zenodo_updated, indent=4, sort_keys=True))
if check:
ctx.exit(1)
else:
click.echo("No changes.", err=True)


if __name__ == '__main__':
sync()
76 changes: 55 additions & 21 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,78 @@
{
"description": "<p>The signac framework aids in the management of large and heterogeneous data spaces. It provides a simple and robust data model to create a well-defined indexable storage layout for data and metadata. This makes it easier to operate on large data spaces, streamlines post-processing and analysis and makes data collectively accessible.</p>",
"license": "BSD-3-Clause",
"upload_type": "software",
"creators": [
"contributors": [
{
"affiliation": "University of Michigan",
"name": "Carl S. Adorf"
"name": "Benjamin Swerdlow",
"orcid": "0000-0001-6240-1430"
},
{
"affiliation": "University of Michigan",
"name": "Paul M. Dodd"
"name": "Jens Glaser",
"orcid": "0000-0003-1852-3849"
},
{
"affiliation": "University of Michigan",
"name": "Vyas Ramasubramani"
"name": "Timothy Moore",
"orcid": "0000-0002-5709-7259"
},
{
"affiliation": "University of Michigan",
"name": "Benjamin Swerdlow"
"name": "Yuan Zhou"
},
{
"affiliation": "University of Michigan",
"name": "Jens Glaser"
"affiliation": "Air Force Science and Technology Fellowship Program",
"name": "Eric Harper",
"orcid": "0000-0002-7058-1686"
},
{
"affiliation": "University of Michigan",
"name": "Bradley Dice"
"name": "Kelly Wang"
}
],
"access_right": "open",
"related_identifiers": [
"creators": [
{
"affiliation": "University of Michigan",
"name": "Carl Simon Adorf",
"orcid": "0000-0003-4962-2495"
},
{
"affiliation": "University of Michigan",
"name": "Vyas Ramasubramani",
"orcid": "0000-0001-5181-9532"
},
{
"scheme": "url",
"identifier": "https://dx.doi.org/10.1016/j.commatsci.2018.01.035",
"relation": "isSupplementedBy"
"affiliation": "University of Michigan",
"name": "Bradley D. Dice",
"orcid": "0000-0002-9983-0770"
},
{
"affiliation": "Boise State University",
"name": "Mike Henry",
"orcid": "0000-0002-3870-9993"
},
{
"affiliation": "University of Michigan",
"name": "Paul M. Dodd"
},
{
"scheme": "url",
"identifier": "arXiv://1611.03543 [cs.DB]",
"relation": "isSupplementedBy"
"affiliation": "University of Michigan",
"name": "Sharon C. Glotzer",
"orcid": "0000-0002-7197-0085"
}
]
}
],
"description": "The signac framework helps users manage and scale file-based workflows, facilitating data reuse, sharing, and reproducibility.\n\nIt provides a simple and robust data model to create a well-defined indexable storage layout for data and metadata. This makes it easier to operate on large data spaces, streamlines post-processing and analysis and makes data collectively accessible.",
"doi": "10.5281/zenodo.2581327",
"keywords": [
"python",
"data management",
"reproducibility",
"sharability",
"workflow",
"scientific computing"
],
"license": {
"id": "http://www.opensource.org/licenses/BSD-3-Clause"
},
"title": "signac",
"version": "1.1.0"
}
87 changes: 87 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# YAML 1.2
---
cff-version: "1.0.3"
title: signac
version: 1.1.0
abstract: |
The signac framework helps users manage and scale file-based workflows, facilitating data
reuse, sharing, and reproducibility. It provides a simple and robust data model to create
a well-defined indexable storage layout for data and metadata. This makes it easier to
operate on large data spaces, streamlines post-processing and analysis and makes data
collectively accessible.
doi: 10.5281/zenodo.2581327
authors:
-
family-names: Adorf
given-names: "Carl Simon"
affiliation: "University of Michigan"
orcid: "https://orcid.org/0000-0003-4962-2495"
-
family-names: Ramasubramani
given-names: Vyas
affiliation: "University of Michigan"
orcid: "https://orcid.org/0000-0001-5181-9532"
-
family-names: Dice
given-names: "Bradley D."
affiliation: "University of Michigan"
orcid: "https://orcid.org/0000-0002-9983-0770"
-
family-names: Henry
given-names: Mike
affiliation: "Boise State University"
orcid: "https://orcid.org/0000-0002-3870-9993"
-
family-names: Dodd
given-names: "Paul M."
affiliation: "University of Michigan"
-
family-names: Glotzer
given-names: "Sharon C."
affiliation: "University of Michigan"
orcid: "https://orcid.org/0000-0002-7197-0085"
keywords:
- python
- "data management"
- reproducibility
- sharability
- workflow
- "scientific computing"
license: "http://www.opensource.org/licenses/BSD-3-Clause"
message: >
Development and deployment supported by MICCoM, as part of the Computational
Materials Sciences Program funded by the U.S. Department of Energy, Office of
Science, Basic Energy Sciences, Materials Sciences and Engineering Division,
under Subcontract No. 6F-30844. Project conceptualization and implementation
supported by the National Science Foundation, Award # DMR 1409620.
repository-code: https://github.com/glotzerlab/signac
references:
- type: article
- authors:
-
family-names: Adorf
given-names: "Carl Simon"
affiliation: "University of Michigan"
orcid: "https://orcid.org/0000-0003-4962-2495"
-
family-names: Dodd
given-names: "Paul M."
affiliation: "University of Michigan"
-
family-names: Ramasubramani
given-names: Vyas
affiliation: "University of Michigan"
orcid: "https://orcid.org/0000-0001-5181-9532"
-
family-names: Glotzer
given-names: "Sharon C."
affiliation: "University of Michigan"
orcid: "https://orcid.org/0000-0002-7197-0085"
- title: "Simple data and workflow management with the signac framework"
- journal: "Comput. Mater. Sci."
- volume: 146
- number: C
- year: 2018
- pages: 9
- doi: "10.1016/j.commatsci.2018.01.035"
...
21 changes: 17 additions & 4 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,28 @@ Highlights
- Projects and job search results are displayed nicely in Jupyter Notebooks.
- Support for compressed Collection files.

next
----

[1.1.0] -- 2019-05-19
---------------------

Added
+++++

- Add command line options ``--sp`` and ``--doc`` for ``signac find`` that allow users to display key-value pairs of the state point and document in combination with the job id (#97, #146).
- Improve the representation (return value of `repr()`) of instances of ``H5Group`` and ``SyncedAttrDict``.

Fixed
+++++
- Fix: Searches for whole numbers will match all numerically matching integers regardless of whether they are stored as decimals or whole numbers (#169).
- Fix: Passing an instance of dict to `H5Store.setdefault()` will return an instance of `H5Group` instead of a dict (#180).
- Improve the representation (return value of `repr()`) of instances of `H5Group`.
- Improve the representation (return value of `repr()`) of instances of `SyncedAttrDict`.
- Fix error with storing numpy arrays and scalars in a synced dictionary (e.g. `job.statepoint`, `job.document`) (#184).
- Fix issue with ``ResourceWarning`` originating from unclosed instance of ``Collection`` (#186).
- Fix issue with using the ``get_project()`` function with a relative path and ``search=False`` (#191).

Removed
+++++++

- Support for Python version 3.4 (no longer tested).


[1.0.0] -- 2019-02-28
Expand Down
10 changes: 0 additions & 10 deletions contributors.txt

This file was deleted.

0 comments on commit cbe589d

Please sign in to comment.