From f1f52edbd5b8a9593342864dfd1d0f25ac0c8c49 Mon Sep 17 00:00:00 2001 From: Ormorod Date: Thu, 19 May 2022 17:15:31 +0100 Subject: [PATCH 01/16] neighbor spelling (assuming we're sticking to American spelling!) --- src/polychord/clustering.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/polychord/clustering.f90 b/src/polychord/clustering.f90 index 9c49eb8c..4e805812 100644 --- a/src/polychord/clustering.f90 +++ b/src/polychord/clustering.f90 @@ -10,7 +10,7 @@ module KNN_clustering !! Points belong to the same cluster if they are in either of each others k !! nearest neighbor sets. !! - !! The algorithm computes the k nearest neihbor sets from the similarity + !! The algorithm computes the k nearest neighbor sets from the similarity !! matrix, and then tests recursive function NN_clustering(similarity_matrix,num_clusters) result(cluster_list) use utils_module, only: relabel @@ -113,7 +113,7 @@ function do_clustering_k(knn) result(c) ! If they're not in the same cluster already... if(c(i)/=c(j)) then - ! ... check to see if they are within each others k nearest neihbors... + ! ... check to see if they are within each others k nearest neighbors... if( neighbors( knn(:,i),knn(:,j) ) ) then ! If they are then relabel cluster_i and cluster_j to the smaller of the two From ff2b77b911379098870ce6c8dd8f8caf90b7a306 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:06:40 +0100 Subject: [PATCH 02/16] added macOS CI workflow --- .github/workflows/CI.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4284765e..3c1dc34e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: jobs: - pip: + pip: runs-on: ${{ matrix.os }} strategy: matrix: @@ -41,3 +41,35 @@ jobs: - name: Test pypolychord (MPI) run: mpirun -np 2 python run_pypolychord.py + + pip_macos: + runs-on: macos-12 + strategy: + matrix: + os: [ubuntu-latest] + python-version: [3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies (macOS) + run: | + python -m pip install --upgrade pip + brew install cmake openmpi gcc + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + + - name: Install pypolychord + run: pip install -v . + + - name: Test pypolychord + run: python run_pypolychord.py + + - name: Test pypolychord (MPI) + run: mpirun -np 2 python run_pypolychord.py From 548621744b5ecfb8c2f65e27a28eb23d7d6a6f4a Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:08:40 +0100 Subject: [PATCH 03/16] temporarily change workflow to occur on all pull requests --- .github/workflows/CI.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3c1dc34e..613e3d47 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,12 +1,12 @@ name: CI -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - schedule: - - cron: "0 0 * * *" +on: pull_request + # push: + # branches: [ master ] + # pull_request: + # branches: [ master ] + # schedule: + # - cron: "0 0 * * *" workflow_dispatch: From f34b4ec7db4ce21f8e675e60b6f0a602076334b8 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:10:11 +0100 Subject: [PATCH 04/16] temporarily removed on part entirely --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 613e3d47..b39008a7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,6 +1,6 @@ name: CI -on: pull_request +# on: # push: # branches: [ master ] # pull_request: From 951f8686bb41d9129430cdca50617aad5fcfdd97 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:11:28 +0100 Subject: [PATCH 05/16] =?UTF-8?q?corrected=20indentation=20=F0=9F=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b39008a7..77b5615e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -42,7 +42,7 @@ jobs: - name: Test pypolychord (MPI) run: mpirun -np 2 python run_pypolychord.py - pip_macos: + pip_macos: runs-on: macos-12 strategy: matrix: From f336a8480584fbd869dbb9584320d66b72304b77 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:16:30 +0100 Subject: [PATCH 06/16] add master-macos to pull request branches --- .github/workflows/CI.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 77b5615e..59a10271 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,12 +1,12 @@ name: CI -# on: - # push: - # branches: [ master ] - # pull_request: - # branches: [ master ] - # schedule: - # - cron: "0 0 * * *" +on: + push: + branches: [ master ] + pull_request: + branches: [ master, master-macos ] + schedule: + - cron: "0 0 * * *" workflow_dispatch: From 0efe604ab8a7ff0d1d3c04681a92cc8780052d1a Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:17:50 +0100 Subject: [PATCH 07/16] removed ubuntu from macos matrix --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 59a10271..b4fdd9fe 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -46,7 +46,6 @@ jobs: runs-on: macos-12 strategy: matrix: - os: [ubuntu-latest] python-version: [3.6, 3.7, 3.8] steps: From a3126ef2584f28b00b1bbd21dc248fab96ecbb40 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:19:00 +0100 Subject: [PATCH 08/16] changed pull request branch to ormorod:master-macos --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b4fdd9fe..9cdb92f1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master, master-macos ] + branches: [ master, ormorod:master-macos] schedule: - cron: "0 0 * * *" From 72e81c5a40885064c0b3e9646769b84564aa57d4 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:20:00 +0100 Subject: [PATCH 09/16] commented out workflow dispatch --- .github/workflows/CI.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9cdb92f1..4405c56f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,14 +1,14 @@ name: CI -on: - push: - branches: [ master ] - pull_request: - branches: [ master, ormorod:master-macos] - schedule: - - cron: "0 0 * * *" - - workflow_dispatch: +on: pull_request + # push: + # branches: [ master ] + # pull_request: + # branches: [ master, ormorod:master-macos] + # schedule: + # - cron: "0 0 * * *" + + # workflow_dispatch: jobs: pip: From 94b5729404cddddd7242d3bb8d21e6739cbe0398 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:23:16 +0100 Subject: [PATCH 10/16] schedule and workflow_dispatch commented out --- .github/workflows/CI.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4405c56f..8bbff630 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,10 +1,10 @@ name: CI -on: pull_request - # push: - # branches: [ master ] - # pull_request: - # branches: [ master, ormorod:master-macos] +on: + push: + branches: [ master ] + pull_request: + branches: [ master, ormorod:master-macos] # schedule: # - cron: "0 0 * * *" From e37e9b5476d10e87199c01a0fd8c6b8c1f60404c Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:26:56 +0100 Subject: [PATCH 11/16] on push --- .github/workflows/CI.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8bbff630..b55bc217 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,10 +1,10 @@ name: CI -on: - push: - branches: [ master ] - pull_request: - branches: [ master, ormorod:master-macos] +on: push + # push: + # branches: [ master ] + # pull_request: + # branches: [ master, ormorod:master-macos] # schedule: # - cron: "0 0 * * *" From fdd4da07b54682b5b7d82aaea59b7f5619d16f82 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:46:31 +0100 Subject: [PATCH 12/16] added main to pull request branches --- .github/workflows/CI.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b55bc217..77ae81d5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,14 +1,14 @@ name: CI -on: push - # push: - # branches: [ master ] - # pull_request: - # branches: [ master, ormorod:master-macos] +on: + push: + branches: [ master ] + pull_request: + branches: [ master, main] # schedule: # - cron: "0 0 * * *" - # workflow_dispatch: + workflow_dispatch: jobs: pip: From 984835ea6655ecc8d41e0dc5196de54da3bf42c4 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 14:54:07 +0100 Subject: [PATCH 13/16] added space --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 77ae81d5..9769e976 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,7 +4,7 @@ on: push: branches: [ master ] pull_request: - branches: [ master, main] + branches: [ master, main ] # schedule: # - cron: "0 0 * * *" From b81831056fd20808a4931db92eed386f50db71e5 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 15:01:16 +0100 Subject: [PATCH 14/16] removed unnecessary pip upgrade --- .github/workflows/CI.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9769e976..767d3542 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -60,10 +60,6 @@ jobs: python -m pip install --upgrade pip brew install cmake openmpi gcc - - name: Install dependencies - run: | - python -m pip install --upgrade pip - - name: Install pypolychord run: pip install -v . From 970c1eaa0246b276ab2726b70911f142a9919041 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 15:02:07 +0100 Subject: [PATCH 15/16] found the extra space. trying not to cry --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 767d3542..876bc0a2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ on: workflow_dispatch: jobs: - pip: + pip: runs-on: ${{ matrix.os }} strategy: matrix: From 0ff8fd00b5232f12a575437fa135bfc341535848 Mon Sep 17 00:00:00 2001 From: Adam Ormondroyd Date: Wed, 8 Jun 2022 15:07:39 +0100 Subject: [PATCH 16/16] macos-11, added python 3.9 --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 876bc0a2..cf6a2b28 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -43,10 +43,10 @@ jobs: run: mpirun -np 2 python run_pypolychord.py pip_macos: - runs-on: macos-12 + runs-on: macos-11 strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2