Skip to content

Commit

Permalink
Added Black badges, updated contribution guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
lauri-codes committed Feb 21, 2021
1 parent 23a76fb commit a69f8f3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://dev.azure.com/laurihimanen/DScribe%20CI/_apis/build/status/SINGROUP.dscribe?branchName=master)](https://dev.azure.com/laurihimanen/DScribe%20CI/_build/latest?definitionId=1&branchName=master)
[![Coverage Status](https://coveralls.io/repos/github/SINGROUP/dscribe/badge.svg?branch=master)](https://coveralls.io/github/SINGROUP/dscribe?branch=master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

DScribe is a python package for creating machine learning descriptors for
atomistic systems.
Expand Down
19 changes: 7 additions & 12 deletions docs/src/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,13 @@ implementation to DScribe:

Code style guideline
--------------------
- The code is designed to run on Python 3 only from version 0.2.8 onwards.
- The code style is guided by PEP 8, but ignoring the following:

- E123: Closing bracket does not match indentation of opening bracket’s line
- E124: Closing bracket does not match visual indentation
- E126: Continuation line over-indented for hanging indent
- E128: Continuation line under-indented for visual indent
- E226: Missing whitespace around operator
- E501: Line too long (82 > 79 characters)
- E401: Module level import not at top of file

- Spaces over tabs. The indent size is 4 spaces.
- We follow the `Black code style
<https://black.readthedocs.io/en/stable/?badge=stable>`_,
which is a PEP 8 compliant. The good thing about Black is that you can
simply run the autoformatter to ensure that you fullfill the code style.
Before committing (or using pre-commit hooks), you should simply run the
automatic formatting. Any unformatted code will be caught by the style
checks in CI.
- Classes and functions should be documented by following the `Google style guide
<http://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings>`_
that can be interpreted by the `sphinx Napoleon-extension
Expand Down
3 changes: 3 additions & 0 deletions docs/src/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ DScribe
.. image:: https://coveralls.io/repos/github/SINGROUP/dscribe/badge.svg?branch=master
:target: https://coveralls.io/github/SINGROUP/dscribe?branch=master

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

DScribe is a Python package for transforming atomic structures into fixed-size
numerical fingerprints. These fingerprints are often called "descriptors" and
they can be used in various tasks, including machine learning, visualization,
Expand Down

0 comments on commit a69f8f3

Please sign in to comment.