Skip to content

Commit

Permalink
Merge branch 'main' into release/0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RobPasMue committed Jun 4, 2024
2 parents 87332c7 + 102cb0e commit f22e6bd
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ jobs:
python3-pip \
wget \
binutils \
ruby-devel \
rubygems \
rpm-build \
openssl \
fontconfig-devel \
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repos:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args: ["--toml", "pyproject.toml"]
Expand All @@ -54,7 +54,7 @@ repos:

# this validates our github workflow files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.3
rev: 0.28.4
hooks:
- id: check-github-workflows

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ contributors and maintainers pledge to making participation in our
project and our community a harassment-free experience for everyone,
regardless of age, body size, disability, ethnicity, sex
characteristics, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance,
education, socioeconomic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.

## Our Standards
Expand Down
23 changes: 11 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,29 @@ tests = [
"packaging==24.0",
"PyGithub==2.3.0",
"appdirs==1.4.4",
"requests==2.31.0",
"PySide6==6.7.0",
"ansys-tools-path==0.5.2",
"pytest==8.2.0",
"requests==2.32.3",
"PySide6==6.7.1",
"ansys-tools-path==0.6.0",
"pytest==8.2.1",
"pytest-cov==5.0.0",
"pytest-qt==4.4.0",
"setuptools==69.5.1",
"setuptools==70.0.0",
]
doc = [
"Sphinx==7.3.7",
"ansys-sphinx-theme==0.15.2",
"ansys-sphinx-theme==0.16.5",
"sphinx-copybutton==0.5.2",
"sphinx_design==0.5.0",
"sphinx_design==0.6.0",
"sphinx_toolbox==3.5.0",
]
freeze = [
"pyinstaller==6.6.0",
"pyinstaller==6.7.0",
"packaging==24.0",
"PyGithub==2.3.0",
"appdirs==1.4.4",
"requests==2.31.0",
"PySide6==6.7.0",
"ansys-tools-path==0.5.2",
"requests==2.32.3",
"PySide6==6.7.1",
"ansys-tools-path==0.6.0",
]

[tool.flit.module]
Expand Down Expand Up @@ -88,7 +88,6 @@ line-length = 100
profile = "black"
force_sort_within_sections = true
line_length = 100
default_section = "THIRDPARTY"
src_paths = ["doc", "src", "tests"]

[tool.coverage.run]
Expand Down
2 changes: 1 addition & 1 deletion scripts/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
requests==2.31.0
requests==2.32.3
packaging==24.0
29 changes: 17 additions & 12 deletions src/ansys/tools/installer/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,23 @@ def get_pkg_versions(pkg_name):
"""
session = requests.Session()
session.verify = False
url = f"https://pypi.python.org/pypi/{pkg_name}/json"

try:
releases = json.loads(requests.get(url, verify=certifi.where()).content)[
"releases"
]
all_versions = sorted(releases, key=parse_version, reverse=True)
if pkg_name == "pyansys":
all_versions = [x for x in all_versions if int(x.split(".")[0]) > 0]
except (requests.exceptions.SSLError, requests.exceptions.ConnectionError):
LOG.warning(f"Cannot connect to {url}... No version listed.")
all_versions = [""]
urls = [
f"https://pypi.python.org/pypi/{pkg_name}/json",
f"https://pypi.org/pypi/{pkg_name}/json",
]
all_versions = [""]

for url in urls:
try:
releases = json.loads(requests.get(url, verify=certifi.where()).content)[
"releases"
]
all_versions = sorted(releases, key=parse_version, reverse=True)
if pkg_name == "pyansys":
all_versions = [x for x in all_versions if int(x.split(".")[0]) > 0]
break
except (requests.exceptions.SSLError, requests.exceptions.ConnectionError):
LOG.warning(f"Cannot connect to {url}... No version listed.")

session.verify = True

Expand Down

0 comments on commit f22e6bd

Please sign in to comment.