Skip to content

Commit

Permalink
Merge pull request #56 from MiraGeoscience/release/0.1.0
Browse files Browse the repository at this point in the history
GEOPY-1489: merge Release/0.1.0 to main
  • Loading branch information
sebhmg authored Jun 17, 2024
2 parents 2e8dc27 + 929078d commit 201f9d1
Show file tree
Hide file tree
Showing 136 changed files with 15,759 additions and 5,779 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.pt filter=lfs diff=lfs merge=lfs -text
*.geoh5 filter=lfs diff=lfs merge=lfs -text
/assets/** filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.min.js filter=lfs diff=lfs merge=lfs -text
97 changes: 0 additions & 97 deletions .github/workflows/create_env_file.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/issue_to_jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# Additional fields in JSON format
fields: '{"components": [{"name": "peak-finder-app"}]}'
- name: Post JIRA link
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
# The number of the issue or pull request in which to create a comment.
issue-number: ${{ github.event.issue.number }}
Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/pr_add_jira_summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ jobs:
PR_TITLE: ${{ github.event.pull_request.title }}
run: >
echo $HEAD_REF $PR_TITLE
| echo "issue_key=$(grep -os "\b\(GA\|GEOPY\)-[0-9]\+" | head -n1)" >> $GITHUB_OUTPUT
| 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 }}
Expand All @@ -31,18 +37,26 @@ jobs:
-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')" >> $GITHUB_OUTPUT
| 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 '."body"="**" + $ISSUE_ID + " - " + $ISSUE_SUMMARY + "**\n" + $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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: pytest on Unix OS

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
- main
Expand All @@ -20,35 +21,33 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
source_dir: peak_finder

jobs:
pytest:
name: pytest (Unix)
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
python_ver: ['3.9', '3.10']
os: [ubuntu-latest, macos-latest]
python_ver: ['3.10']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
env:
PYTHONUTF8: 1
CONDA_LOCK_ENV_FILE: environments/conda-py-${{ matrix.python_ver }}-${{ startsWith(matrix.os, 'macos') && 'osx' || 'linux' }}-64-dev.lock.yml
PIP_EXTRA_INDEX_URL: https://test.pypi.org/simple/
CONDA_CHANNEL_PRIORITY: strict
PIP_NO_DEPS: 1 # all dependencies are installed from conda
CONDA_LOCK_ENV_FILE: environments/py-${{ matrix.python_ver }}-${{ startsWith(matrix.os, 'macos') && 'osx' || 'linux' }}-64-dev.conda.lock.yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- name: Setup conda env
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ env.CONDA_LOCK_ENV_FILE }}
environment-name: test_env
cache-downloads: true
- name: pytest
run: |
pytest --cov=${source_dir} --cov-report=xml --cov-branch
run: pytest --cov --cov-report=xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: pytest on Windows

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
- main
Expand All @@ -20,39 +21,40 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
source_dir: peak_finder

jobs:
pytest:
name: pytest (Windows)
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
python_ver: ['3.9', '3.10']
python_ver: ['3.10']
defaults:
run:
shell: powershell
runs-on: windows-latest
env:
PYTHONUTF8: 1
CONDA_LOCK_ENV_FILE: environments/conda-py-${{ matrix.python_ver }}-win-64-dev.lock.yml
PIP_EXTRA_INDEX_URL: https://test.pypi.org/simple/
CONDA_CHANNEL_PRIORITY: strict
PIP_NO_DEPS: 1 # all dependencies are installed from conda
CONDA_LOCK_ENV_FILE: environments/py-${{ matrix.python_ver }}-win-64-dev.conda.lock.yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
- name: Setup conda env
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ env.CONDA_LOCK_ENV_FILE }}
environment-name: test_env
init-shell: powershell
cache-downloads: true
- name: pytest
run: |
pytest --cov=${source_dir} --cov-report=xml --cov-branch
run: pytest --cov --cov-report=xml
- name: Codecov
if: ${{ success() && matrix.python_ver == '3.9' }}
uses: codecov/codecov-action@v3
if: ${{ success() && matrix.python_ver == '3.10' }}
uses: codecov/codecov-action@v4
with:
name: GitHub
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
13 changes: 8 additions & 5 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: static analysis

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
- main
Expand All @@ -26,18 +27,20 @@ env:
jobs:
pylint:
name: pylint
runs-on: windows-latest
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
PYTHONUTF8: 1
CONDA_LOCK_ENV_FILE: environments/conda-py-3.9-win-64-dev.lock.yml
PIP_EXTRA_INDEX_URL: https://test.pypi.org/simple/
CONDA_CHANNEL_PRIORITY: strict
PIP_NO_DEPS: 1 # all dependencies are installed from conda
CONDA_LOCK_ENV_FILE: environments/py-3.10-linux-64-dev.conda.lock.yml
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup conda env
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ env.CONDA_LOCK_ENV_FILE }}
environment-name: linter_env
Expand Down
Loading

0 comments on commit 201f9d1

Please sign in to comment.