Defines and implements the Python API for Orchid*. (*Orchid is a mark of Reveal Energy Services, Inc.)
Reason this release was yanked:
Overrides new version style
Project description
Introduction
This project defines the implementation of the Python API for Orchid*.
(*Orchid in a mark of Revel Energy Services. Inc.)
Specifically, the orchid package exposes the Orchid API to Python applications and the Python REPL.
Getting Started
Create a virtual environment
Examples
Additionally, this project installs four examples in the examples directory of the orchid-python-api
package:
plot_trajectories.ipynbplot_monitor_curves.ipynbplot_treatment.ipynbcompletion_analysis.ipynb
The first three notebooks plot:
- The well trajectories for a project
- The monitor curves for a project
- The treatment curves (pressure, slurry rate and concentration) for a specific stage of a well in a project
Additionally, the notebook, completion_analysis.ipynb, provides a more detailed analysis of the completion
performed on two different wells in a project.
To use these examples, you may want to invoke the commands
copy_orchid_examplesuse_orchid_test_data
Use the first command to copy the example files into your an optionally specified (virtual environment)
directory. (The default destination is your current working directory.) Use the second command to change the
examples in an optionally specified directory (your current directory) to refer to the specified location of
the Orchid test data files. Both commands are
- Command line commands that run in a console / terminal
- Support a help flag (-h / --help) to provide you with help on running the commands
End-user preparation
We recommend the use of virtual environments to use the Orchid Python API. This choice avoids putting Orchid-specific-packages in your system Python environment.
You have several options to create and manage virtual environments: venv, pipenv, poetry, and conda.
The venv is available as a standard Python package and is a spartan tool to manage environments. poetry
is a tool targeting developers but can be used by end-users. Our recommended tool is pipenv. It provides a
good balance between venv and poetry. Remember, both pipenv and poetry must be installed in your
Python environment separately from Python itself, but can be installed using pip. Finally, conda supports
the creation of virtual environments, but assumes that you have installed a Python distribution using Anaconda
or miniconda. We will not describe conda further.
Using any of pipenv, venv or poetry, your first step is to create a directory for your project. Then,
change into your project directory.
We recommend the use of pipenv. This environment hides a number of details involved in managing a virtualenv
and yet provides a fairly simple interface. We will assume in this document that you are using pipenv.
Step-by-step install
- Install python 3.7 by following these instructions. To ensure access from the command line, be sure to select the "Add Python 3.x to PATH" option on the installer start page.
- Installing
pipenvby following the install documentation. - Open a console using either
powershellor the Windows console. - Create a directory for the virtual environment. We will symbolically call it
/path/to/orchid-virtualenv. - Change the current working directory to by
chdir /path/to/orchid-virtualenv. - Create an empty virtual environment by running
pipenv install. - Activate the virtual environment by running
pipenv shell - Install orchid by running
pip install orchid-python-api. - Optionally install jupyter lab or jupyter notebook if you wish to use these tools to explore.
Verify installation
Jupyter lab
- In your activated virtual environment, run
jupyter labto open a browser tab. - In the first cell, enter
import orchid. - Run the cell.
- Wait patiently.
The import should complete with no errors.
Python REPL
- In your activated virtual environment, run
pythonto open a REPL. - Enter
import orchid. - Wait patiently.
The import should complete with no errors.
Run orchid examples
- Navigate to the directory associated with the virtual environment
- Run
python </path/to/virtualenv/Lib/site-packages/copy_orchid_examples.py - If the script reports that it skipped notebooks, repeat the command with an additional argument:
python </path/to/virtualenv/Lib/site-packages/copy_orchid_examples.py --overwrite - Verify that the current directory has four notebooks:
plot_trajectories.ipynbplot_monitor_curves.ipynbplot_treatment.ipynbcompletion_analysis.ipynb
- The notebooks, as installed, contain a symbolic reference to the Orchid training data. Change this
symbolic reference to an actual reference by:
- Either running
python </path/to/virtualenv/Lib/site-packages/use_orchid_test_data.py </path/to/training-data> - Or by editing each notebook replacing the symbolic strings, "/path/to", with a concrete path to your installed training data.
- Either running
- Activate your virtual environment by
pipenv shellif not already activated - Open Jupyter by running
jupyter labin the shell - Within Jupyter,
Run the notebook,
plot_trajectories.ipynb1. Open notebook 2. Run all cells of notebook 3. Wait patiently 4. Verify that no exceptions occurred- Repeat for remaining notebooks:
plot_monitor_curves.ipynbplot_treatment.ipynbcompletion_analysis.ipynb
- Repeat for remaining notebooks:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orchid-python-api-2020.4.232.tar.gz.
File metadata
- Download URL: orchid-python-api-2020.4.232.tar.gz
- Upload date:
- Size: 31.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.4 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bda696c9208405cf31410a5eb753f2271000b4a64f5c32dfb2c8932be9af300d
|
|
| MD5 |
697c75192fb2f3eb8cb27b76901bbbb8
|
|
| BLAKE2b-256 |
914afe94aec5f392d539292e91b9da303a29ce6771650eeddd758f6cb89e59f1
|
File details
Details for the file orchid_python_api-2020.4.232-py3-none-any.whl.
File metadata
- Download URL: orchid_python_api-2020.4.232-py3-none-any.whl
- Upload date:
- Size: 55.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.9 CPython/3.8.4 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3dd65aa8cf686d6bc4b4313fa2c653143a42d392ba5b7d29fd6e6742e436f64
|
|
| MD5 |
d88b9a7e6a9c283bbee02bace0118faf
|
|
| BLAKE2b-256 |
9089cf9fd41f8dea07ae54898cc6b6951280d4509e55caec703d4b540a57135a
|