Skip to content

Commit

Permalink
Prepare 1.2.1 (#264)
Browse files Browse the repository at this point in the history
Co-authored-by: Andy Grigg <[email protected]>
Co-authored-by: Doug Addy <[email protected]>
Co-authored-by: pyansys-ci-bot <[email protected]>
  • Loading branch information
4 people authored May 7, 2024
1 parent ce89631 commit 46d0952
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 89 deletions.
43 changes: 15 additions & 28 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,23 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

doc-build:
name: "Build documentation (mock examples)"
name: Documentation Build (mock examples)
runs-on: ubuntu-latest
needs: doc-style
steps:
- name: "Checkout the repository"
uses: actions/checkout@v4

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

- name: "Install system dependencies"
run: |
sudo apt-get update && sudo apt-get install pandoc
- name: "Install Python dependencies"
run: |
python -m pip install --upgrade pip tox
python -m pip install poetry~=1.4.0
- name: "Generate the documentation with tox"
run: tox -e doc

- name: "Upload HTML documentation"
uses: actions/upload-artifact@v4
with:
name: documentation-html-mock-examples
path: doc/_build/html
retention-days: 7
- name: "Run Ansys documentation building action"
uses: ansys/actions/doc-build@v6
with:
check-links: false
dependencies: "pandoc"
sphinxopts: "-j 1 -n -W --keep-going"

- name: "Delete unneeded doc artifact"
if: ${{ !startsWith( github.event.pull_request.head.ref, 'dependabot/') }}
uses: geekyeggo/delete-artifact@v5
with:
name: |
documentation-html
documentation-pdf
smoke-tests:
name: "Build wheelhouse for latest Python versions"
Expand Down
47 changes: 5 additions & 42 deletions .github/workflows/server_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,54 +148,17 @@ jobs:
runs-on: ubuntu-latest
needs: integration-tests
steps:
- name: "Checkout the repository"
uses: actions/checkout@v4

- name: "Set up Python ${{ inputs.python-version }}"
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: "Install system dependencies"
run: |
sudo apt update
sudo apt-get install pandoc
sudo apt-get install texlive-latex-extra latexmk texlive-xetex fonts-freefont-otf xindy
- name: "Install documentation dependencies"
run: |
pip install poetry~=1.3.0 --disable-pip-version-check
poetry install --with doc
- name: "Build HTML documentation"
run: poetry run -- make -C doc html SPHINXOPTS="-n -W --keep-going"
- name: "Run Ansys documentation building action"
uses: ansys/actions/doc-build@v6
env:
TEST_SL_URL: ${{secrets.TEST_SERVER_URL_NEXT}}
TEST_USER: ${{secrets.TEST_SERVER_ADMIN_USER}}
TEST_PASS: ${{secrets.TEST_SERVER_ADMIN_PASS}}
BUILD_EXAMPLES: "true"

- name: "Build PDF documentation"
run: poetry run -- make -C doc latexpdf
env:
TEST_SL_URL: ${{secrets.TEST_SERVER_URL_NEXT}}
TEST_USER: ${{secrets.TEST_SERVER_ADMIN_USER}}
TEST_PASS: ${{secrets.TEST_SERVER_ADMIN_PASS}}
BUILD_EXAMPLES: "true"

- name: "Upload HTML documentation"
uses: actions/upload-artifact@v4
with:
name: documentation-html
path: doc/_build/html
retention-days: 7

- name: "Upload PDF documentation"
uses: actions/upload-artifact@v4
with:
name: documentation-pdf
path: doc/_build/latex/*.pdf
retention-days: 7
check-links: false
dependencies: "pandoc"
sphinxopts: "-j 1 -n -W --keep-going"

check_workflow_runs:
name: Check if there are active workflow runs
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## grantami-recordlists 1.2.1, 2024-05-07

### Dependencies

* [Pull request #249](https://github.com/ansys/grantami-recordlists/pull/249): Update grantami-serverapi-openapi to 3.0.0.

### Contributors

* Andy Grigg (Ansys)
* Ludovic Steinbach (Ansys)
* Doug Addy (Ansys)


## grantami-recordlists 1.2.0, 2024-05-02

### New features

* [Issue #165](https://github.com/ansys/grantami-recordlists/issues/165),
[Pull request #166](https://github.com/ansys/grantami-recordlists/pull/166): Add `get_resolvable_list_items` method.
* [Issue #195](https://github.com/ansys/grantami-recordlists/issues/195),
[Pull request #207](https://github.com/ansys/grantami-recordlists/pull/207): Allow `match_all` and `match_any` in boolean criteria.

### Contributors

* Andy Grigg (Ansys)
* Ludovic Steinbach (Ansys)
* Doug Addy (Ansys)


## grantami-recordlists 1.1.0, 2024-01-17

### New features
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/248.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use ansys doc build action
1 change: 1 addition & 0 deletions doc/changelog.d/249.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update grantami-serverapi-openapi to 3.0.0
1 change: 1 addition & 0 deletions doc/changelog.d/251.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exclude table with dynamic record count from tests
1 change: 1 addition & 0 deletions doc/changelog.d/256.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update openapi-common reference link
9 changes: 1 addition & 8 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,8 @@
# Intersphinx mapping
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"openapi-common": ("https://openapi.docs.pyansys.com", None),
"openapi-common": ("https://openapi.docs.pyansys.com/version/stable", None),
"requests": ("https://requests.readthedocs.io/en/latest/", None),
# kept here as an example
# "scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
# "numpy": ("https://numpy.org/devdocs", None),
# "matplotlib": ("https://matplotlib.org/stable", None),
# "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
# "pyvista": ("https://docs.pyvista.org/", None),
# "grpc": ("https://grpc.github.io/grpc/python/", None),
}

# numpydoc configuration
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
# Check https://python-poetry.org/docs/pyproject/ for all available sections
name = "ansys-grantami-recordlists"
version = "1.2.0"
version = "1.2.1"
description = "A python wrapper for the Granta MI RecordLists API"
license = "MIT"
authors = ["ANSYS, Inc. <[email protected]>"]
Expand All @@ -30,7 +30,7 @@ packages = [
[tool.poetry.dependencies]
python = ">=3.9,<4.0"
ansys-openapi-common = "^2.0.0"
ansys-grantami-serverapi-openapi = "3.0.0b0"
ansys-grantami-serverapi-openapi = "3.0.0"
requests = "^2.26"

# Optional documentation dependencies
Expand Down
33 changes: 27 additions & 6 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@

from ansys.grantami.serverapi_openapi.api import SchemaDatabasesApi, SchemaTablesApi, SearchApi
from ansys.grantami.serverapi_openapi.models import (
GrantaServerApiSearchBooleanCriterion,
GrantaServerApiSearchDiscreteTextValuesDatumCriterion,
GrantaServerApiSearchRecordPropertyCriterion,
GrantaServerApiSearchSearchableRecordProperty,
GrantaServerApiSearchSearchRequest,
GrantaServerApiSearchShortTextDatumCriterion,
GrantaServerApiSearchTextMatchBehavior,
GrantaServerApiVersionState,
)
from common import DB_KEY, TABLE_NAME, RecordCreator
Expand Down Expand Up @@ -166,14 +169,32 @@ def design_data_table_guid(admin_client) -> str:
@pytest.fixture(scope="session")
def resolvable_items(admin_client, training_database_guid) -> List[RecordListItem]:
"""Get all records in the MI_Training database and use them to create
a list of RecordListItems which can be added to a list."""
a list of RecordListItems which can be added to a list.
Exclude records in the 'Tensile Test Data' table, since this is used in the
grantami-jobqueue integration tests, and the changing contents of the table
can cause test failures.
"""
search_api = SearchApi(admin_client)

is_any_record_type = GrantaServerApiSearchRecordPropertyCriterion(
_property=GrantaServerApiSearchSearchableRecordProperty.RECORDTYPE,
inner_criterion=GrantaServerApiSearchDiscreteTextValuesDatumCriterion(
any=["Record", "Generic", "Folder"],
),
)
is_in_tensile_test_data_table = GrantaServerApiSearchRecordPropertyCriterion(
_property=GrantaServerApiSearchSearchableRecordProperty.TABLENAME,
inner_criterion=GrantaServerApiSearchShortTextDatumCriterion(
text_match_behavior=GrantaServerApiSearchTextMatchBehavior.EXACTMATCH,
value="Tensile Test Data",
),
)

search_body = GrantaServerApiSearchSearchRequest(
criterion=GrantaServerApiSearchRecordPropertyCriterion(
_property=GrantaServerApiSearchSearchableRecordProperty.RECORDTYPE,
inner_criterion=GrantaServerApiSearchDiscreteTextValuesDatumCriterion(
any=["Record", "Generic", "Folder"],
),
criterion=GrantaServerApiSearchBooleanCriterion(
all=[is_any_record_type],
_none=[is_in_tensile_test_data_table],
)
)
search_results = search_api.database_search(
Expand Down

0 comments on commit 46d0952

Please sign in to comment.