idi-manageorders-sdk 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ {
2
+ "features": {
3
+ "ghcr.io/devcontainers/features/python:1.6.5": {
4
+ "version": "1.6.5",
5
+ "resolved": "ghcr.io/devcontainers/features/python@sha256:f5e1557b5745bcc3aa8f12eaa1084b8d63952d73e776c406214d65f593aae6d8",
6
+ "integrity": "sha256:f5e1557b5745bcc3aa8f12eaa1084b8d63952d73e776c406214d65f593aae6d8"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "image": "mcr.microsoft.com/devcontainers/universal:2",
3
+ "features": {
4
+ "ghcr.io/devcontainers/features/python:1.6.5": {
5
+ "version": "3.12",
6
+ "installTools": false
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,24 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: devcontainers
4
+ directory: /
5
+ schedule:
6
+ interval: monthly
7
+
8
+ - package-ecosystem: github-actions
9
+ directory: /
10
+ schedule:
11
+ interval: monthly
12
+ groups:
13
+ ci-dependencies:
14
+ patterns:
15
+ - "*"
16
+
17
+ - package-ecosystem: pip
18
+ directory: /
19
+ schedule:
20
+ interval: monthly
21
+ groups:
22
+ python-dependencies:
23
+ patterns:
24
+ - "*"
@@ -0,0 +1,20 @@
1
+ name: "Dependency Review"
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ permissions:
7
+ contents: read
8
+
9
+ jobs:
10
+ dependency-review:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: "Checkout Repository"
15
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16
+
17
+ - name: "Dependency Review"
18
+ uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # v4.4.0
19
+ with:
20
+ config-file: impressdesigns/.github/.github/dependency-review-config.yaml@main
@@ -0,0 +1,60 @@
1
+ name: Python CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ lint-test:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16
+
17
+ - name: Setup Python
18
+ uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
19
+ with:
20
+ python-version: 3.12
21
+ allow-prereleases: true
22
+ cache: pip
23
+ cache-dependency-path: uv.lock
24
+
25
+ - name: Set up uv
26
+ run: curl -LsSf https://astral.sh/uv/install.sh | sh
27
+
28
+ - name: Sync dependencies
29
+ run: uv sync --all-extras
30
+
31
+ - name: Run pre-commit
32
+ run: uv run pre-commit run --all-files
33
+
34
+ - name: Check formatting
35
+ run: uv run ruff format --check .
36
+
37
+ - name: Run Ruff checks
38
+ run: uv run ruff check --output-format=github .
39
+
40
+ - name: Run mypy
41
+ run: uv run mypy --strict src/
42
+
43
+ - name: Run tests
44
+ run: uv run coverage run -m pytest -v
45
+
46
+ - name: Create coverage report
47
+ run: uv run coverage xml
48
+
49
+ - name: Upload coverage reports to Codecov
50
+ uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a # v5.0.2
51
+ env:
52
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
53
+
54
+ docs:
55
+ permissions:
56
+ contents: read
57
+ pages: write
58
+ id-token: write
59
+
60
+ uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@41518576ed6c499ed3e68d5cbceaeaa50abd471a # v14.1.0
@@ -0,0 +1,54 @@
1
+ name: Publish Python 🐍 distributions 📦 to PyPI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+ release:
11
+ types:
12
+ - published
13
+
14
+ jobs:
15
+ build:
16
+ name: Build distribution 📦
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ attestations: write
20
+ id-token: write
21
+
22
+ steps:
23
+ - name: Checkout repository
24
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25
+
26
+ - name: Build and inspect Python 🐍 package 📦
27
+ uses: hynek/build-and-inspect-python-package@73aea398b9c8de9ea9e4464c6b13cb8b1f3d6294 # v2.9.0
28
+ with:
29
+ attest-build-provenance-github: ${{ github.event.action == 'published' }}
30
+
31
+ publish-to-pypi:
32
+ name: Publish Python 🐍 distribution 📦 to PyPI
33
+ needs: build
34
+ if: ${{ github.event.action == 'published' }}
35
+ runs-on: ubuntu-latest
36
+ environment:
37
+ name: pypi
38
+ url: https://pypi.org/project/crazylibs/${{ github.ref_name }}
39
+ permissions:
40
+ id-token: write
41
+
42
+ steps:
43
+ - name: Download dists
44
+ uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
45
+ with:
46
+ name: Packages
47
+ path: dist/
48
+
49
+ - name: Publish distribution 📦 to PyPI
50
+ uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # v1.10.3
51
+ with:
52
+ attestations: true
53
+ verbose: true
54
+ print-hash: true
@@ -0,0 +1,9 @@
1
+ # Packaging
2
+ *.egg-info
3
+ dist
4
+
5
+ # Cache
6
+ __pycache__
7
+
8
+ # Docs
9
+ docs/build
@@ -0,0 +1,33 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: check-case-conflict
6
+ - id: check-merge-conflict
7
+ - id: check-toml
8
+ - id: check-yaml
9
+ - id: check-json
10
+ - id: trailing-whitespace
11
+ args: [ --markdown-linebreak-ext=md ]
12
+ - id: mixed-line-ending
13
+ args: [ --fix=lf ]
14
+ - id: end-of-file-fixer
15
+ exclude: .devcontainer/devcontainer-lock.json
16
+
17
+ - repo: https://github.com/astral-sh/uv-pre-commit
18
+ rev: 0.4.30
19
+ hooks:
20
+ - id: uv-lock
21
+ - id: uv-export
22
+ args:
23
+ - --frozen
24
+ - --no-emit-project
25
+ - --output-file=requirements.txt
26
+ files: pyproject.toml|uv.lock
27
+ - id: uv-export
28
+ args:
29
+ - --frozen
30
+ - --no-emit-project
31
+ - --all-extras
32
+ - --output-file=requirements-dev.txt
33
+ files: pyproject.toml|uv.lock
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Impress Designs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.3
2
+ Name: idi-manageorders-sdk
3
+ Version: 0.1.0
4
+ Summary: ShopWorks ManageOrders API SDK
5
+ Project-URL: repository, https://github.com/impressdesigns/manageorders-sdk/
6
+ Project-URL: documentation, https://impressdesigns.dev/manageorders-sdk/
7
+ Author-email: Bradley Reynolds <bradley.reynolds@impressdesigns.com>
8
+ License: MIT
9
+ Requires-Python: >=3.10
10
+ Requires-Dist: httpx>=0.27.2
11
+ Requires-Dist: pydantic>=2.9.2
12
+ Provides-Extra: dev
13
+ Requires-Dist: mypy>=1.10.1; extra == 'dev'
14
+ Requires-Dist: nox>=2024.4.15; extra == 'dev'
15
+ Requires-Dist: pre-commit>=3.7.1; extra == 'dev'
16
+ Requires-Dist: ruff>=0.5.2; extra == 'dev'
17
+ Provides-Extra: docs
18
+ Requires-Dist: furo>=2024.5.6; extra == 'docs'
19
+ Requires-Dist: releases>=2.1.1; extra == 'docs'
20
+ Requires-Dist: sphinx-autoapi>=3.1.2; extra == 'docs'
21
+ Requires-Dist: sphinx>=7.4.4; extra == 'docs'
22
+ Provides-Extra: tests
23
+ Requires-Dist: coverage>=7.6.1; extra == 'tests'
24
+ Requires-Dist: pytest-randomly>=3.15.0; extra == 'tests'
25
+ Requires-Dist: pytest>=8.2.2; extra == 'tests'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # manageorders-api
29
+ ShopWorks ManageOrders API SDK
@@ -0,0 +1,2 @@
1
+ # manageorders-api
2
+ ShopWorks ManageOrders API SDK
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,5 @@
1
+ Changelog
2
+ =========
3
+
4
+ - :release:`0.1.0 <19th November 2024>`
5
+ - :feature:`-` Initial release
@@ -0,0 +1,88 @@
1
+ """Configuration file for the Sphinx documentation builder.
2
+
3
+ For the full list of built-in configuration values, see the documentation:
4
+ https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+ """
6
+
7
+ from importlib.metadata import metadata
8
+
9
+ project_metadata = metadata("idi-manageorders-sdk")
10
+ project: str = project_metadata["Name"]
11
+ release: str = project_metadata["Version"]
12
+ REPO_LINK: str = project_metadata["Project-URL"].replace("repository, ", "")
13
+ copyright: str = "Impress Designs" # noqa: A001
14
+ author: str = "Impress Designs team"
15
+
16
+ # Add any Sphinx extension module names here, as strings. They can be
17
+ # extensions coming with Sphinx (named "sphinx.ext.*") or your custom
18
+ # ones.
19
+ extensions = [
20
+ "sphinx.ext.autodoc",
21
+ "sphinx.ext.linkcode",
22
+ "sphinx.ext.intersphinx",
23
+ "sphinx.ext.napoleon",
24
+ "autoapi.extension",
25
+ "releases",
26
+ ]
27
+
28
+ autoapi_type: str = "python"
29
+ autoapi_dirs: list[str] = ["../../src"]
30
+
31
+ intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
32
+
33
+ # Add any paths that contain templates here, relative to this directory.
34
+ templates_path: list[str] = ["_templates"]
35
+
36
+ # List of patterns, relative to source directory, that match files and
37
+ # directories to ignore when looking for source files.
38
+ # This pattern also affects html_static_path and html_extra_path.
39
+ exclude_patterns: list[str] = ["_build", "Thumbs.db", ".DS_Store"]
40
+
41
+ # -- Options for HTML output -------------------------------------------------
42
+
43
+ # The theme to use for HTML and HTML Help pages. See the documentation for
44
+ # a list of builtin themes.
45
+ html_theme: str = "furo"
46
+
47
+ # Add any paths that contain custom static files (such as style sheets) here,
48
+ # relative to this directory. They are copied after the builtin static files,
49
+ # so a file named "default.css" will overwrite the builtin "default.css".
50
+ html_static_path: list[str] = ["_static"]
51
+
52
+ releases_github_path = REPO_LINK.removeprefix("https://github.com/")
53
+ releases_release_uri = f"{REPO_LINK}/releases/tag/v%s"
54
+
55
+
56
+ def linkcode_resolve(domain: str, info: dict) -> str | None:
57
+ """linkcode_resolve."""
58
+ if domain != "py":
59
+ return None
60
+ if not info["module"]:
61
+ return None
62
+
63
+ import importlib
64
+ import inspect
65
+ import types
66
+
67
+ mod = importlib.import_module(info["module"])
68
+
69
+ val = mod
70
+ for k in info["fullname"].split("."):
71
+ val = getattr(val, k, None)
72
+ if val is None:
73
+ break
74
+
75
+ filename = info["module"].replace(".", "/") + ".py"
76
+
77
+ if isinstance(
78
+ val,
79
+ types.ModuleType | types.MethodType | types.FunctionType | types.TracebackType | types.FrameType | types.CodeType,
80
+ ):
81
+ try:
82
+ lines, first = inspect.getsourcelines(val)
83
+ last = first + len(lines) - 1
84
+ filename += f"#L{first}-L{last}"
85
+ except (OSError, TypeError):
86
+ pass
87
+
88
+ return f"{REPO_LINK}/blob/main/src/{filename}"
@@ -0,0 +1,25 @@
1
+ idi-manageorders-sdk
2
+ ====================
3
+
4
+ ShopWorks ManageOrders API SDK
5
+
6
+ Module Index
7
+ ------------
8
+
9
+ .. toctree::
10
+ :maxdepth: 1
11
+
12
+ autoapi/index
13
+
14
+ .. toctree::
15
+ :caption: Other:
16
+ :hidden:
17
+
18
+ changelog
19
+
20
+ Extras
21
+ ------
22
+
23
+ * :ref:`genindex`
24
+ * :ref:`search`
25
+ * :doc:`changelog`
@@ -0,0 +1,52 @@
1
+ """Noxfile."""
2
+
3
+ import shutil
4
+ from pathlib import Path
5
+
6
+ import nox
7
+
8
+ nox.options.default_venv_backend = "none"
9
+ nox.options.sessions = ["lints"]
10
+
11
+
12
+ CLEANABLE_TARGETS = [
13
+ "./dist",
14
+ "./build",
15
+ "./.nox",
16
+ "./.coverage",
17
+ "./.coverage.*",
18
+ "./coverage.json",
19
+ "./**/.mypy_cache",
20
+ "./**/.pytest_cache",
21
+ "./**/__pycache__",
22
+ "./**/*.pyc",
23
+ "./**/*.pyo",
24
+ ]
25
+
26
+
27
+ @nox.session
28
+ def tests(session: nox.Session) -> None:
29
+ """Run tests."""
30
+ session.run("pytest")
31
+
32
+
33
+ @nox.session
34
+ def lints(session: nox.Session) -> None:
35
+ """Run lints."""
36
+ session.run("pre-commit", "run", "--all-files")
37
+ session.run("ruff", "format", ".")
38
+ session.run("ruff", "check", "--fix", ".")
39
+ session.run("mypy", "--strict", "src/")
40
+
41
+
42
+ @nox.session
43
+ def clean(_: nox.Session) -> None:
44
+ """Clean cache, .pyc, .pyo, and test/build artifact files from project."""
45
+ count = 0
46
+ for searchpath in CLEANABLE_TARGETS:
47
+ for filepath in Path().glob(searchpath):
48
+ if filepath.is_dir():
49
+ shutil.rmtree(filepath)
50
+ else:
51
+ filepath.unlink()
52
+ count += 1
@@ -0,0 +1,75 @@
1
+ [project]
2
+ name = "idi-manageorders-sdk"
3
+ version = "0.1.0"
4
+ description = "ShopWorks ManageOrders API SDK"
5
+ authors = [
6
+ { name = "Bradley Reynolds", email = "bradley.reynolds@impressdesigns.com" },
7
+ ]
8
+ readme = "README.md"
9
+ license = { text = "MIT" }
10
+ requires-python = ">=3.10"
11
+ dependencies = ["httpx>=0.27.2", "pydantic>=2.9.2"]
12
+
13
+ [project.optional-dependencies]
14
+ dev = [
15
+ # DX
16
+ "nox>=2024.4.15",
17
+ "pre-commit>=3.7.1",
18
+ # Linters
19
+ "ruff>=0.5.2",
20
+ "mypy>=1.10.1",
21
+ ]
22
+ docs = [
23
+ "sphinx>=7.4.4",
24
+ "furo>=2024.5.6",
25
+ "sphinx-autoapi>=3.1.2",
26
+ "releases>=2.1.1",
27
+ ]
28
+ tests = ["pytest>=8.2.2", "pytest-randomly>=3.15.0", "coverage>=7.6.1"]
29
+
30
+ [project.urls]
31
+ repository = "https://github.com/impressdesigns/manageorders-sdk/"
32
+ documentation = "https://impressdesigns.dev/manageorders-sdk/"
33
+
34
+ [build-system]
35
+ requires = ["hatchling"]
36
+ build-backend = "hatchling.build"
37
+
38
+ [tool.hatch.metadata]
39
+ allow-direct-references = true
40
+
41
+ [tool.hatch.build.targets.wheel]
42
+ packages = ["src/manageorders_sdk"]
43
+
44
+ [tool.ruff]
45
+ target-version = "py312"
46
+ line-length = 130
47
+
48
+ [tool.ruff.lint]
49
+ select = ["ALL"]
50
+ ignore = [
51
+ "CPY001", # (Missing copyright notice at top of file) - No license
52
+ ]
53
+
54
+ [tool.ruff.lint.extend-per-file-ignores]
55
+ "docs/*" = [
56
+ "INP001", # (File `docs/conf.py` is part of an implicit namespace package. Add an `__init__.py`.) - Docs are not modules
57
+ ]
58
+ "tests/*" = [
59
+ "S101", # (Use of `assert` detected) - Yes, that's the point
60
+ ]
61
+
62
+ [tool.ruff.lint.isort]
63
+ known-first-party = ["core"]
64
+
65
+ [tool.ruff.lint.pydocstyle]
66
+ convention = "numpy"
67
+
68
+ [tool.mypy]
69
+ plugins = ["pydantic.mypy"]
70
+
71
+ [tool.coverage.run]
72
+ source = ["manageorders_sdk"]
73
+
74
+ [tool.pytest.ini_options]
75
+ addopts = "--strict-markers"