Skip to content
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
2 changes: 2 additions & 0 deletions .codespell/ignore_lines.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
;; Please include filenames and explanations for each ignored line.
;; See https://docs.openverse.org/meta/codespell.html for docs.
8 changes: 8 additions & 0 deletions .codespell/ignore_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
;; Please include explanations for each ignored word (lowercase).
;; See https://docs.openverse.org/meta/codespell.html for docs.

;; abbreviation for "materials" often used in a journal title
mater

;; Frobenius norm used in np.linalg.norm
fro
13 changes: 13 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# As of now, flake8 does not natively support configuration via pyproject.toml
# https://github.com/microsoft/vscode-flake8/issues/135
[flake8]
exclude =
.git,
__pycache__,
build,
dist,
docs/source/conf.py
max-line-length = 79
# Ignore some style 'errors' produced while formatting by 'black'
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
extend-ignore = E203
5 changes: 5 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[settings]
# Keep import statement below line_length character limit
line_length = 79
multi_line_output = 3
include_trailing_comma = True
66 changes: 66 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
default_language_version:
python: python3
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit hooks
autofix_prs: true
autoupdate_branch: "pre-commit-autoupdate"
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: monthly
skip: [no-commit-to-branch]
submodules: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: no-commit-to-branch
name: Prevent Commit to Main Branch
args: ["--branch", "main"]
stages: [pre-commit]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies:
- tomli
# prettier - multi formatter for .json, .yml, and .md files
- repo: https://github.com/pre-commit/mirrors-prettier
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies:
- "prettier@^3.2.4"
# docformatter - PEP 257 compliant docstring formatter
- repo: https://github.com/s-weigand/docformatter
rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [--in-place, --config, ./pyproject.toml]
4 changes: 2 additions & 2 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ This code is developed by:

Xiaohao Yang

This code was developed as part of the xPDFsuite project to create software
and tools for general researchers to use PDF in their work. For more
This code was developed as part of the xPDFsuite project to create software
and tools for general researchers to use PDF in their work. For more
information on the DiffPy project email sb2896@columbia.edu
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ INSTALLATION
------------------------------------------------------------------------

We are going to release conda package for all platform. For general user
please use the installation file and install software. For developor,
please use the installation file and install software. For developor,
you can install dpx.confutils using

python setup.py install
Note: the dependency is not specified in the setup.py. You need to install
them yourself. You can use Anaconda or other python enviroment.

Note: the dependency is not specified in the setup.py. You need to install
them yourself. You can use Anaconda or other python enviroment.


CONTACTS
Expand All @@ -33,4 +33,4 @@ For more information on diffpy.Structure please visit the project web-page

http://www.diffpy.org/

or email Prof. Simon Billinge at sb2896@columbia.edu.
or email Prof. Simon Billinge at sb2896@columbia.edu.
2 changes: 1 addition & 1 deletion requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy
configparser
traits
traitsui
traitsui
7 changes: 2 additions & 5 deletions src/diffpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
# See LICENSENOTICE.txt for license information.
#
##############################################################################
"""Blank namespace package."""

"""
Blank namespace package.
"""

__import__('pkg_resources').declare_namespace(__name__)
__import__("pkg_resources").declare_namespace(__name__)

# End of file
11 changes: 7 additions & 4 deletions src/diffpy/srxconfutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@
#
##############################################################################

# some convenience imports
from diffpy.srxconfutils.config import ConfigBase

# package version
from diffpy.srxconfutils.version import __version__

# some convenience imports
from diffpy.srxconfutils.config import ConfigBase, ConfigBase

# unit tests
def test():
'''Execute all unit tests for the diffpy.pdfgetx package.
"""Execute all unit tests for the diffpy.pdfgetx package.

Return a unittest TestResult object.
'''
"""
from dpx.confutils.tests import test

return test()


Expand Down
Loading