forked from gmggroup/omf-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from MiraGeoscience/release/3.0.0
Release/3.0.0
- Loading branch information
Showing
66 changed files
with
5,100 additions
and
1,239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
[bumpversion] | ||
current_version = 0.9.0 | ||
files = omf/__init__.py setup.py README.rst | ||
|
||
current_version = 0.9.3 | ||
files = omf/__init__.py setup.py README.rst docs/conf.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ba | ||
nd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[run] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[flake8] | ||
ignore = E203, E266, E501, W503 | ||
max-line-length = 80 | ||
max-complexity = 16 | ||
select = B,C,E,F,W,T4,B9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# can only push Git LFS objects to public forks if the repository network already has Git LFS objects | ||
# or you have write access to the root of the repository network. | ||
# (from https://docs.github.com/en/repositories/working-with-files/managing-large-files/collaboration-with-git-large-file-storage) | ||
# | ||
#*.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
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/[email protected] | ||
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": "OMF"}]}' | ||
- name: Post JIRA link | ||
uses: peter-evans/create-or-update-comment@v2 | ||
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." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 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 -os "\b\(GA\|GEOPY\)-[0-9]\+" | head -n1)" >> $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')" >> $GITHUB_OUTPUT | ||
- name: Add comment | ||
if: ${{ steps.find_jira_key.outputs.issue_key }} | ||
env: | ||
ISSUE_SUMMARY: ${{ steps.get_jira_summary.outputs.summary }} | ||
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 PR_BODY "$(cat <<< $PR_BODY)" | ||
-c '."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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: pytest on Unix OS | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
- release/** | ||
- feature/** | ||
- hotfix/** | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
- release/** | ||
- feature/** | ||
- hotfix/** | ||
|
||
env: | ||
source_dir: omf | ||
|
||
jobs: | ||
pytest: | ||
name: pytest (Unix) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python_ver: ['3.8', '3.9', '3.10'] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: true | ||
POETRY_VIRTUALENVS_IN_PROJECT: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python_ver }} | ||
- name: Get full Python version | ||
id: full-python-version | ||
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python - --version 1.3.2 | ||
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | ||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
id: cache | ||
env: | ||
# Increase this value to reset cache if poetry.lock has not changed | ||
CACHE_NUMBER: 1 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}-{{ env.CACHE_NUMBER }} | ||
- name: Ensure cache is healthy | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: timeout 10s poetry run pip --version || rm -rf .venv | ||
- name: Install dependencies | ||
run: poetry install -vvv | ||
- name: pytest | ||
run: poetry run pytest --cov-report=xml --cov=${source_dir} --cov-branch --cov-fail-under=79 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: pytest on Windows | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
- release/** | ||
- feature/** | ||
- hotfix/** | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
- release/** | ||
- feature/** | ||
- hotfix/** | ||
|
||
env: | ||
source_dir: omf | ||
|
||
jobs: | ||
pytest: | ||
name: pytest (Windows) | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python_ver: ['3.8', '3.9', '3.10'] | ||
defaults: | ||
run: | ||
shell: bash | ||
runs-on: windows-latest | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: true | ||
POETRY_VIRTUALENVS_IN_PROJECT: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python_ver }} | ||
- name: Get full Python version | ||
id: full-python-version | ||
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python - --version 1.3.2 | ||
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | ||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
id: cache | ||
env: | ||
# Increase this value to reset cache if poetry.lock has not changed | ||
CACHE_NUMBER: 1 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}-{{ env.CACHE_NUMBER }} | ||
- name: Ensure cache is healthy | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: timeout 10s poetry run pip --version || rm -rf .venv | ||
- name: Install dependencies | ||
run: poetry install -vvv | ||
- name: pytest | ||
run: poetry run pytest --cov-report=xml --cov=${source_dir} --cov-branch --cov-fail-under=79 | ||
- name: Codecov | ||
if: ${{ success() && matrix.python_ver == '3.10' }} | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
name: GitHub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: static analysis | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- develop | ||
- main | ||
- release/** | ||
- feature/** | ||
- hotfix/** | ||
push: | ||
branches: | ||
- develop | ||
- main | ||
- release/** | ||
- feature/** | ||
- hotfix/** | ||
|
||
env: | ||
source_dir: omf | ||
|
||
jobs: | ||
pylint: | ||
name: pylint | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
POETRY_VIRTUALENVS_CREATE: true | ||
POETRY_VIRTUALENVS_IN_PROJECT: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python version | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Get full Python version | ||
id: full-python-version | ||
shell: bash | ||
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python - --version 1.3.2 | ||
echo "$HOME/.poetry/bin" >> $GITHUB_PATH | ||
- name: Set up cache | ||
uses: actions/cache@v3 | ||
id: cache | ||
env: | ||
# Increase this value to reset cache if poetry.lock has not changed | ||
CACHE_NUMBER: 1 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}-{{ env.CACHE_NUMBER }} | ||
- name: Ensure cache is healthy | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
shell: bash | ||
run: timeout 10s poetry run pip --version || rm -rf .venv | ||
- name: Install dependencies | ||
run: poetry install -vvv | ||
- name: capture modified files | ||
if: github.event_name == 'pull_request' | ||
run: >- | ||
git fetch --deepen=500 origin ${{github.base_ref}} | ||
&& echo "FILES_PARAM=$( | ||
git diff --diff-filter=AM --name-only refs/remotes/origin/${{github.base_ref}}... -- | grep -E "^(${source_dir}|tests)/.*\.py$" | xargs | ||
)" >> $GITHUB_ENV | ||
- name: Run pylint on modified files | ||
if: github.event_name == 'pull_request' && env.FILES_PARAM | ||
run: poetry run pylint $FILES_PARAM | ||
- name: Run pylint on all files | ||
if: github.event_name == 'push' | ||
run: poetry run pylint $source_dir/fileio/geoh5* tests |
Oops, something went wrong.