forked from equinor/xtgeo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
105 additions
and
69 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,4 @@ | ||
[flake8] | ||
exclude = docs/conf.py, src/xtgeo/cxtgeo/*.py, .eggs, _skbuild, tests/**/snapshots | ||
max-line-length = 88 | ||
ignore = E402, W503, E203, C901 | ||
exclude = docs/conf.py, src/xtgeo/cxtgeo/*.py, .eggs, tests/**/snapshots, _theversion.py |
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
name: Setup xtgeo testdata | ||
description: Set up the xtgeo test environment | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install test data | ||
shell: bash | ||
run: git clone --depth 1 https://github.com/equinor/xtgeo-testdata ../xtgeo-testdata |
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,25 @@ | ||
name: Setup xtgeo | ||
description: Set up the xtgeo test environment | ||
|
||
inputs: | ||
python-version: | ||
required: true | ||
type: string | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install test data | ||
shell: bash | ||
run: git clone --depth 1 https://github.com/equinor/xtgeo-testdata ../xtgeo-testdata | ||
|
||
- name: Build and install xtgeo | ||
shell: bash | ||
run: | | ||
pip install -U pip | ||
pip install ".[dev]" |
This file was deleted.
Oops, something went wrong.
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
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,19 +1,31 @@ | ||
name: linting | ||
name: Linting | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Check black style and linting | ||
run: | | ||
pip install black | ||
pip freeze | ||
black --check *.py src tests --extend-exclude tests/**/snapshots --extend-exclude src/xtgeo/grid3d/grid_properties.py | ||
pip install flake8 | ||
flake8 src tests | ||
fetch-depth: 0 | ||
|
||
- name: Setup xtgeo | ||
uses: "./.github/actions/setup_xtgeo" | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: List dependencies | ||
run: pip freeze | ||
|
||
- name: Lint with isort | ||
if: ${{ always() }} | ||
run: isort --check-only src tests | ||
|
||
- name: Lint with black | ||
if: ${{ always() }} | ||
run: black src tests | ||
|
||
- name: Lint with flake8 | ||
if: ${{ always() }} | ||
run: flake8 src tests |
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
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 |
---|---|---|
|
@@ -82,3 +82,4 @@ pip-wheel-metadata/ | |
.vscode/ | ||
.venv*/ | ||
.nfs* | ||
tmp/ |