Skip to content

Commit b10c0ad

Browse files
committed
Merge branch 'main' into release/0.5
2 parents bdd52be + 5719369 commit b10c0ad

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# CHANGELOG
22

3-
This project uses [towncrier](https://towncrier.readthedocs.io/) to generate changelogs. You can see the changes for the upcoming release in <https://github.com/ansys/{repo-name}/tree/main/changelog.d/>.
3+
This project uses [towncrier](https://towncrier.readthedocs.io/) to generate changelogs. You can see the changes for the upcoming release in the [changelog fragment directory](https://github.com/ansys/pyansys-geometry/tree/main/doc/changelog.d).
44

55
<!-- towncrier release notes start -->
66

7-
## [0.5.0](https://github.com/ansys/pyansys-geometry/releases/tag/v0.5.0) - 2024-04-16
7+
## [0.5.0](https://github.com/ansys/pyansys-geometry/releases/tag/v0.5.0) - 2024-04-17
88

99

1010
### Added
@@ -51,6 +51,8 @@ This project uses [towncrier](https://towncrier.readthedocs.io/) to generate cha
5151
- fix: improper types being passed for Face and Edge ctor. [#1096](https://github.com/ansys/pyansys-geometry/pull/1096)
5252
- fix: return type should be dict and not ``ScalarMapContainer`` (grpc type) [#1103](https://github.com/ansys/pyansys-geometry/pull/1103)
5353
- fix: env version for Dockerfile Windows [#1120](https://github.com/ansys/pyansys-geometry/pull/1120)
54+
- fix: changelog description ill-formatted [#1121](https://github.com/ansys/pyansys-geometry/pull/1121)
55+
- fix: solve issues with intersphinx when releasing [#1123](https://github.com/ansys/pyansys-geometry/pull/1123)
5456

5557
### Dependencies
5658

doc/source/conf.py

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,40 @@ def get_wheelhouse_assets_dictionary():
5858
return assets
5959

6060

61+
def intersphinx_pyansys_geometry(switcher_version: str):
62+
"""
63+
Auxiliary method to build the intersphinx mapping for PyAnsys Geometry.
64+
65+
Notes
66+
-----
67+
If the objects.inv file is not found whenever it is a release, the method
68+
will default to the "dev" version. If the objects.inv file is not found
69+
for the "dev" version, the method will return an empty string.
70+
71+
Parameters
72+
----------
73+
switcher_version : str
74+
Version of the PyAnsys Geometry package.
75+
76+
Returns
77+
-------
78+
str
79+
The intersphinx mapping for PyAnsys Geometry.
80+
"""
81+
prefix = "https://geometry.docs.pyansys.com/version"
82+
83+
# Check if the object.inv file exists
84+
response = requests.get(f"{prefix}/{switcher_version}/objects.inv")
85+
86+
if response.status_code == 404:
87+
if switcher_version == "dev":
88+
return ""
89+
else:
90+
return intersphinx_pyansys_geometry("dev")
91+
else:
92+
return f"{prefix}/{switcher_version}"
93+
94+
6195
# Project information
6296
project = "ansys-geometry-core"
6397
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
@@ -136,9 +170,15 @@ def get_wheelhouse_assets_dictionary():
136170
"beartype": ("https://beartype.readthedocs.io/en/stable/", None),
137171
"docker": ("https://docker-py.readthedocs.io/en/stable/", None),
138172
"pypim": ("https://pypim.docs.pyansys.com/version/stable", None),
139-
"ansys.geometry.core": (f"https://geometry.docs.pyansys.com/version/{switcher_version}", None),
140173
}
141174

175+
# Conditional intersphinx mapping
176+
if intersphinx_pyansys_geometry(switcher_version):
177+
intersphinx_mapping["ansys.geometry.core"] = (
178+
intersphinx_pyansys_geometry(switcher_version),
179+
None,
180+
)
181+
142182
# numpydoc configuration
143183
numpydoc_show_class_members = False
144184
numpydoc_xref_param_type = True

0 commit comments

Comments
 (0)