From 06efe927ff555ba1596c6cb9bd453568e3c50b09 Mon Sep 17 00:00:00 2001 From: sebhmg Date: Thu, 4 Jul 2024 22:52:25 -0400 Subject: [PATCH 1/8] restrict versions of geoh5py to 0.9.* and 0.10.* --- pyproject.toml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fa013f6b93..c6605ad98b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,11 +46,17 @@ include = [ ] [tool.poetry.dependencies] +python = "^3.10" + discretize = ">=0.8.0" empymod = ">=2.0.0" geoana = "*" -geoh5py = {version = "*", allow-prereleases = true} -#geoh5py = {url = "http://localhost:8888/geoh5py.tar.gz#sha256="} + +geoh5py = {version = ">=0.9.1, <0.11", allow-prereleases = true} +#geoh5py = {url = "https://github.com/MiraGeoscience/geoh5py/archive/refs/heads/develop.tar.gz"} +#geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "develop"} +#geoh5py = {url = "http://localhost:8888/geoh5py.tar.gz"} + matplotlib = "*" numpy = ">=1.20" pandas = "*" From 35d7ea9da9ee4c3f69193de5ba28ff1c3b224aa1 Mon Sep 17 00:00:00 2001 From: sebhmg Date: Thu, 4 Jul 2024 23:56:23 -0400 Subject: [PATCH 2/8] Revert "Merge remote-tracking branch 'upstream/develop' into GEOPY-1617" - do not force usage of intel OpenMP as it conlfict with LLVM on Linux - do not force versions from simpeg (yet). Other packages can specify them This reverts commit 525b023c8d77917bdd51ecefa7ed73f48ead5593, reversing changes made to 06efe927ff555ba1596c6cb9bd453568e3c50b09. --- pyproject.toml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7c23983a1b..c6605ad98b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,11 +59,6 @@ geoh5py = {version = ">=0.9.1, <0.11", allow-prereleases = true} matplotlib = "*" numpy = ">=1.20" -mkl = "2023.2.0" # from simpeg -pydiso = "~0.0.5" # from simpeg -tbb = "2021.12.0" -tzdata = "2023.4" # through pandas from SimPEG -intel-openmp = "2023.2.0" # from simpeg pandas = "*" pymatsolver = ">=0.2" scikit-learn = ">=1.2" @@ -103,7 +98,7 @@ dask = [ [tool.conda-lock] platforms = ['win-64', 'osx-64', 'linux-64'] -channels = ['conda-forge', 'intel'] +channels = ['conda-forge', 'defaults'] [tool.black] # defaults are just fine From 008f932470bd0a80ab37d409e32fb26a7eabadce Mon Sep 17 00:00:00 2001 From: sebhmg Date: Fri, 5 Jul 2024 00:04:21 -0400 Subject: [PATCH 3/8] GEOPY-1617: not using conda-lock here --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c6605ad98b..cdf2f72b70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,10 +96,6 @@ dask = [ "zarr", ] -[tool.conda-lock] -platforms = ['win-64', 'osx-64', 'linux-64'] -channels = ['conda-forge', 'defaults'] - [tool.black] # defaults are just fine From 3f98e304647a711679dc87fb9499b3c79779050b Mon Sep 17 00:00:00 2001 From: sebhmg Date: Thu, 27 Jun 2024 00:17:45 -0400 Subject: [PATCH 4/8] GEOPY-1617: apply version constraints from upstream simpeg # Conflicts: # pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cdf2f72b70..adaab583b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,9 +48,9 @@ include = [ [tool.poetry.dependencies] python = "^3.10" -discretize = ">=0.8.0" +discretize = ">=0.10.0" empymod = ">=2.0.0" -geoana = "*" +geoana = ">=0.5.0" geoh5py = {version = ">=0.9.1, <0.11", allow-prereleases = true} #geoh5py = {url = "https://github.com/MiraGeoscience/geoh5py/archive/refs/heads/develop.tar.gz"} From 39b1280eced682157ce196b31e5d9b56cfbe3f84 Mon Sep 17 00:00:00 2001 From: sebhmg Date: Fri, 5 Jul 2024 00:08:39 -0400 Subject: [PATCH 5/8] GEOPY-1617: minor reformating: section with git dependencies --- pyproject.toml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index adaab583b3..86b26ab17e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,12 +51,6 @@ python = "^3.10" discretize = ">=0.10.0" empymod = ">=2.0.0" geoana = ">=0.5.0" - -geoh5py = {version = ">=0.9.1, <0.11", allow-prereleases = true} -#geoh5py = {url = "https://github.com/MiraGeoscience/geoh5py/archive/refs/heads/develop.tar.gz"} -#geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "develop"} -#geoh5py = {url = "http://localhost:8888/geoh5py.tar.gz"} - matplotlib = "*" numpy = ">=1.20" pandas = "*" @@ -69,6 +63,13 @@ distributed = {version = "*", optional = true} fsspec = {version = ">=0.3.3", optional = true} zarr = {version = "*", optional = true} +## Pip dependencies from Git repositories +#---------------------------------------- +geoh5py = {version = ">=0.9.1, <0.11", allow-prereleases = true} +#geoh5py = {url = "https://github.com/MiraGeoscience/geoh5py/archive/refs/heads/develop.tar.gz"} +#geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "develop"} +#geoh5py = {url = "http://localhost:8888/geoh5py.tar.gz"} + [tool.poetry.group.dev.dependencies] black = "*" jupyter = "*" From 87fa5695557f1322aa164927f8d61daa5f00979c Mon Sep 17 00:00:00 2001 From: sebhmg Date: Fri, 5 Jul 2024 00:19:23 -0400 Subject: [PATCH 6/8] workflow to create JIRA issue from Github issue --- .github/workflows/issue_to_jira.yml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/issue_to_jira.yml diff --git a/.github/workflows/issue_to_jira.yml b/.github/workflows/issue_to_jira.yml new file mode 100644 index 0000000000..efedc47662 --- /dev/null +++ b/.github/workflows/issue_to_jira.yml @@ -0,0 +1,36 @@ +# This workflow will create a JIRA issue upon creation of a GitHub issue + +name: Create JIRA issue + +on: + issues: + types: [opened] + +jobs: + new_jira_issue: + runs-on: ubuntu-latest + + steps: + - name: JIRA Login + uses: atlassian/gajira-login@v3.0.1 + env: + JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} + JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} + JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} + - name: Jira Create issue + id: create_jira_issue + uses: atlassian/gajira-create@v3.0.1 + with: + project: GEOPY + issuetype: Story + summary: ${{ github.event.issue.title }} + description: "_from [GitHub issue #${{ github.event.issue.number }}|${{ github.event.issue.html_url }}]_" + # Additional fields in JSON format + fields: '{"components": [{"name": "simpeg"}]}' + - name: Post JIRA link + uses: peter-evans/create-or-update-comment@v3 + with: + # The number of the issue or pull request in which to create a comment. + issue-number: ${{ github.event.issue.number }} + # The comment body. + body: "JIRA issue [${{ steps.create_jira_issue.outputs.issue }}] was created." From 91db4415f8b4113b391467422cb020b0ab23dac7 Mon Sep 17 00:00:00 2001 From: sebhmg Date: Fri, 5 Jul 2024 00:19:59 -0400 Subject: [PATCH 7/8] workflow to auto-add summary from JIRA issue ID --- .github/workflows/pr_add_jira_summary.yml | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/pr_add_jira_summary.yml diff --git a/.github/workflows/pr_add_jira_summary.yml b/.github/workflows/pr_add_jira_summary.yml new file mode 100644 index 0000000000..f0c8a8dda0 --- /dev/null +++ b/.github/workflows/pr_add_jira_summary.yml @@ -0,0 +1,64 @@ +# This workflow will comment the PR with the JIRA issue summary +# if a JIRA issue number is detected in the branch name or title + +name: Add JIRA issue summary + +on: + pull_request_target: + types: [opened] + +jobs: + add_jira_summary: + runs-on: ubuntu-latest + + steps: + - name: Find JIRA issue key + id: find_jira_key + env: + HEAD_REF: ${{ github.head_ref}} + PR_TITLE: ${{ github.event.pull_request.title }} + run: > + echo $HEAD_REF $PR_TITLE + | echo "issue_key=$( + grep -osi "\b\(GA\|GEOPY\|DEVOPS\)[ #-]*[0-9]\+" + | head -n1 + | sed -E "s/([A-Z]+)[-# ]*([0-9]+)/\1-\2/i" + | tr [:lower:] [:upper:] + )" + >> $GITHUB_OUTPUT + - name: Get JIRA summary + id: get_jira_summary + if: ${{ steps.find_jira_key.outputs.issue_key }} + env: + JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} + JIRA_BASIC_AUTH: ${{ secrets.JIRA_BASIC_AUTH }} + run: > + curl -sS -X GET + -H "Authorization: Basic $JIRA_BASIC_AUTH" + -H "Content-Type: application/json" + "$JIRA_BASE_URL/rest/api/2/issue/${{ steps.find_jira_key.outputs.issue_key }}" + | echo "summary=$(jq -r '.fields.summary // empty')" >> $GITHUB_OUTPUT + - name: Extract PR title + id: get_pr_title + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + echo "text=$(echo $PR_TITLE | sed -E "s/^\s*[?[A-Z]+[-# ]*[0-9]+]?[-: ]*(.*)/\1/i")" >> $GITHUB_OUTPUT + - name: Add comment + if: ${{ steps.find_jira_key.outputs.issue_key }} + env: + ISSUE_SUMMARY: ${{ steps.get_jira_summary.outputs.summary }} + TITLE_TEXT: ${{ steps.get_pr_title.outputs.text }} + PR_BODY: ${{ github.event.pull_request.body }} + run: > + jq + --arg ISSUE_ID "${{ steps.find_jira_key.outputs.issue_key }}" + --arg ISSUE_SUMMARY "$(cat <<< $ISSUE_SUMMARY)" + --arg TITLE_TEXT "$(cat <<< ${TITLE_TEXT:-$ISSUE_SUMMARY})" + --arg PR_BODY "$(cat <<< $PR_BODY)" + -c '{"title": ($ISSUE_ID + ": " + $TITLE_TEXT), "body": ("**" + $ISSUE_ID + " - " + $ISSUE_SUMMARY + "**\n" + $PR_BODY)}' <<< {} + | curl -sS -X POST -d @- + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" + -H "Content-Type: application/json" + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/${{ github.event.pull_request.number }}" + > /dev/null From e25d50ae14a898e2055112eabf0492a5d839b62b Mon Sep 17 00:00:00 2001 From: sebhmg Date: Fri, 5 Jul 2024 00:28:15 -0400 Subject: [PATCH 8/8] package name: all lower case --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 86b26ab17e..6aad91864c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ #parameter estimation in the context of geophysical applications. [tool.poetry] -name = "Mira-SimPEG" +name = "mira-simpeg" version = "0.21.2.1-alpha.1" license = "MIT" description = "Mira Geoscience fork of SimPEG: Simulation and Parameter Estimation in Geophysics"