Skip to content

Commit

Permalink
Update python to 3.13 and use it as the default for automated workflo…
Browse files Browse the repository at this point in the history
…ws (#195)
  • Loading branch information
margalva authored Dec 6, 2024
1 parent 8dd9805 commit 5efc1dc
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 15 deletions.
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ statistics = True
ignore =
# Whitespace before ':'.
E203,
# Whitespace after ':'.
E231,
# Line too long (82 > 79 characters).
E501,
# Line break occurred before a binary operator.
Expand Down Expand Up @@ -37,4 +39,4 @@ ignore =
# manually surrounded by quotes, consider using the `!r` conversion flag
B907
# zip() without an explicit strict= parameter set.
B905
B905
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:

env:
DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com'
MAIN_PYTHON_VERSION: '3.10'
MAIN_PYTHON_VERSION: '3.13'
PACKAGE_NAME: 'ansys-dynamicreporting-core'
PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core'

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
python-version: [ '3.10', '3.11', '3.12' ]
python-version: [ '3.10', '3.11', '3.12', '3.13' ]
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v8
Expand All @@ -68,7 +68,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10', '3.11', '3.12' ]
python-version: [ '3.10', '3.11', '3.12', '3.13' ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
DOCUMENTATION_CNAME: 'dynamicreporting.docs.pyansys.com'
MAIN_PYTHON_VERSION: '3.10'
MAIN_PYTHON_VERSION: '3.13'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

env:
MAIN_PYTHON_VERSION: '3.10'
MAIN_PYTHON_VERSION: '3.13'
PACKAGE_NAME: 'ansys-dynamicreporting-core'
PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core'

Expand All @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10', '3.11', '3.12' ]
python-version: [ '3.10', '3.11', '3.12', '3.13' ]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To reach the project support team, email `[email protected] <pyansys.core@a

Installation
------------
The ``pydynamicreporting`` package supports Python 3.10 through 3.12 on
The ``pydynamicreporting`` package supports Python 3.10 through 3.13 on
Windows and Linux. It is currently available on the PyPi
`repository <https://pypi.org/project/ansys-dynamicreporting-core/>`_.

Expand Down
6 changes: 3 additions & 3 deletions doc/source/examples_source/25-intermediate/01-queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

for i in range(100):
if i % 3 == 0:
my_text = adr_service.create_item(obj_name=f"Name {str(i%20)}", source="Application X")
my_text = adr_service.create_item(obj_name=f"Name {str(i % 20)}", source="Application X")
elif i % 3 == 1:
my_text = adr_service.create_item(obj_name=f"Name {str(i%20)}", source="Application Y")
my_text = adr_service.create_item(obj_name=f"Name {str(i % 20)}", source="Application Y")
elif i % 3 == 2:
my_text = adr_service.create_item(obj_name=f"Name {str(i%20)}", source="Application Z")
my_text = adr_service.create_item(obj_name=f"Name {str(i % 20)}", source="Application Z")
my_text.item_text = "Any text. Does not matter the actual payload"
if i % 4 == 0:
my_text.set_tags("var=pressure")
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
Expand Down Expand Up @@ -76,7 +77,7 @@ test = [
"pytest==8.3.3",
"pytest-cov==4.1.0",
"pyvista==0.44.1",
"vtk==9.3.1",
"vtk==9.4.0",
"ansys-dpf-core==0.13.0",
]
doc = [
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dynamicreporting/core/adr_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class ReportFetchComponent extends HTMLElement {{
}}
customElements.define("adr-report", ReportFetchComponent);
"""
""" # noqa
return component_logic

def get_report_component(
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dynamicreporting/core/serverless/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def find(cls, query="", **kwargs):
raise ADRException(
extra_detail="The 'i_type' filter is not required if using a subclass of Item"
)
return super().find(query=f"A|i_type|cont|{cls.type};{query}", **kwargs)
return super().find(query=f"A|i_type|cont|{cls.type};{query}", **kwargs) # noqa: E702

def render(self, context=None, request=None) -> Optional[str]:
if context is None:
Expand Down
3 changes: 2 additions & 1 deletion src/ansys/dynamicreporting/core/serverless/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def find(cls, query="", **kwargs):
raise ADRException(
extra_detail="The 't_types' filter is not required if using a subclass of Template"
)
return super().find(query=f"A|t_types|cont|{cls.report_type};{query}", **kwargs)
query_string = f"A|t_types|cont|{cls.report_type};{query}" # noqa: E702
return super().find(query=query_string, **kwargs)

def reorder_children(self) -> None:
guid_to_child = {str(child.guid): child for child in self.children}
Expand Down

0 comments on commit 5efc1dc

Please sign in to comment.