winc_onepager

A tool to build legacy well representations

https://github.com/equinor/winc_onepager

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.2%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

A tool to build legacy well representations

Basic Info
  • Host: GitHub
  • Owner: equinor
  • License: gpl-3.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 72.1 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 2
  • Releases: 6
Created almost 2 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

WINC_OnePager

This repository contains source codes and documentation for WINC_OnePager project.

WINC_OnePager-unittest WINC_OnePager-docs WINC_OnePager-lint

Installation Instructions

There are two methods to install and run the project - with cloning and without cloning. You can choose depending on whether you need to work with the repository directly or just want to use the package.

With Poetry (Recommended for Dependency Management in Equinor)

Poetry is Equinor's recommended tool complying with IT policy for Python dependency management.

1. Prerequisites

Ensure you have Python ^3.9 installed and accessible in your path.

2. Installing Poetry

If you don't have Poetry installed, you can do so with the following command:

shell curl -sSL https://install.python-poetry.org | python3

After installation, verify that Poetry is correctly installed: shell poetry --version

3A. Install the Project Using Poetry Without Cloning

To install the project without cloning the repository:

```shell mkdir my-project

cd my-project

Create a pyproject.toml file with the content described in the original README, then execute:

poetry init ``` Open the pyproject.toml file. Open the file in your preferred text editor, copy and Paste the follwing contents:

```poetry [tool.poetry] name = "my-project" version = "0.1.0" package-mode = false # Add this line

[tool.poetry.dependencies] python = ">=3.9,<=3.12"

[tool.poetry.dependencies.winc-onepager] git = "git@github.com:equinor/WINC_OnePager.git" rev = "main"

[build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" ```

Save the changes and close the editor. Install dependencies.

shell poetry install

3B. Install the Project Using Poetry With Cloning

To install the project after cloning the repository:

```shell git clone https://github.com/equinor/WINCOnePager cd WINCOnePager

Optionally, create a new branch

Then execute:

poetry install ```

4. Activate the Poetry environment:

shell poetry shell

Installation Using pip and a Virtual Environment

The installation of the WINC_OnePager project can be done using pip, which is a straightforward approach regardless of cloning. First, ensure that you are in a Python virtual environment to isolate the project dependencies.

1. Creating a Virtual Environment

If you haven't already set up a virtual environment, you can create one using Python's built-in venv:

shell python -m venv venv_screen source venv_screen/bin/activate

For Windows users, activate the virtual environment with:

shell .\venv_screen\Scripts\activate.bat

2. Installing the Project

  • Using pip install .: This method works both when the repository has been cloned and when you have a project directory set up with a pyproject.toml or setup.py file. It installs the current directory as a package along with its dependencies:

    shell pip install .

    This command tells pip to install the current directory (i.e., the project) as a package.

  • Using pip install -r requirements.txt: This method is specific to situations where the repository has been cloned. It will install the dependencies specified in the requirements.txt file: shell pip install -r requirements.txt

Experiments

There are at least two ways to make experimenal runs of the codes. One is to run the experiments with Jupyter lab (notbeooks folder), and the other is commandline option. While Jupyter notebooks are mainly for QC tests and research purposes, the commandline option is aiming for production run.

1. Jupyter notebooks

Jupyter notebooks are located in directory notebooks. To test its functionaries, change current directory to notebooks and launch jupyter notebooks at the commandline: jupyter-lab Or if you prefer, you can run these Jupyter notebooks from Microsoft's VS code.

There exist several Jupyter notebooks in the directory:

  • Notebook Pressure-WellClass.ipynb is used to test pressure.
  • Notebook WellClasscsvyaml.ipynb is used to test pressure and loading .csv and .yaml input files.

2. Commandline option

Two python scripts for commandline option are available in directory experiments. One script, well_sketch.py, can be used for generating a well sketch, wellsketchpressure.py can be used for generating both a well sketch and a pressure plot.

The followings are some of the sample runs. In either way, you should run the python script inside the WINC_OnePager directory.

  1. To test well_sketch.py, run either of the followings: ``` # 1. for smeaheia_v1

python -m experiments.wellsketchpressure --config-file ./testdata/examples/smeaheiav1/smeaheia.yaml -pvt ./testdata/pvtconstants

3. for wildcat

python -m experiments.wellsketchpressure --config-file ./testdata/examples/wildcat/wildcat.yaml -pvt ./testdata/pvt_constants ```

3. Test data

In order for a quick test of the codes, we include some test dataset in the folder test_data/examples.

``` ├── frigg │ ├── GaPinputFriggv3.csv │ └── X5687dev.txt ├── simplewell │ ├── Simplewell.csv │ └── Simplewell.yaml ├── smeaheiav1 │ ├── GaPinputSmeaheiav3.csv │ └── smeaheia.yaml ├── wildcat ├── GaPinputWildcatv3.csv └── wildcat.yaml

Unit testing and code coverage

We are using pytest for unit testing and code coverage. The unit testing utilizes wildcat as the testing example. So please make sure the saved .pkl files in test_data/examples/wildcat/pytest exists and is updated. Here is a commandline example: python python -m pytest tests This will report the unit testing results. And the following will report not only unit testing but also code coverage: python python -m pytest --cov tests or a litle bit more complex command: python python -m pytest --cov --cov-branch --cov-report term-missing tests

Documentation

The document can be automatically generated and deployed to github pages. To do that, type the following at the command line: mkdocs gh-deploy It may take some minutes until the documentation goes live. And the generated documentation page can be found at WINC_OnePager docs.

The code structures

The following represents the current code structures:

. ├── CITATION.cff ├── experiments │ ├── __init__.py │ ├── well_pressure_tables.py │ ├── well_sketch_pressure.py │ └── well_sketch.py ├── LICENSE ├── mkdocs.yml ├── notebooks │ ├── Pressure-WellClass.ipynb │ ├── PVT_data.ipynb │ ├── WellClass_csv_yaml.ipynb │ └── WellClass-onepager.ipynb ├── poetry.lock ├── pyproject.toml ├── README.md ├── requirements.txt ├── requirements.txt.frozen ├── src │ ├── __init__.py │ └── WellClass │ ├── __init__.py │ ├── libs │ ├── notebooks │ ├── README.md │ └── tools ├── test_data │ └── examples │ ├── frigg │ ├── simple_well │ ├── smeaheia_v1 │ ├── wildcat │ ├── wildcat-pflotran │ └── wildcat-pflotran-2 └── tests ├── conftest.py └── well_class └── test_well_class.py

It was generated with the linux command tree: shell tree -I 'docs|site|venv_screen|*pycache*|Equinor*|originals' -L 3

Owner

  • Name: Equinor
  • Login: equinor
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- name: "Equinor ASA"
title: "SCREEN: A tool to build legacy well representations on reservoir simulation grids"
url: https://github.com/equinor/SCREEN
date-released: 2023-06-01

GitHub Events

Total
  • Release event: 5
  • Delete event: 9
  • Push event: 37
  • Pull request event: 16
  • Create event: 11
Last Year
  • Release event: 5
  • Delete event: 9
  • Push event: 37
  • Pull request event: 16
  • Create event: 11

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 26
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 days
  • Total issue authors: 1
  • Total pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 23
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 0
  • Pull requests: 13
  • Average time to close issues: N/A
  • Average time to close pull requests: 8 days
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • Alejobep (2)
Pull Request Authors
  • Alejobep (22)
  • ManInFez (2)
  • dependabot[bot] (2)
Top Labels
Issue Labels
Pull Request Labels
dependencies (2) python (2) documentation (1)

Dependencies

.github/workflows/mkdocs.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/pytest.yaml actions
  • actions/cache v3 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/ruff.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
poetry.lock pypi
  • 165 dependencies
pyproject.toml pypi
  • dash ^2.14.1 dash
  • fastparquet ^2023.10.1 dash
  • pyarrow ^14.0.1 dash
  • ipykernel ^6.29.5 develop
  • ipympl ^0.9.3 develop
  • jupyter ^1.0.0 develop
  • jupyter-dash ^0.4.2 develop
  • jupyterlab ^4.0.9 develop
  • matplotlib 3.9 develop
  • markdown-callouts ^0.3.0 docs
  • mkdocs ^1.5.3 docs
  • mkdocs-autorefs ^0.5.0 docs
  • mkdocs-material ^9.4.14 docs
  • mkdocstrings ^0.24.0 docs
  • PyYAML ^6.0.1
  • jsonpickle ^3.0.2
  • numpy >=2.0.0
  • pandas 2.2.2
  • pydantic ^2.5.2
  • python >=3.9
  • scipy >=1.11.2
  • pytest ^7.4.3 test
  • pytest-cov ^4.1.0 test
  • ruff ^0.1.6 test
requirements.txt pypi
  • anyio >=4.4.0
  • dash *
  • fastparquet *
  • ipympl *
  • ipython >=8.10.0
  • jsonpickle *
  • jupyter *
  • jupyter-dash *
  • jupyter-server >=2.14.1
  • jupyterlab *
  • markdown-callouts *
  • mkdocs *
  • mkdocs-autorefs *
  • mkdocs-material *
  • mkdocstrings *
  • numpy *
  • pandas *
  • pillow >=10.2.0
  • pyarrow *
  • pydantic *
  • pytest *
  • pytest-cov *
  • pyyaml *
  • requests >=2.32.2
  • ruff *
  • scipy *
  • setuptools >=70.0.0
  • tornado >=6.4.1
  • urllib3 >=2.2.2
  • welly *
  • zipp >=3.19.1