Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks committed Feb 14, 2022
2 parents 075d7f7 + 1442fd3 commit 2841967
Show file tree
Hide file tree
Showing 110 changed files with 219,192 additions and 223,342 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = *docs*, *tests*, *_version.py, *__init__.py, *__main__.py
32 changes: 32 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build docs

on:
push:
branches: [ develop, master ]
release:
types: [ published ]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[docs]
- name: Update docs
run: |
cd docs
make html
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs/_build/html
37 changes: 37 additions & 0 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish to PyPI

on:
release:
types: [ published ]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: |
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Run tests

on:
push:
branches: [ develop, master ]
pull_request:
branches: [ develop ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Test with pytest
run: |
python run_tests.py
15 changes: 13 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
test.las
tutorial/.ipynb_checkpoints
# Keep out of change control.
docs/_notebooks
_version.py
.ipynb_checkpoints
.vscode

# Mac
.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -60,3 +65,9 @@ docs/_build/
# PyBuilder
target/

# PyCharm
.idea/
csv-plugin.xml

# temporary test folder
tests/temp
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

15 changes: 15 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Authors

The following people have contributed to the project (in alphabetical order):

- [Evan Bianco](https://github.com/EvanBianco), Agile Scientific, Canada
- [Jesper Dramsch](https://github.com/JesperDramsch), Edinburgh, UK
- [Matt Hall](https://github.com/kwinkunks), Agile Scientific, Canada / [ORCID: 0000-0002-4054-8295]( https://orcid.org/0000-0002-4054-8295))
- [Kent Inverarity](https://github.com/kinverarity1), South Australia
- [Rob Leckenby](https://github.com/Zabamund), Agile Scientific, Switzerland
- [Thomas Martin](https://github.com/ThomasMGeo), Colorado, USA
- [Steve Purves](https://github.com/stevejpurves), Curvenote, Spain
- [Patrick Reinhard](https://github.com/patrick-reinhard), Shell, The Netherlands
- [DC Slagel](https://github.com/dcslagel), Shell, The Netherlands
- [Miguel de la Varga](https://github.com/Leguark), Germany
- Wenting Xiong, Shell, The Netherlands
19 changes: 16 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# CHANGES.md
# Changelog

## 0.5.0, 14 February 2022

- 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.
- 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.
- 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.
- The `Curve` object should be instantiated with `index` instead of `basis`.
- 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')`.
- As previously indicated, dogleg severity is now given in units of degrees per course length.
- `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.
- 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.
- New docs! They are live at [code.agilescientific.com/welly](https://code.agilescientific.com/welly). Feedback welcome!


## 0.4.10, 22 June 2021

Expand All @@ -7,7 +20,7 @@
- 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.
- 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.
- 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.
- 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.
- 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.


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

---

## 0.4.7, 6 June 2020
- 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'`.
Expand All @@ -41,6 +53,7 @@
- See `tutorial/Well_depth_units_v0.4.7.ipynb`.
- Thank you to Kent Inverarity for implementing this long-hoped-for feature.


## 0.4.6, 7 May 2020
- Big fix in `Location`.

Expand Down
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Contributing

## 🙌 Thank you for considering contributing to `welly`!

There are several important ways you can help; here are some examples:

- Submitting bug reports and feature requests: see [Issues](https://github.com/agile-geoscience/welly/issues).
- 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).
- Fixing typos and generally improving the documentation.
- Writing tutorials, examples, and how-to documents.


## Code of conduct

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.


## Authorship

If you contribute a pull request to the project, please add yourself to `AUTHORS.md`.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
![Welly banner](https://www.dropbox.com/s/a8jg7zomi4wgolb/welly_banner.png?raw=1)

[![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)
[![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)
[![PyPI version](https://img.shields.io/pypi/v/welly.svg)](https://pypi.python.org/pypi/welly/)
[![PyPI versions](https://img.shields.io/pypi/pyversions/welly.svg)](https://pypi.org/project/welly//)
[![PyPI license](https://img.shields.io/pypi/l/welly.svg)](https://pypi.org/project/welly/)

**`welly` facilitates the loading, processing, and analysis of subsurface wells and well data, such as striplogs, formation tops, well log curves, and synthetic seismograms.**


## Installation

pip install welly

For developers, there are `pip` options for installing `test`, `docs` or `dev` (docs plus test) dependencies.


## Quick start

```python
from welly import Well, Project

w = Well.from_las('my_wells/my_well.las') # Load a single well.
p = Project.from_las('my_wells/*.las') # Load lots of wells.

gr = w.data['GR'] # One log; this is a subclassed NumPy array...
gr.plot() # ...with some superpowers!
```

Next, check out the tutorial notebooks.


## Documentation

[The `welly` documentation](https://code.agilescientific.com/welly) is a work in progress.


## Contributing

Please see [`CONTRIBUTING.md`](https://github.com/agile-geoscience/redflag/blob/main/CONTRIBUTING.md).


## Philosophy

The [`lasio`](https://github.com/kinverarity1/lasio) project provides a very nice way to read and
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.

Sometimes we want a higher-level object, for example to contain methods that have nothing to do
with LAS files. We may want to handle other well data, such as deviation surveys, tops (aka picks),
engineering data, striplogs, synthetics, and so on. This is where `welly` comes in.

`welly` uses `lasio` for data I/O, but hides much of it from the user. We recommend you look at
both projects before deciding if you need the 'well-level' functionality that `welly` provides.
83 changes: 0 additions & 83 deletions README.rst

This file was deleted.

Loading

0 comments on commit 2841967

Please sign in to comment.