diff --git a/.flake8 b/.flake8 index 92c9bb29..0b351c04 100644 --- a/.flake8 +++ b/.flake8 @@ -8,5 +8,6 @@ exclude = labpdfproc/_version.py, doc/manual/source/conf.py max-line-length = 115 -# Ignore some style 'errors' produced while formatting by 'black' -ignore = W503 +# Ignore some style 'errors' produced while formatting by 'black' (see link below) +# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings +extend-ignore = E203 diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh deleted file mode 100644 index b7920393..00000000 --- a/conda-recipe/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml deleted file mode 100644 index 750beada..00000000 --- a/conda-recipe/meta.yaml +++ /dev/null @@ -1,64 +0,0 @@ -{% set setupdata = load_setup_py_data() %} - -package: - name: diffpy.utils - version: {{ setupdata['version'] }} - -source: - # git_url: https://github.com/diffpy/diffpy.utils - git_url: .. - -build: - preserve_egg_dir: True - noarch: python - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 0 - -requirements: - host: - - pip - - build: - - python >=3.5|2.7.* - - setuptools - - run: - - python >=3.5|2.7.* - - setuptools - - numpy >=1.3 - - test: - - python >=3.5|2.7.* - - setuptools - - numpy >=1.3 - - pytest - -test: - # Put any additional test requirements here - requires: - - pytest - - # Python imports - imports: - - diffpy - - diffpy.utils - - diffpy.utils.parsers - - diffpy.utils.tests - - commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - -about: - home: https://github.com/diffpy/diffpy.utils - summary: Shared utilities for diffpy packages. - license: Modified BSD License - license_file: LICENSE.txt - -# See http://docs.continuum.io/conda/build.html -# for more information about meta.yaml. diff --git a/conda-recipe/run_test.py b/conda-recipe/run_test.py deleted file mode 100644 index 946a0960..00000000 --- a/conda-recipe/run_test.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python - -import pathlib -import sys - -import diffpy.utils.tests - -sys.path.append((pathlib.Path.cwd().parent.absolute() / "src").as_posix()) - - -assert diffpy.utils.tests.test().wasSuccessful() diff --git a/src/diffpy/utils/tests/test_diffraction_objects.py b/src/diffpy/utils/tests/test_diffraction_objects.py index 7802b1d3..fa613a53 100644 --- a/src/diffpy/utils/tests/test_diffraction_objects.py +++ b/src/diffpy/utils/tests/test_diffraction_objects.py @@ -249,12 +249,17 @@ def test_dump(tmp_path, mocker): expected = ( "[Diffraction_object]\nname = test\nwavelength = 1.54\nscat_quantity = x-ray\nthing1 = 1\n" "thing2 = thing2\npackage_info = {'package2': '3.4.5', 'diffpy.utils': '3.3.0'}\n" - "creation_time = 2012-01-14 00:00:00\n\n#### start data\n0.000000000000000000e+00 0.000000000000000000e+00\n" - "1.000000000000000000e+00 1.000000000000000000e+00\n2.000000000000000000e+00 2.000000000000000000e+00\n" - "3.000000000000000000e+00 3.000000000000000000e+00\n4.000000000000000000e+00 4.000000000000000000e+00\n" + "creation_time = 2012-01-14 00:00:00\n\n" + "#### start data\n0.000000000000000000e+00 0.000000000000000000e+00\n" + "1.000000000000000000e+00 1.000000000000000000e+00\n" + "2.000000000000000000e+00 2.000000000000000000e+00\n" + "3.000000000000000000e+00 3.000000000000000000e+00\n" + "4.000000000000000000e+00 4.000000000000000000e+00\n" "5.000000000000000000e+00 5.000000000000000000e+00\n" - "6.000000000000000000e+00 6.000000000000000000e+00\n7.000000000000000000e+00 7.000000000000000000e+00\n" - "8.000000000000000000e+00 8.000000000000000000e+00\n9.000000000000000000e+00 9.000000000000000000e+00\n" + "6.000000000000000000e+00 6.000000000000000000e+00\n" + "7.000000000000000000e+00 7.000000000000000000e+00\n" + "8.000000000000000000e+00 8.000000000000000000e+00\n" + "9.000000000000000000e+00 9.000000000000000000e+00\n" "1.000000000000000000e+01 1.000000000000000000e+01\n" ) assert actual == expected