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

Fix issues in Ubuntu 24.04 #595

Merged
merged 8 commits into from
Jan 9, 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
13 changes: 7 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ jobs:
- name: Install Apache Spark
run: |
mkdir -p /opt
wget -q -O /opt/spark.tgz https://archive.apache.org/dist/spark/spark-3.0.0/spark-3.0.0-bin-hadoop2.7.tgz
wget -q -O /opt/spark.tgz https://archive.apache.org/dist/spark/spark-3.5.4/spark-3.5.4-bin-hadoop3.tgz
tar xzf /opt/spark.tgz -C /opt/
rm /opt/spark.tgz
export SPARK_HOME=/opt/spark-3.0.0-bin-hadoop2.7
echo "SPARK_HOME=/opt/spark-3.0.0-bin-hadoop2.7" >> $GITHUB_ENV
export PATH=$PATH:/opt/spark-3.0.0-bin-hadoop2.7/bin
echo "/opt/spark-3.0.0-bin-hadoop2.7/bin" >> $GITHUB_PATH
python -m pip install --upgrade --upgrade-strategy eager pyspark pytest-spark
export SPARK_HOME=/opt/spark-3.5.4-bin-hadoop3
echo "SPARK_HOME=/opt/spark-3.5.4-bin-hadoop3" >> $GITHUB_ENV
export PATH=$PATH:/opt/spark-3.5.4-bin-hadoop3/bin
echo "/opt/spark-3.5.4-bin-hadoop3/bin" >> $GITHUB_PATH
PYSPARK_HADOOP_VERSION=3 python -m pip install --upgrade --upgrade-strategy eager pyspark pytest-spark
sudo apt-get update && sudo apt-get install openjdk-8-jdk
- name: Install
run: python -m pip install -C--global-option=build -C--global-option=--debug -v '.[seisbench]'
- name: Test with pytest
Expand Down
2 changes: 1 addition & 1 deletion cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ endif ()
message (STATUS "YAML_CPP_LIBRARIES = ${YAML_CPP_LIBRARIES}")
message (STATUS "YAML_CPP_INCLUDE_DIR = ${YAML_CPP_INCLUDE_DIR}")

find_package (Boost 1.86.0 COMPONENTS serialization)
find_package (Boost 1.74.0 COMPONENTS serialization)
if (NOT Boost_FOUND)
message (STATUS "Building Boost")
include (cmake/boost.cmake)
Expand Down
8 changes: 4 additions & 4 deletions python/tests/test_mspass_client_spark_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_dask_scheduler(self, monkeypatch):
monkeypatch.undo()

def test_spark_scheduler(self, monkeypatch):
monkeypatch.setattr(SparkSession.builder, "appName", mock_excpt)
monkeypatch.setattr(SparkSession, "builder", mock_excpt)
with pytest.raises(
MsPASSError,
match="Runntime error: cannot create a spark configuration with: spark://168.0.0.1",
Expand All @@ -161,7 +161,7 @@ def test_spark_scheduler(self, monkeypatch):
monkeypatch.setenv("MSPASS_SCHEDULER", "spark")
monkeypatch.setenv("MSPASS_SCHEDULER_ADDRESS", "168.0.0.1")
monkeypatch.setenv("SPARK_MASTER_PORT", "12345")
monkeypatch.setattr(SparkSession.builder, "appName", mock_excpt)
monkeypatch.setattr(SparkSession, "builder", mock_excpt)
with pytest.raises(
MsPASSError,
match="Runntime error: cannot create a spark configuration with: spark://168.0.0.1:12345",
Expand Down Expand Up @@ -257,7 +257,7 @@ def test_set_scheduler(self, monkeypatch):
assert self.client._dask_client == temp_dask_client

# test set spark, previous is dask
monkeypatch.setattr(SparkSession.builder, "config", mock_excpt)
monkeypatch.setattr(SparkSession, "builder", mock_excpt)
with pytest.raises(
MsPASSError,
match="Runntime error: cannot create a spark configuration with: spark://168.1.2.3:7077",
Expand All @@ -271,7 +271,7 @@ def test_set_scheduler(self, monkeypatch):

# test set spark, previous is spark
test_client_2 = Client(scheduler="spark")
monkeypatch.setattr(SparkSession.builder, "config", mock_excpt)
monkeypatch.setattr(SparkSession, "builder", mock_excpt)
with pytest.raises(
MsPASSError,
match="Runntime error: cannot create a spark configuration with: spark://123.4.5.6:7077",
Expand Down
Loading