From da7d573b575609f04e8ce4d093ccf389261492b7 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Thu, 19 Oct 2023 00:14:57 +0100 Subject: [PATCH] Refresh infra-structure and support cython 3.x --- .git_archival.txt | 4 + .gitattributes | 1 + .github/dependabot.yml | 14 ++ .github/workflows/ci-manifest.yml | 42 +++++ .gitignore | 165 +++++++++++++++++- .pre-commit-config.yaml | 53 ++++++ .travis.yml | 47 ----- INSTALL | 34 ---- MANIFEST.in | 9 + README.md | 17 +- pyproject.toml | 81 +++++++++ requirements/mo_pack.yml | 22 +++ setup.py | 78 ++++----- {lib => src}/mo_pack/__init__.py | 7 +- {lib => src}/mo_pack/_packing.pyx | 7 +- {lib => src}/mo_pack/tests/__init__.py | 2 - .../mo_pack/tests/test_compress_rle.py | 2 - .../test_data/nae.20100104-06_0001_0001.pp | Bin .../mo_pack/tests/test_decompress_rle.py | 2 - {lib => src}/mo_pack/tests/test_rle.py | 2 - {lib => src}/mo_pack/tests/test_wgdos.py | 2 - 21 files changed, 440 insertions(+), 151 deletions(-) create mode 100644 .git_archival.txt create mode 100644 .gitattributes create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci-manifest.yml create mode 100644 .pre-commit-config.yaml delete mode 100644 .travis.yml delete mode 100644 INSTALL create mode 100644 MANIFEST.in create mode 100644 pyproject.toml create mode 100644 requirements/mo_pack.yml rename {lib => src}/mo_pack/__init__.py (72%) rename {lib => src}/mo_pack/_packing.pyx (98%) rename {lib => src}/mo_pack/tests/__init__.py (75%) rename {lib => src}/mo_pack/tests/test_compress_rle.py (95%) rename {lib => src}/mo_pack/tests/test_data/nae.20100104-06_0001_0001.pp (100%) rename {lib => src}/mo_pack/tests/test_decompress_rle.py (96%) rename {lib => src}/mo_pack/tests/test_rle.py (94%) rename {lib => src}/mo_pack/tests/test_wgdos.py (98%) diff --git a/.git_archival.txt b/.git_archival.txt new file mode 100644 index 0000000..8fb235d --- /dev/null +++ b/.git_archival.txt @@ -0,0 +1,4 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$ +ref-names: $Format:%D$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..00a7b00 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.git_archival.txt export-subst diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7ed85fc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +# Reference: +# - https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot + +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "daily" + labels: + - "new: pull request" + - "bot" diff --git a/.github/workflows/ci-manifest.yml b/.github/workflows/ci-manifest.yml new file mode 100644 index 0000000..16cbbe1 --- /dev/null +++ b/.github/workflows/ci-manifest.yml @@ -0,0 +1,42 @@ +# Reference: +# - https://github.com/actions/checkout + +name: ci-manifest + +on: + pull_request: + + push: + branches: + - "main" + - "v*x" + - "!conda-lock-auto-update" + - "!pre-commit-ci-update-config" + - "!dependabot/*" + tags: + - "v*" + + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + manifest: + name: "check-manifest" + + runs-on: ubuntu-latest + + defaults: + run: + shell: bash -l {0} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: "check-manifest" + run: | + pipx run check-manifest diff --git a/.gitignore b/.gitignore index 3c4f2ce..9a7fea3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,166 @@ -*.pyc +# Reference https://github.com/github/gitignore/blob/main/Python.gitignore +# setuptools-scm +_version.py + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.c +*.so + +# Distribution / packaging +.Python build/ +develop-eggs/ dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ -lib/mo_pack.egg-info/ +# Cython debug symbols +cython_debug/ -lib/mo_pack/_packing.c -lib/mo_pack/_packing*.so +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..cad124f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,53 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +# See https://pre-commit.ci/#configuration + +ci: + autofix_prs: false +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: "v4.5.0" + hooks: + # Prevent giant files from being committed. + - id: check-added-large-files + # Check whether files parse as valid Python. + - id: check-ast + # Check for file name conflicts on case-insensitive file-systems. + - id: check-case-conflict + # Check for files that contain merge conflict strings. + - id: check-merge-conflict + # Check for debugger imports and py37+ `breakpoint()` calls in Python source. + - id: debug-statements + # Check TOML file syntax. + - id: check-toml + # Check YAML file syntax. + - id: check-yaml + # Makes sure files end in a newline and only a newline + - id: end-of-file-fixer + exclude: nae.20100104-06_0001_0001.pp + # Replaces or checks mixed line ending + - id: mixed-line-ending + exclude: nae.20100104-06_0001_0001.pp + # Don't commit to main branch. + #- id: no-commit-to-branch + # Trims trailing whitespace + - id: trailing-whitespace + exclude: nae.20100104-06_0001_0001.pp + + - repo: https://github.com/codespell-project/codespell + rev: "v2.2.6" + hooks: + - id: codespell + types_or: [python, markdown] + additional_dependencies: [tomli] + + - repo: https://github.com/aio-libs/sort-all + rev: "v1.2.0" + hooks: + - id: sort-all + types: [file, python] + + - repo: https://github.com/abravalheri/validate-pyproject + rev: "v0.15" + hooks: + - id: validate-pyproject diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 039fdbd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ -language: python - -python: - # This is not actually used. Instead, we use miniconda. - - 2.7 - - 3.3 - - 3.4 - -sudo: false - -install: - # Install miniconda - # ----------------- - - if [[ "$TRAVIS_PYTHON_VERSION" == 2* ]]; then - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; - else - wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - fi - - bash miniconda.sh -b -p $HOME/miniconda - - export PATH="$HOME/miniconda/bin:$PATH" - - # Create the basic testing environment - # ------------------------------------ - - conda config --set always_yes yes --set changeps1 no --set show_channel_urls yes - - conda update conda - - conda create -n test-environment python=$TRAVIS_PYTHON_VERSION - - source activate test-environment - - # Customise the testing environment - # --------------------------------- - - conda config --add channels scitools - - conda install cython libmo_unpack>=3 nose numpy - - # Conda debug - # ----------- - - conda list - - # Install mo_pack - # --------------- - - CFLAGS=-I$HOME/miniconda/envs/test-environment/include - LDFLAGS=-L$HOME/miniconda/envs/test-environment/lib - python setup.py install - -script: - - mkdir ../test_folder - - cd ../test_folder - - nosetests --with-doctest -sv mo_pack diff --git a/INSTALL b/INSTALL deleted file mode 100644 index beb409c..0000000 --- a/INSTALL +++ /dev/null @@ -1,34 +0,0 @@ -mo_pack can be installed using conda, or from downloaded source code. - - -Using conda ------------ -mo_pack is available from the conda channel "scitools". - -Builds are provided for the following platforms: - * Linux 64-bit, - * Mac OSX 64-bit -and for various different release versions of Python and numpy. - -Once conda is installed, use the following command to install mo_pack: - conda install -c scitools mo_pack -This will *also* install libmo_unpack, as a required dependency. - -To install using conda, you must first download and install conda, -for example from http://conda.pydata.org/miniconda.html. -Further documentation on using conda and the features it provides can be found -at http://conda.pydata.org/docs/intro.html. - - -Installing from source ----------------------- -The wrapped library, "libmo_unpack", must be installed first. -See : https://github.com/SciTools/libmo_unpack. - -The basic build requirement is to run : "python2.7 setup.py build_ext" -The higher-level "build" or "install" commands will also invoke this. - -The 'build_ext' step requires you to specify the correct paths to the -headers, build-time and run-time location of the libmo_unpack shared library. -This will look something like: - $ python setup.py build_ext -I -L -R diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..e4581e4 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,9 @@ +prune .github +prune requirements +recursive-include src *.py *.pyx + +include .git_archival.txt +include .gitattributes +exclude .gitignore +exclude .pre-commit-config.yaml +include *.md diff --git a/README.md b/README.md index c307c75..5064a58 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,18 @@ # mo_pack -A python module containing packing methods used to encode and decode the data payloads of UM "fields". +| | | +|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ⚙️ CI | [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/SciTools/mo_pack/main.svg)](https://results.pre-commit.ci/latest/github/SciTools/mo_pack/main) | +| ✨ Meta | [![NEP29](https://raster.shields.io/badge/follows-NEP29-orange.png)](https://numpy.org/neps/nep-0029-deprecation_policy.html) [![license - bds-3-clause](https://img.shields.io/github/license/SciTools/mo_pack)](https://github.com/SciTools/mo_pack/blob/main/LICENSE) | +| 📦 Package | [![conda-forge](https://img.shields.io/conda/vn/conda-forge/mo_pack?color=orange&label=conda-forge&logo=conda-forge&logoColor=white)](https://anaconda.org/conda-forge/mo_pack) | +| 🧰 Repo | [![commits-since](https://img.shields.io/github/commits-since/SciTools/mo_pack/latest.svg)](https://github.com/SciTools/mo_pack/commits/main) [![contributors](https://img.shields.io/github/contributors/SciTools/mo_pack)](https://github.com/SciTools/mo_pack/graphs/contributors) [![release](https://img.shields.io/github/v/release/SciTools/mo_pack)](https://github.com/SciTools/mo_pack/releases) | +| | -Supports WGDOS and RLE encoding methods. +Provides Python bindings to the C library [libmo_unpack](https://github.com/SciTools/libmo_unpack) which contains packing methods used to encode and decode the data payloads of Met Office UM Post-Processing and Fields files. -This is a wrapper to the C library "libmo_unpack", which must also be installed. -See at : https://github.com/SciTools/libmo_unpack. +Supports both **WGDOS** and **RLE** encoding methods. -[![Build Status](https://secure.travis-ci.org/SciTools/mo_pack.png)](http://travis-ci.org/SciTools/mo_pack) +## License + +`mo_pack` is distributed under the terms of the [BSD-3-Clause](https://spdx.org/licenses/BSD-3-Clause.html) license. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8c57577 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,81 @@ +[build-system] +# defined by PEP-518 +requires = [ + "Cython>=3", + "oldest-supported-numpy", + "setuptools>=64", + "setuptools_scm[toml]>=8", + "wheel", +] +# defined by PEP-517 +build-backend = "setuptools.build_meta" + + +[project] +authors = [ + {name = "SciTools Contributors", email = "scitools.pub@gmail.com"} +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", + "Natural Language :: English", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Scientific/Engineering :: Atmospheric Science", +] +description = "Python wrapper to libmo_unpack" +dynamic = [ + "readme", + "version", +] +license.file = "LICENSE" +name = "mo_pack" +requires-python = ">=3.9" + + +[project.urls] +Code = "https://github.com/SciTools/mo_pack" +Issues = "https://github.com/SciTools/mo_pack/issues" + + +[tool.check-manifest] +ignore = [ + "src/mo_pack/_packing.c", + "src/mo_pack/_version.py", +] + + +[tool.pytest.ini_options] +addopts = ["-ra"] +minversion = "6.0" +testpaths = "src/mo_pack" + + +[tool.setuptools] +license-files = ["LICENSE"] +zip-safe = false + + +[tool.setuptools.dynamic] +readme = {file = "README.md", content-type = "text/markdown"} + + +[tool.setuptools.packages.find] +include = ["mo_pack*"] +where = ["src"] + + +[tool.setuptools.package-data] +mo_pack = ["tests/test_data/*.pp"] + + +[tool.setuptools_scm] +write_to = "src/mo_pack/_version.py" +local_scheme = "dirty-tag" +version_scheme = "release-branch-semver" diff --git a/requirements/mo_pack.yml b/requirements/mo_pack.yml new file mode 100644 index 0000000..ea90b3d --- /dev/null +++ b/requirements/mo_pack.yml @@ -0,0 +1,22 @@ +name: mo-pack-dev + +channels: + - conda-forge + +dependencies: + +# setup dependencies + - setuptools >=64 + - setuptools-scm >=8 + +# core dependencies + - numpy >1.21 + - cython >=3 + - libmo_unpack + +# developer dependencies + - pip + - pre-commit + +# test dependencies + - pytest diff --git a/setup.py b/setup.py index 1c59908..18b9d0e 100644 --- a/setup.py +++ b/setup.py @@ -1,56 +1,46 @@ -from __future__ import absolute_import, division, print_function +from setuptools import Command, Extension, setup -from distutils.core import setup -import os +from pathlib import Path +from Cython.Build import cythonize import numpy as np -import setuptools -from Cython.Build import cythonize +BASE_DIR = Path(__file__).resolve().parent +PACKAGE_NAME = "mo_pack" +SRC_DIR = BASE_DIR / "src" +PACKAGE_DIR = SRC_DIR / PACKAGE_NAME + +class CleanCython(Command): + description = "Purge artifacts built by Cython" + user_options = [] -def file_walk_relative(top, remove=''): - """ - Returns a generator of files from the top of the tree, removing - the given prefix from the root/file result. + def initialize_options(self): + pass - """ - top = top.replace('/', os.path.sep) - remove = remove.replace('/', os.path.sep) - for root, dirs, files in os.walk(top): - for file in files: - yield os.path.join(root, file).replace(remove, '') + def finalize_options(self): + pass + def run(self): + for path in PACKAGE_DIR.rglob("*"): + if path.suffix in (".pyc", ".pyo", ".c", ".so"): + msg = f"clean: removing file {path}" + print(msg) + path.unlink() -extensions = [setuptools.Extension('mo_pack._packing', - ['lib/mo_pack/_packing.pyx'], - include_dirs=[np.get_include()], - libraries=['mo_unpack'])] + +# https://setuptools.pypa.io/en/latest/userguide/ext_modules.html +extension = Extension( + f"{PACKAGE_NAME}._packing", + [f"src/{PACKAGE_NAME}/_packing.pyx"], + include_dirs=[np.get_include()], + libraries=["mo_unpack"], + # https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html?highlight=NPY_NO_DEPRECATED_API#numpy-c-api + define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")], + extra_compile_args=["-std=c99"], +) setup( - name='mo_pack', - description='Python wrapper to libmo_unpack', - version='0.2.0.post0', - ext_modules=cythonize(extensions), - packages=['mo_pack', 'mo_pack.tests'], - package_dir={'': 'lib'}, - package_data={'mo_pack': list( - file_walk_relative('lib/mo_pack/tests/test_data/', - remove='lib/mo_pack/'))}, - classifiers=[ - 'Development Status :: 3 - Alpha', - 'License :: OSI Approved :: BSD License', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: POSIX', - 'Operating System :: POSIX :: AIX', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Topic :: Scientific/Engineering', - 'Topic :: Scientific/Engineering :: GIS', - ], + cmdclass={"clean_cython": CleanCython}, + ext_modules=cythonize(extension, language_level="3str"), ) diff --git a/lib/mo_pack/__init__.py b/src/mo_pack/__init__.py similarity index 72% rename from lib/mo_pack/__init__.py rename to src/mo_pack/__init__.py index a5bebb8..a0a7075 100644 --- a/lib/mo_pack/__init__.py +++ b/src/mo_pack/__init__.py @@ -2,9 +2,10 @@ # # This file is part of mo_pack and is released under the BSD license. # See LICENSE in the root of the repository for full licensing details. -from __future__ import absolute_import, division, print_function - from ._packing import (compress_rle, compress_wgdos, decompress_rle, decompress_wgdos) -__version__ = '0.2.0.post0' +try: + from ._version import version as __version__ +except ModuleNotFoundError: + __version__ = "unknown" diff --git a/lib/mo_pack/_packing.pyx b/src/mo_pack/_packing.pyx similarity index 98% rename from lib/mo_pack/_packing.pyx rename to src/mo_pack/_packing.pyx index c85fbff..229d6a4 100644 --- a/lib/mo_pack/_packing.pyx +++ b/src/mo_pack/_packing.pyx @@ -2,8 +2,6 @@ # # This file is part of mo_pack and is released under the BSD license. # See LICENSE in the root of the repository for full licensing details. -from __future__ import absolute_import, division, print_function - import numpy as np cimport numpy as np @@ -51,13 +49,14 @@ cdef extern from "wgdosstuff.h": function* parent) nogil -cdef void MO_syslog(int value, char* message, const function* const caller): + +cdef void MO_syslog(int value, char* message, const function* const caller) noexcept: # A dumb implementation of the system logging - i.e. don't do anything. pass ## For debugging purposes, enable the following (and comment out the above). #from libc.stdio cimport printf -#cdef void MO_syslog(int value, char* message, const function* const caller): +#cdef void MO_syslog(int value, char* message, const function* const caller) noexcept: # printf(message) # printf('\n') diff --git a/lib/mo_pack/tests/__init__.py b/src/mo_pack/tests/__init__.py similarity index 75% rename from lib/mo_pack/tests/__init__.py rename to src/mo_pack/tests/__init__.py index 140492d..b080cd4 100644 --- a/lib/mo_pack/tests/__init__.py +++ b/src/mo_pack/tests/__init__.py @@ -3,5 +3,3 @@ # This file is part of mo_pack and is released under the BSD license. # See LICENSE in the root of the repository for full licensing details. """Tests for mo_pack.""" - -from __future__ import absolute_import, division, print_function diff --git a/lib/mo_pack/tests/test_compress_rle.py b/src/mo_pack/tests/test_compress_rle.py similarity index 95% rename from lib/mo_pack/tests/test_compress_rle.py rename to src/mo_pack/tests/test_compress_rle.py index 0d74f97..d50d65e 100644 --- a/lib/mo_pack/tests/test_compress_rle.py +++ b/src/mo_pack/tests/test_compress_rle.py @@ -4,8 +4,6 @@ # See LICENSE in the root of the repository for full licensing details. """Tests for the `mo_pack.compress_rle` function.""" -from __future__ import absolute_import, division, print_function - import unittest import numpy as np diff --git a/lib/mo_pack/tests/test_data/nae.20100104-06_0001_0001.pp b/src/mo_pack/tests/test_data/nae.20100104-06_0001_0001.pp similarity index 100% rename from lib/mo_pack/tests/test_data/nae.20100104-06_0001_0001.pp rename to src/mo_pack/tests/test_data/nae.20100104-06_0001_0001.pp diff --git a/lib/mo_pack/tests/test_decompress_rle.py b/src/mo_pack/tests/test_decompress_rle.py similarity index 96% rename from lib/mo_pack/tests/test_decompress_rle.py rename to src/mo_pack/tests/test_decompress_rle.py index 802195d..9f3e80d 100644 --- a/lib/mo_pack/tests/test_decompress_rle.py +++ b/src/mo_pack/tests/test_decompress_rle.py @@ -4,8 +4,6 @@ # See LICENSE in the root of the repository for full licensing details. """Tests for the `mo_pack.decompress_rle` function.""" -from __future__ import absolute_import, division, print_function - import unittest import numpy as np diff --git a/lib/mo_pack/tests/test_rle.py b/src/mo_pack/tests/test_rle.py similarity index 94% rename from lib/mo_pack/tests/test_rle.py rename to src/mo_pack/tests/test_rle.py index 958c5be..5a81edb 100644 --- a/lib/mo_pack/tests/test_rle.py +++ b/src/mo_pack/tests/test_rle.py @@ -8,8 +8,6 @@ """ -from __future__ import absolute_import, division, print_function - import unittest import numpy as np diff --git a/lib/mo_pack/tests/test_wgdos.py b/src/mo_pack/tests/test_wgdos.py similarity index 98% rename from lib/mo_pack/tests/test_wgdos.py rename to src/mo_pack/tests/test_wgdos.py index a459535..eff5909 100644 --- a/lib/mo_pack/tests/test_wgdos.py +++ b/src/mo_pack/tests/test_wgdos.py @@ -8,8 +8,6 @@ """ -from __future__ import absolute_import, division, print_function - import os import unittest