Skip to content

BLD: add support for python 3.13 #1329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- ['3.10', cp310]
- ['3.11', cp311]
- ['3.12', cp312]
- ['3.13', cp313]
os_arch:
- [ubuntu-latest, manylinux_x86_64]
- [windows-latest, win_amd64]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest]
include:
- os: macos-latest
python-version: "3.10"
- os: macos-latest
python-version: 3.12
python-version: 3.13
- os: windows-latest
python-version: 3.9
- os: windows-latest
python-version: 3.12
python-version: 3.13

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Libraries",
Expand Down
5 changes: 2 additions & 3 deletions src/xtgeo/well/_well_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def _check_special_logs(dfr, mdlogname, zonelogname, strict, wname):

def export_rms_ascii(self, wfile, precision=4):
"""Export to RMS well format."""

with open(wfile, "w", encoding="utf-8") as fwell:
print("1.0", file=fwell)
print("Unknown", file=fwell)
Expand Down Expand Up @@ -225,7 +224,7 @@ def export_rms_ascii(self, wfile, precision=4):
# make the disc as is np.int
for lname in self.wlogtypes:
if self.wlogtypes[lname] == _AttrType.DISC.value:
tmpdf[[lname]] = tmpdf[[lname]].astype(int)
tmpdf[[lname]] = tmpdf[[lname]].fillna(-999).astype(int)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.13 seems somewhat stricter on casting, and also on escape character


cformat = "%-." + str(precision) + "f"
tmpdf.to_csv(
Expand All @@ -234,7 +233,7 @@ def export_rms_ascii(self, wfile, precision=4):
header=False,
index=False,
float_format=cformat,
escapechar=" ",
escapechar="\\",
mode="a",
)

Expand Down
Loading