Skip to content

Commit

Permalink
merge with main; update to v1.3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
akaszynski committed Jul 10, 2024
2 parents dd74cc7 + 7dbcb22 commit a12c2cd
Show file tree
Hide file tree
Showing 14 changed files with 1,598 additions and 1,382 deletions.
100 changes: 50 additions & 50 deletions .github/workflows/testing-and-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
workflow_dispatch:
push:
tags:
- "*"
- '*'
branches:
- main
- main

jobs:
unit_testing:
Expand All @@ -22,44 +22,44 @@ jobs:
WEAKKEEPAKEY: ${{ secrets.WEAKKEEPAKEY }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install
run: |
pip install .[test] --disable-pip-version-check
python -c "import keepa"
- name: Install
run: |
pip install .[test] --disable-pip-version-check
python -c "import keepa"
- name: Validate Keys
run: |
python -c "import os, keepa; keepa.Keepa(os.environ.get('KEEPAKEY'))"
- name: Validate Keys
run: |
python -c "import os, keepa; keepa.Keepa(os.environ.get('KEEPAKEY'))"
- name: Unit testing
run: |
pytest -v --cov keepa --cov-report xml
- name: Unit testing
run: |
pytest -v --cov keepa --cov-report xml
- uses: codecov/codecov-action@v4
if: matrix.python-version == '3.12'
name: 'Upload coverage to codecov'
- uses: codecov/codecov-action@v4
if: matrix.python-version == '3.12'
name: Upload coverage to codecov

- name: Build wheel
if: matrix.python-version == '3.12'
run: |
pip install build --disable-pip-version-check
python -m build
- name: Build wheel
if: matrix.python-version == '3.12'
run: |
pip install build --disable-pip-version-check
python -m build
- name: Upload wheel
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: keepa-wheel
path: dist/
retention-days: 1
- name: Upload wheel
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: keepa-wheel
path: dist/
retention-days: 1

release:
name: Upload release to PyPI
Expand All @@ -72,20 +72,20 @@ jobs:
permissions:
id-token: write # this permission is mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
path: dist/
- name: Flatten directory structure
run: |
mv dist/*/* dist/
rm -rf dist/keepa-wheel
- name: Display structure of downloaded files
run: ls -R
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
./**/*.whl
- uses: actions/download-artifact@v4
with:
path: dist/
- name: Flatten directory structure
run: |
mv dist/*/* dist/
rm -rf dist/keepa-wheel
- name: Display structure of downloaded files
run: ls -R
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
./**/*.whl
29 changes: 18 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Integration with GitHub Actions
# See https://pre-commit.ci/
ci:
autofix_prs: true
autofix_prs: true
repos:
- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
- id: blackdoc
files: '\.py$'
files: \.py$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
rev: v0.5.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
exclude: ^(docs/|tests)
- id: ruff-format
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
exclude: ^(docs/|tests)
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args: [-S ./docs/\*]
Expand All @@ -25,17 +25,24 @@ repos:
hooks:
- id: pydocstyle
additional_dependencies: [toml]
exclude: "tests/"
exclude: tests/
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py38-plus, --keep-runtime-typing]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: no-commit-to-branch
args: [--branch, main]
- id: requirements-txt-fixer
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
hooks:
- id: pretty-format-toml
args: [--autofix]
- id: pretty-format-yaml
args: [--autofix, --indent, '2']
12 changes: 6 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: '3.11'

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
configuration: docs/source/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: requirements_docs.txt
- method: pip
path: .
install:
- requirements: requirements_docs.txt
- method: pip
path: .
30 changes: 15 additions & 15 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ coverage:
# basic
target: 85%
threshold: 80%
base: auto
flags:
- unit
paths:
- "src"
base: auto
flags:
- unit
paths:
- src
# advanced
branches:
- master
branches:
- master
if_not_found: success
if_ci_failed: error
informational: false
Expand All @@ -25,18 +25,18 @@ coverage:
# basic
target: 90
threshold: 90
base: auto
base: auto
# advanced
branches:
- master
branches:
- master
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
flags:
- "unit"
paths:
- "src"
flags:
- unit
paths:
- src


parsers:
Expand All @@ -48,6 +48,6 @@ parsers:
macro: no

comment:
layout: "reach,diff,flags,tree"
layout: reach,diff,flags,tree
behavior: default
require_changes: no
16 changes: 16 additions & 0 deletions docs/source/api_methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

keepa.Api Methods
-----------------
These are the core ``keepa`` classes.

.. autoclass:: keepa.Keepa
:members:

Types
-----
These types and enumerators are used by ``keepa`` for data validation.

.. autoclass:: keepa.Domain
:members:
:undoc-members:
:member-order: bysource

.. autoclass:: keepa.ProductParams
:members:
:undoc-members:
:member-order: bysource
:exclude-members: model_computed_fields, model_config, model_fields, construct,dict,from_orm,json,parse_file,parse_obj,parse_raw,schema,schema_json,update_forward_refs,validate,copy,model_construct,model_copy,model_dump,model_dump_json,model_json_schema,model_parametrized_name,model_post_init,model_rebuild,model_validate,model_validate_json,model_validate_strings, model_extra, model_fields_set
13 changes: 12 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"]
extensions = [
"sphinx.ext.autodoc",
"numpydoc",
"sphinx.ext.intersphinx",
]

intersphinx_mapping = {
"python": (
"https://docs.python.org/3.11",
(None, "../intersphinx/python-objects.inv"),
),
}

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
Loading

0 comments on commit a12c2cd

Please sign in to comment.