Skip to content

Commit

Permalink
Merge branch 'v0.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
csadorf committed Dec 15, 2016
2 parents cb2b5c8 + 4200af4 commit 59f95ea
Show file tree
Hide file tree
Showing 9 changed files with 114 additions and 26 deletions.
8 changes: 8 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.6.2:

- Add instructions on how to acknowledge signac in publications to
documentation.
- Add cite module for the auto-generation of formatted references and
BibTeX entries.
- Remove SSL authentication support.

0.6.1:

- Bug Fixes:
Expand Down
19 changes: 19 additions & 0 deletions doc/acknowledge.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. _acknowledge:

==================
How to cite signac
==================

Please acknowledge the use of this software within the body of your publication for example by copying or adapting the following formulation:

*The computational workflow in general and data management in particular for this publication was primarily supported by the signac data management framework [1, 2].*

[1] Carl S. Adorf, Paul M. Dodd, and Sharon C. Glotzer. *signac - A Simple Data Management Framework*. 2016. arXiv: 1611.03543 [cs.DB].

[2] Carl S. Adorf and Paul M. Dodd. *csadorf/signac: v0.6.1*. Dec. 2016. DOI:10.5281/zenodo.192108. URL: https://doi.org/10.5821/zenodo.192108.

References for a specific release versions can be found `here <https://zenodo.org/badge/latestdoi/72946496>`_.

.. tip::

You can auto-generate the first formatted reference and the corresponding BibTeX file via :py:func:`signac.cite.reference` and :py:func:`signac.cite.bibtex`.
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def __getattr__(cls, name):
# The short X.Y version.
version = '0.6'
# The full version, including alpha/beta/rc tags.
release = '0.6.1'
release = '0.6.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
13 changes: 13 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
Welcome to signac's documentation!
==================================

.. image:: https://zenodo.org/badge/72946496.svg
:target: https://zenodo.org/badge/latestdoi/72946496

.. image:: http://mybinder.org/badge.svg
:target: http://www.mybinder.org:/repo/csadorf/signac-examples

.. image:: https://img.shields.io/pypi/v/signac.svg
:target: https://img.shields.io/pypi/v/signac.svg

.. image:: images/minimal.svg
:align: right

Expand All @@ -31,6 +40,9 @@ Contents
:ref:`quickreference`
Brief overview of the core functions, to serve as reference.

:ref:`acknowledge`
Instructions on how to acknowledge this software in publications.

:ref:`api`
The complete API reference.

Expand All @@ -51,6 +63,7 @@ Please use the `repository's issue tracker <https://bitbucket.org/glotzer/signac
tutorial
guide
reference
acknowledge
signac

Indices and tables
Expand Down
3 changes: 3 additions & 0 deletions doc/signac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Module contents
:show-inheritance:


.. automodule:: signac.cite
:members:

Subpackages
-----------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='signac',
version='0.6.1',
version='0.6.2',
packages=find_packages(),
zip_safe=True,

Expand Down
6 changes: 4 additions & 2 deletions signac/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
from . import contrib
from . import db
from . import gui
from . common import errors
from . import cite
from .common import errors
from .contrib import Project
from .contrib import get_project
from .contrib import init_project
Expand All @@ -27,9 +28,10 @@
from .contrib import filesystems as fs
from .db import get_database

__version__ = '0.6.1'
__version__ = '0.6.2'

__all__ = ['__version__', 'contrib', 'db', 'gui', 'errors',
'cite',
'Project', 'get_project', 'init_project',
'get_database', 'fetch', 'fetch_one',
'export_one', 'export', 'export_to_mirror',
Expand Down
65 changes: 65 additions & 0 deletions signac/cite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright (c) 2016 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
"""Functions to support citing this software."""
import sys


ARXIV_BIBTEX = """@online{signac,
author = {Carl S. Adorf and Paul M. Dodd and Sharon C. Glotzer},
title = {signac - A Simple Data Management Framework},
year = {2016},
eprinttype = {arxiv},
eprintclass = {cs.DB},
eprint = {1611.03543}
}
"""


ARXIV_REFERENCE = "Carl S. Adorf, Paul M. Dodd, and Sharon C. Glotzer. signac - A SimpleData Management Framework. 2016. arXiv:1611.03543 [cs.DB]"


def bibtex(file=None):
"""Generate bibtex entries for signac.
The bibtex entries will be printed to screen unless a
filename or a file-like object are provided, in which
case they will be written to the corresponding file.
.. note::
A full reference should also include the
version of this software. Please refer to the
documentation on how to cite a specific version.
:param file: A str or file-like object.
Defaults to sys.stdout.
"""
if file is None:
file = sys.stdout
elif isinstance(file, str):
file = open(file, 'w')
file.write(ARXIV_BIBTEX)


def reference(file=None):
"""Generate formatted reference entries for signac.
The references will be printed to screen unless a
filename or a file-like object are provided, in which
case they will be written to the corresponding file.
.. note::
A full reference should also include the
version of this software. Please refer to the
documentation on how to cite a specific version.
:param file: A str or file-like object.
Defaults to sys.stdout.
"""
if file is None:
file = sys.stdout
elif isinstance(file, str):
file = open(file, 'w')
file.write(ARXIV_REFERENCE + '\n')
22 changes: 0 additions & 22 deletions signac/common/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This software is licensed under the BSD 3-Clause License.
import subprocess
import logging
import ssl
from os.path import expanduser

import pymongo
Expand All @@ -17,11 +16,6 @@
AUTH_SCRAM_SHA_1 = 'SCRAM-SHA-1'
AUTH_SSL = 'SSL'
AUTH_SSL_x509 = 'SSL-x509'
SSL_CERT_REQS = {
'none': ssl.CERT_NONE,
'optional': ssl.CERT_OPTIONAL,
'required': ssl.CERT_REQUIRED
}


def get_subject_from_certificate(fn_certificate): # pragma no cover
Expand Down Expand Up @@ -89,22 +83,6 @@ def _connect_pymongo3(self, host):
pymongo.read_preferences.ReadPreference,
self._config_get('read_preference', 'PRIMARY')),
** parameters)
elif auth_mechanism in (AUTH_SSL, AUTH_SSL_x509): # pragma no cover
# currently not officially supported
client = pymongo.MongoClient(
host,
ssl=True,
ssl_keyfile=expanduser(
self._config_get_required('ssl_keyfile')),
ssl_certfile=expanduser(
self._config_get_required('ssl_certfile')),
ssl_cert_reqs=SSL_CERT_REQS[
self._config_get('ssl_cert_reqs', 'required')],
ssl_ca_certs=expanduser(
self._config_get_required('ssl_ca_certs')),
ssl_match_hostname=self._config_get(
'ssl_match_hostname', True),
** parameters)
else:
raise_unsupported_auth_mechanism(auth_mechanism)
self._client = client
Expand Down

0 comments on commit 59f95ea

Please sign in to comment.