Skip to content
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

Added 313 to PyPi publish #218

Merged
merged 6 commits into from
Oct 16, 2024
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
15 changes: 14 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ jobs:
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
python_version: "3.12"
- os: ubuntu-22.04
python: 313
platform_id: manylinux_x86_64
manylinux_image: manylinux2014
python_version: "3.13"

# MacOS x86_64
- os: macos-12
Expand All @@ -63,6 +68,10 @@ jobs:
python: 312
platform_id: macosx_x86_64
python_version: "3.12"
- os: macos-12
python: 313
platform_id: macosx_x86_64
python_version: "3.13"

# MacOS arm64
- os: macos-14
Expand All @@ -81,6 +90,10 @@ jobs:
python: 312
platform_id: macosx_arm64
python_version: "3.12"
- os: macos-14
python: 313
platform_id: macosx_arm64
python_version: "3.13"

steps:
- name: Checkout LePhare
Expand Down Expand Up @@ -114,7 +127,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Optional, use if you use setuptools_scm
submodules: true # Optional, use if you have submodules
submodules: recursive # Optional, use if you have submodules

- name: Build SDist
run: pipx run build --sdist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testing-and-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
INCLUDE_COVERAGE: TRUE
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand All @@ -43,7 +43,7 @@ jobs:

- name: Collect C++ coverage
run: |
lcov --output-file coverage.cpp --capture --directory build
lcov --output-file coverage.cpp --capture --directory build --rc geninfo_unexecuted_blocks=1 --ignore-errors mismatch,gcov
lcov --output-file coverage.cpp --extract coverage.cpp $PWD/src/"*"
cat coverage.lcov coverage.cpp > coverage.txt

Expand Down
11 changes: 10 additions & 1 deletion tests/lephare/test_data_retrieval.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,16 @@ def test_read_list_file_remote(mock_get):

def test_make_default_retriever(data_registry_file):
mock_registry_content = "file1.txt hash1\nfile2.txt hash2"
with patch("builtins.open", mock_open(read_data=mock_registry_content)):

# Create a mock_open instance
m_open = mock_open(read_data=mock_registry_content)

# Mock __enter__ and __exit__ for context management
m_open.return_value.__enter__ = lambda self: self
m_open.return_value.__exit__ = lambda self, exc_type, exc_val, exc_tb: None

# Patch the built-in open method with the mocked version
with patch("builtins.open", m_open):
retriever = make_default_retriever()
assert retriever.base_url == DEFAULT_BASE_DATA_URL
assert retriever.path == Path(DEFAULT_LOCAL_DATA_PATH)
Expand Down
Loading