Skip to content

Commit cdc4c59

Browse files
authored
Merge pull request #68 from MiraGeoscience/merge_release_to_develop
Merge release to develop
2 parents 59133af + 652d5f1 commit cdc4c59

5 files changed

Lines changed: 17 additions & 122 deletions

File tree

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,12 @@
1-
# This workflow will create a JIRA issue upon creation of a GitHub issue
2-
31
name: Create JIRA issue
42

53
on:
64
issues:
75
types: [opened]
86

97
jobs:
10-
new_jira_issue:
11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- name: JIRA Login
15-
uses: atlassian/gajira-login@v3.0.1
16-
env:
17-
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
18-
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
19-
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
20-
- name: Jira Create issue
21-
id: create_jira_issue
22-
uses: atlassian/gajira-create@v3.0.1
23-
with:
24-
project: GEOPY
25-
issuetype: Story
26-
summary: ${{ github.event.issue.title }}
27-
description: "_from [GitHub issue #${{ github.event.issue.number }}|${{ github.event.issue.html_url }}]_"
28-
# Additional fields in JSON format
29-
fields: '{"components": [{"name": "simpeg"}]}'
30-
- name: Post JIRA link
31-
uses: peter-evans/create-or-update-comment@v3
32-
with:
33-
# The number of the issue or pull request in which to create a comment.
34-
issue-number: ${{ github.event.issue.number }}
35-
# The comment body.
36-
body: "JIRA issue [${{ steps.create_jira_issue.outputs.issue }}] was created."
8+
call-workflow-create-jira-issue:
9+
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-issue_to_jira.yml@main
10+
secrets: inherit
11+
with:
12+
project-key: 'GEOPY'
Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,10 @@
1-
# This workflow will comment the PR with the JIRA issue summary
2-
# if a JIRA issue number is detected in the branch name or title
3-
41
name: Add JIRA issue summary
52

63
on:
74
pull_request_target:
85
types: [opened]
96

107
jobs:
11-
add_jira_summary:
12-
runs-on: ubuntu-latest
13-
14-
steps:
15-
- name: Find JIRA issue key
16-
id: find_jira_key
17-
env:
18-
HEAD_REF: ${{ github.head_ref}}
19-
PR_TITLE: ${{ github.event.pull_request.title }}
20-
run: >
21-
echo $HEAD_REF $PR_TITLE
22-
| echo "issue_key=$(
23-
grep -osi "\b\(GA\|GEOPY\|DEVOPS\)[ #-]*[0-9]\+"
24-
| head -n1
25-
| sed -E "s/([A-Z]+)[-# ]*([0-9]+)/\1-\2/i"
26-
| tr [:lower:] [:upper:]
27-
)"
28-
>> $GITHUB_OUTPUT
29-
- name: Get JIRA summary
30-
id: get_jira_summary
31-
if: ${{ steps.find_jira_key.outputs.issue_key }}
32-
env:
33-
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
34-
JIRA_BASIC_AUTH: ${{ secrets.JIRA_BASIC_AUTH }}
35-
run: >
36-
curl -sS -X GET
37-
-H "Authorization: Basic $JIRA_BASIC_AUTH"
38-
-H "Content-Type: application/json"
39-
"$JIRA_BASE_URL/rest/api/2/issue/${{ steps.find_jira_key.outputs.issue_key }}"
40-
| echo "summary=$(jq -r '.fields.summary // empty')" >> $GITHUB_OUTPUT
41-
- name: Extract PR title
42-
id: get_pr_title
43-
env:
44-
PR_TITLE: ${{ github.event.pull_request.title }}
45-
run: |
46-
echo "text=$(echo $PR_TITLE | sed -E "s/^\s*[?[A-Z]+[-# ]*[0-9]+]?[-: ]*(.*)/\1/i")" >> $GITHUB_OUTPUT
47-
- name: Add comment
48-
if: ${{ steps.find_jira_key.outputs.issue_key }}
49-
env:
50-
ISSUE_SUMMARY: ${{ steps.get_jira_summary.outputs.summary }}
51-
TITLE_TEXT: ${{ steps.get_pr_title.outputs.text }}
52-
PR_BODY: ${{ github.event.pull_request.body }}
53-
run: >
54-
jq
55-
--arg ISSUE_ID "${{ steps.find_jira_key.outputs.issue_key }}"
56-
--arg ISSUE_SUMMARY "$(cat <<< $ISSUE_SUMMARY)"
57-
--arg TITLE_TEXT "$(cat <<< ${TITLE_TEXT:-$ISSUE_SUMMARY})"
58-
--arg PR_BODY "$(cat <<< $PR_BODY)"
59-
-c '{"title": ($ISSUE_ID + ": " + $TITLE_TEXT), "body": ("**" + $ISSUE_ID + " - " + $ISSUE_SUMMARY + "**\n" + $PR_BODY)}' <<< {}
60-
| curl -sS -X POST -d @-
61-
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}"
62-
-H "Content-Type: application/json"
63-
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/${{ github.event.pull_request.number }}"
64-
> /dev/null
8+
call-workflow-add-jira-issue-summary:
9+
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-pr_add_jira_summary.yml@main
10+
secrets: inherit

meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "mira-simpeg" %}
2-
{% set version = "0.21.2.1b3" %}
2+
{% set version = "0.21.2.1rc1" %}
33

44
package:
55
name: {{ name|lower }}
@@ -15,7 +15,7 @@ build:
1515

1616
requirements:
1717
host:
18-
- python >=3.10
18+
- python >=3.10.0,<3.12.0
1919
- poetry-core >=1.0.0
2020
- setuptools >=64
2121
- setuptools_scm >=8

simpeg/dask/potential_fields/base.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ def dask_linear_operator(self):
9393
# Check that loaded kernel matches supplied data and mesh
9494
print("Zarr file detected with same shape and chunksize ... re-loading")
9595
return kernel
96-
else:
97-
print("Writing Zarr file to disk")
98-
with ProgressBar():
99-
print("Saving kernel to zarr: " + sens_name)
100-
kernel = array.to_zarr(
101-
stack, sens_name, compute=True, return_stored=True, overwrite=True
102-
)
96+
97+
print("Writing Zarr file to disk")
98+
with ProgressBar():
99+
print("Saving kernel to zarr: " + sens_name)
100+
kernel = array.to_zarr(
101+
stack, sens_name, compute=True, return_stored=True, overwrite=True
102+
)
103103
elif forward_only:
104104
with ProgressBar():
105105
print("Forward calculation: ")

simpeg/potential_fields/base.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def __init__(
7575
self,
7676
mesh,
7777
ind_active=None,
78-
store_sensitivities="ram",
7978
n_processes=1,
8079
sensitivity_dtype=np.float32,
8180
engine="geoana",
@@ -93,7 +92,6 @@ def __init__(
9392
"forwardOnly was removed in SimPEG 0.17.0, please set store_sensitivities=None"
9493
)
9594

96-
self.store_sensitivities = store_sensitivities
9795
self.sensitivity_dtype = sensitivity_dtype
9896
self.engine = engine
9997
self.numba_parallel = numba_parallel
@@ -148,31 +146,6 @@ def __init__(
148146
self._nodes = nodes[unique] # unique active nodes
149147
self._unique_inv = unique_inv.reshape(cell_nodes.T.shape)
150148

151-
@property
152-
def store_sensitivities(self):
153-
"""Options for storing sensitivities.
154-
155-
There are 3 options:
156-
157-
- 'ram': sensitivity matrix stored in RAM
158-
- 'disk': sensitivities written and stored to disk
159-
- 'forward_only': sensitivities are not store (only use for forward simulation)
160-
161-
Returns
162-
-------
163-
{'disk', 'ram', 'forward_only'}
164-
A string defining the model type for the simulation.
165-
"""
166-
if self._store_sensitivities is None:
167-
self._store_sensitivities = "ram"
168-
return self._store_sensitivities
169-
170-
@store_sensitivities.setter
171-
def store_sensitivities(self, value):
172-
self._store_sensitivities = validate_string(
173-
"store_sensitivities", value, ["disk", "ram", "forward_only"]
174-
)
175-
176149
@property
177150
def sensitivity_dtype(self):
178151
"""dtype of the sensitivity matrix.

0 commit comments

Comments
 (0)