Skip to content

Commit 2841967

Browse files
committed
merged
2 parents 075d7f7 + 1442fd3 commit 2841967

File tree

110 files changed

+219192
-223342
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+219192
-223342
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[run]
2+
omit = *docs*, *tests*, *_version.py, *__init__.py, *__main__.py

.github/workflows/build-docs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build docs
2+
3+
on:
4+
push:
5+
branches: [ develop, master ]
6+
release:
7+
types: [ published ]
8+
9+
jobs:
10+
deploy:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.x'
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install .[docs]
24+
- name: Update docs
25+
run: |
26+
cd docs
27+
make html
28+
- name: Deploy
29+
uses: JamesIves/[email protected]
30+
with:
31+
branch: gh-pages
32+
folder: docs/_build/html

.github/workflows/pypi-release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Publish to PyPI
10+
11+
on:
12+
release:
13+
types: [ published ]
14+
15+
jobs:
16+
deploy:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: '3.x'
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install build
30+
- name: Build package
31+
run: |
32+
python -m build
33+
- name: Publish package
34+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
35+
with:
36+
user: __token__
37+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/run-tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Run tests
5+
6+
on:
7+
push:
8+
branches: [ develop, master ]
9+
pull_request:
10+
branches: [ develop ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install .[test]
31+
- name: Test with pytest
32+
run: |
33+
python run_tests.py

.gitignore

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
test.las
2-
tutorial/.ipynb_checkpoints
1+
# Keep out of change control.
2+
docs/_notebooks
3+
_version.py
4+
.ipynb_checkpoints
35
.vscode
46

7+
# Mac
8+
.DS_Store
9+
510
# Byte-compiled / optimized / DLL files
611
__pycache__/
712
*.py[cod]
@@ -60,3 +65,9 @@ docs/_build/
6065
# PyBuilder
6166
target/
6267

68+
# PyCharm
69+
.idea/
70+
csv-plugin.xml
71+
72+
# temporary test folder
73+
tests/temp

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

AUTHORS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Authors
2+
3+
The following people have contributed to the project (in alphabetical order):
4+
5+
- [Evan Bianco](https://github.com/EvanBianco), Agile Scientific, Canada
6+
- [Jesper Dramsch](https://github.com/JesperDramsch), Edinburgh, UK
7+
- [Matt Hall](https://github.com/kwinkunks), Agile Scientific, Canada / [ORCID: 0000-0002-4054-8295]( https://orcid.org/0000-0002-4054-8295))
8+
- [Kent Inverarity](https://github.com/kinverarity1), South Australia
9+
- [Rob Leckenby](https://github.com/Zabamund), Agile Scientific, Switzerland
10+
- [Thomas Martin](https://github.com/ThomasMGeo), Colorado, USA
11+
- [Steve Purves](https://github.com/stevejpurves), Curvenote, Spain
12+
- [Patrick Reinhard](https://github.com/patrick-reinhard), Shell, The Netherlands
13+
- [DC Slagel](https://github.com/dcslagel), Shell, The Netherlands
14+
- [Miguel de la Varga](https://github.com/Leguark), Germany
15+
- Wenting Xiong, Shell, The Netherlands

CHANGES.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
# CHANGES.md
1+
# Changelog
2+
3+
## 0.5.0, 14 February 2022
4+
5+
- Major change: Everything in `welly` is now much closer to `pandas`. Chiefly, `Curve` objects are now represented by wrapped `pandas.DataFrame` objects (note: not `Series` as you might expect, so they can be two-dimensional). They were previously subclassed NumPy `ndarray` objects, so while we've tried to preserve as much of the API as possible, expect some changes. Please let us know if there's something you miss, it can probably be implemented. Many thanks to the developers that made this happen, especially Patrick Reinhard and Wenting Xiong in the Netherlands.
6+
- Major change: as previously indicated, the default behaviour is now to load the depth curve in its original units. That is: `welly` no longer converts everything to metres. Use `index='metres'` in `from_las()` to get the old behaviour.
7+
- Major change: the `Well` object's header, `well.header`, is currently a large `pandas.DataFrame` containing everything from the LAS file's header. In the next minor release, we will restore something more like the original header object. We welcome opinions on how this should work.
8+
- The `Curve` object should be instantiated with `index` instead of `basis`.
9+
- You can now create a project with `welly.read_las('path/to/*.las')`. Note: this always gives you a project, even if it only contains a single well. You can get the single well from a path like `'data/myfile.las'` with a singleton assignment like `well, = welly.read_las('data/myfile.las')`.
10+
- As previously indicated, dogleg severity is now given in units of degrees per course length.
11+
- `kwargs` are passed to `lasio` in `read_las()`, `Well.from_las()` and `Project.from_las()`, so you can add things like `mnemonic_case='preserve'` or `ignore_header_errors=True`. See [the Lasio documentation](https://lasio.readthedocs.io/en/latest/) for more on these options.
12+
- A new argument on `well.to_las()` allows you to control the case of the mnemonics in the output LAS file. The behaviour has always been to preserve the case in the data dictionary; choose 'upper', 'title' or 'lower' to change it.
13+
- New docs! They are live at [code.agilescientific.com/welly](https://code.agilescientific.com/welly). Feedback welcome!
14+
215

316
## 0.4.10, 22 June 2021
417

@@ -7,7 +20,7 @@
720
- You can now optionally pass any of `start`, `stop` and `step` to `Well.unify_basis()`. These settings will override the basis you provide, or the basis that `welly` discovers using `Well.survey_basis()`. I added an example of using this to the `tutorial/02_Curves.iynb` tutorial notebook.
821
- Relatedly, if you pass any of `start`, `stop` and `step` to `Curve.to_basis()` it will _override_ the basis you give it, if you give it one.
922
- Welly now uses [`wellpathpy`](https://github.com/Zabamund/wellpathpy) to convert deviation data into a position log. The API has not changed, but position logs can now be calculated with the high and low tangential methods as well.
10-
- Dogleg severity is still given in radians, but can be normalized per 'course length', where course length is a parameter you can pass. **Future warning:** from v0.5.0, dogleg severity will be passed in degrees and course length will be 30 by default.
23+
- Dogleg severity is still given in radians, but can be normalized per 'course length', where course length is a parameter you can pass. **Future warning:** from v0.5.0, dogleg severity will be passed in degrees and course length will be 30 by default.
1124

1225

1326
## 0.4.9, 29 January 2021
@@ -32,7 +45,6 @@
3245
- Thank you Miguel de la Varga for an update that allows a trajectory to have fewer than 3 points.
3346
- Thank you DC Slagel for an update that ensures all well header fields are populated with valid types.
3447

35-
---
3648

3749
## 0.4.7, 6 June 2020
3850
- Load your well in feet! The number one most hated 'feature' has been 'fixed'... you can now pass the `index` argument to `Well.from_las()` or `Well.from_lasio()` to control how the index is interpreted. Use `'existing'` or `'original'` to keep whatever is specified in the LAS file (probably what you want). To convert to metres, use `'m'`; to convert to feet use `'ft'`.
@@ -41,6 +53,7 @@
4153
- See `tutorial/Well_depth_units_v0.4.7.ipynb`.
4254
- Thank you to Kent Inverarity for implementing this long-hoped-for feature.
4355

56+
4457
## 0.4.6, 7 May 2020
4558
- Big fix in `Location`.
4659

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Contributing
2+
3+
## 🙌 Thank you for considering contributing to `welly`!
4+
5+
There are several important ways you can help; here are some examples:
6+
7+
- Submitting bug reports and feature requests: see [Issues](https://github.com/agile-geoscience/welly/issues).
8+
- Proposing code for bug fixes and new features, then [making a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
9+
- Fixing typos and generally improving the documentation.
10+
- Writing tutorials, examples, and how-to documents.
11+
12+
13+
## Code of conduct
14+
15+
We're fortunate to be part of a large professional community that conducts itself with mutual respect and consideration for others. Agile's [Code of Conduct](https://github.com/agile-geoscience/community/blob/main/CODE_OF_CONDUCT.md) is part of protecting these features for everyone, everywhere. Please read it.
16+
17+
18+
## Authorship
19+
20+
If you contribute a pull request to the project, please add yourself to `AUTHORS.md`.

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
![Welly banner](https://www.dropbox.com/s/a8jg7zomi4wgolb/welly_banner.png?raw=1)
2+
3+
[![Run tests](https://github.com/agile-geoscience/welly/actions/workflows/run-tests.yml/badge.svg)](https://github.com/agile-geoscience/welly/actions/workflows/run-tests.yml)
4+
[![Build docs](https://github.com/agile-geoscience/welly/actions/workflows/build-docs.yml/badge.svg)](https://github.com/agile-geoscience/welly/actions/workflows/build-docs.yml)
5+
[![PyPI version](https://img.shields.io/pypi/v/welly.svg)](https://pypi.python.org/pypi/welly/)
6+
[![PyPI versions](https://img.shields.io/pypi/pyversions/welly.svg)](https://pypi.org/project/welly//)
7+
[![PyPI license](https://img.shields.io/pypi/l/welly.svg)](https://pypi.org/project/welly/)
8+
9+
**`welly` facilitates the loading, processing, and analysis of subsurface wells and well data, such as striplogs, formation tops, well log curves, and synthetic seismograms.**
10+
11+
12+
## Installation
13+
14+
pip install welly
15+
16+
For developers, there are `pip` options for installing `test`, `docs` or `dev` (docs plus test) dependencies.
17+
18+
19+
## Quick start
20+
21+
```python
22+
from welly import Well, Project
23+
24+
w = Well.from_las('my_wells/my_well.las') # Load a single well.
25+
p = Project.from_las('my_wells/*.las') # Load lots of wells.
26+
27+
gr = w.data['GR'] # One log; this is a subclassed NumPy array...
28+
gr.plot() # ...with some superpowers!
29+
```
30+
31+
Next, check out the tutorial notebooks.
32+
33+
34+
## Documentation
35+
36+
[The `welly` documentation](https://code.agilescientific.com/welly) is a work in progress.
37+
38+
39+
## Contributing
40+
41+
Please see [`CONTRIBUTING.md`](https://github.com/agile-geoscience/redflag/blob/main/CONTRIBUTING.md).
42+
43+
44+
## Philosophy
45+
46+
The [`lasio`](https://github.com/kinverarity1/lasio) project provides a very nice way to read and
47+
write [CWLS](http://www.cwls.org/) Log ASCII Standard files. The result is an object that contains all the LAS data — it's more or less analogous to the LAS file.
48+
49+
Sometimes we want a higher-level object, for example to contain methods that have nothing to do
50+
with LAS files. We may want to handle other well data, such as deviation surveys, tops (aka picks),
51+
engineering data, striplogs, synthetics, and so on. This is where `welly` comes in.
52+
53+
`welly` uses `lasio` for data I/O, but hides much of it from the user. We recommend you look at
54+
both projects before deciding if you need the 'well-level' functionality that `welly` provides.

0 commit comments

Comments
 (0)