From 79cdb6b40005e9f21e1dde83a73d05b108ce6a54 Mon Sep 17 00:00:00 2001 From: Kieran W <41634689+FredHappyface@users.noreply.github.com> Date: Mon, 26 Jun 2023 00:44:44 +0100 Subject: [PATCH] update pyproject and readme --- README.md | 38 ++++++++++++++++++++++++--- pyproject.toml | 54 ++++++++++++++++++++++++--------------- tests/data/pull4copy.lsr | Bin 368348 -> 368348 bytes tests/data/test1copy.lsr | Bin 320459 -> 320459 bytes tests/data/test3copy.lsr | Bin 788715 -> 788715 bytes 5 files changed, 68 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 7e10827..90d3809 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![PyPI Total Downloads](https://img.shields.io/badge/dynamic/json?style=for-the-badge&label=total%20downloads&query=%24.total_downloads&url=https%3A%2F%2Fapi.pepy.tech%2Fapi%2Fprojects%2Fpylsr)](https://pepy.tech/project/pylsr) [![PyPI Version](https://img.shields.io/pypi/v/pylsr.svg?style=for-the-badge)](https://pypi.org/project/pylsr) - + # PyLSR Project Icon @@ -35,6 +35,8 @@ https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_ - [How to run](#how-to-run) - [Windows](#windows) - [Linux/ MacOS](#linux-macos) +- [Building](#building) +- [Testing](#testing) - [Download Project](#download-project) - [Clone](#clone) - [Using The Command Line](#using-the-command-line) @@ -98,8 +100,8 @@ Head to https://pypi.org/project/pylsr/ for more info ### Built for -This program has been written for Python versions 3.7 - 3.10 and has been tested with both 3.7 and -3.10 +This program has been written for Python versions 3.8 - 3.11 and has been tested with both 3.8 and +3.11 ## Install Python on Windows @@ -159,6 +161,36 @@ version. - File `python3.x [file]` or `./[file]` +## Building + +This project uses https://github.com/FHPythonUtils/FHMake to automate most of the building. This +command generates the documentation, updates the requirements.txt and builds the library artefacts + +Note the functionality provided by fhmake can be approximated by the following + +```sh +handsdown --cleanup -o documentation/reference +poetry export -f requirements.txt --output requirements.txt +poetry export -f requirements.txt --with dev --output requirements_optional.txt +poetry build +``` + +`fhmake audit` can be run to perform additional checks + +## Testing + +For testing with the version of python used by poetry use + +```sh +poetry run pytest +``` + +Alternatively use `tox` to run tests over python 3.8 - 3.11 + +```sh +tox +``` + ## Download Project ### Clone diff --git a/pyproject.toml b/pyproject.toml index 77aa1b4..1741520 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Topic :: Multimedia :: Graphics", "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Utilities" + "Topic :: Utilities", ] homepage = "https://github.com/FHPythonUtils/PyLSR" repository = "https://github.com/FHPythonUtils/PyLSR" @@ -33,6 +33,22 @@ pylint = "^2.13.5" handsdown = "^1.1.0" coverage = "^6.3.2" +[tool.black] +line-length = 100 +target-version = ["py38"] + +[tool.isort] +profile = "black" +indent = "Tab" + +[tool.pydocstyle] +convention = "google" +ignore = "D205,D415" + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + [tool.pylint.basic] argument-naming-style = "camelCase" attr-naming-style = "camelCase" @@ -44,28 +60,24 @@ variable-naming-style = "camelCase" indent-string = "\t" [tool.pylint.master] -ignore-patterns = "test_.*?py" +ignore-paths = ["tests"] [tool.pylint.messages_control] enable = ["F", "E", "W", "R", "C"] -disable = [ - "pointless-string-statement", - "superfluous-parens", - "bad-continuation" -] - -[tool.black] -line-length = 100 -target-version = ["py37"] - -[tool.isort] -profile = "black" -indent = "Tab" +disable = ["pointless-string-statement", "superfluous-parens"] -[tool.pydocstyle] -convention = "google" -ignore = "D205,D415" +[tool.tox] +legacy_tox_ini = """ +[tox] +env_list = + py311 + py310 + py39 + py38 -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +[testenv] +deps = + pytest + imgcompare +commands = pytest tests +""" diff --git a/tests/data/pull4copy.lsr b/tests/data/pull4copy.lsr index d36bc9adc48213da1ff28825340766f81335afc3..ba98e406618c32da943d7b760cb208cb8c85ff73 100644 GIT binary patch delta 169 zcmcb!SM1JSF}?tAW)=|!5GZH86*iIYEen|be-=znzQA|{%-B4G=^Zabs7v5Hgb^!v z1I%c)6l%8=VgzC)AZ7+)mhF~8tRh`t+3A6ESj{1xZl2AkJ0BvL!Nv4k5MxZl2AkJ0BvL!Nv4k5MZS=*ocF?TCM1j`DTuR~aYh0IsM ztahy;=IvTVEa~4M5>qo+Ax@Z{naO$_qQoSNwcR9(4T#x+m;;D8ftYK%Nf!6i84zt} znRv`0EDmO#00=9FnI{p#I>^kE0AZ=J@c2Vm6)Z5ZJ1jhL5HUMen2yD)JVg*ONj9D) n2x~qYPbh@-gN-K*!b)Q2$%3#hu=DsqSV|l`@eo!k2TvLRggk-h delta 370 zcmaDo(ctw&1HJ%nW)=|!5NKS|9kP+HfsqBom^_K`0)&yqbQ;XqY|8Ag4ZS=*ocF?TCM1j`DTuR~aYh0IsM ztahy;=IvTVEa~4M5>qo+Ax@Z{naO$_qQoSNwcR9(4T#x+m;;D8ftYK%Nf!6i84zt} znRv`0EDmO#00=9FnI{p#I>^kE0AZ=J@c2Vm6)Z5ZJ1jhL5HUMen2yD)JVg*ONj9D) n2x~qYPbh@-gN-K*!b)Q2$%3#hu=DsqSV|l`@eo!k2TvLRLIjNH