Skip to main content

Scrapes the ECMC download page. Includes transform scripts used by CDPHE OIP team.

Project description

Temporary Documentation Notes

  • BOEd is calculated on a per-formation basis, and then summed for each well. Prod_days is the maximum of Prod_days for each formation. Because different formations could potentially have different Prod_days at a given well, the information used to calculate BOEd is lost in the data transformation, and a recalculation using the transformed data may result in different values than are in the BOEd column. Additionally, taking the maximum Prod_days may not be correct because there could potentially be activity days for one formation and not another, and vice-versa, therefore under-reporting Prod_days in the transformed data. This data loss and data discrepancy is not expected to be important, but is worth documenting.

Installation

pip install ecmc-scraper

Usage

Optional:

ecmc-scraper --install-completions

Currently, only production summaries are implemented.

To see the options available:

ecmc-scraper production-summaries --help

To generate an editable config file:

ecmc-scraper production-summaries --write-default-config-to-file /path/to/file.yaml

To run the script using a config file:

ecmc-scraper production-summaries -c /path/to/file.yaml

Manual Installation

Python

requires Python 3.9

dependency and virtual environment management:

Python Poetry can be installed globally with

python -m pip install poetry

in Windows PowerShell.

This is not entirely necessary, but is recommended.

Python packages:

  • arrow-odbc
  • PyYAML
  • pola.rs
  • requests
  • typer

can be installed globally with

python -m pip install pyyaml polars requests typer

in Windows PowerShell.

If Python Poetry was installed, the recommended method for installing dependencies is to run

python -m poetry install

from the root repository directory in Windows PowerShell. This will also install this package as an executable!

Git and Colorado State Computers

Some of the Python package dependencies require Git. This is not available by default on Colorado State Windows Installations. One option to get access to Git on your machine is to request Git and/or GitHub Desktop, though I don't know yet if these installations will update the correct environment variable.

Alternatively, there is a portable version of Git that can be downloaded here and can be used without installation. Simply download the portable version, run the executable file to extract the contents, and choose a destination directory when prompted.

%USERPROFILE%\portable_git\ is a good option.

Once extracted, to tell Python where the Git executable is you will have to add an environment variable. This can easily be done on a per-shell basis without needing to run any scripts at login. To set the required environment variable for use in Windows PowerShell, run this command in PowerShell:

$Env:GIT_PYTHON_GIT_EXECUTABLE = 'C:\path\to\portable\git\bin\git.exe'

or using the recommended directory above:

$Env:GIT_PYTHON_GIT_EXECUTABLE = '%USERPROFILE%\portable_git\bin\git.exe'

Alternatively, you can set environment variables for git in the built-in Windows Environment Variables application. Under "User variables for MyUserName", add the following new evironment variable:

Variable name: GIT_PYTHON_GIT_EXECUTABLE

Variable value: C:\path\to\portable\git\bin\git.exe

Optionally, also edit the Path variable to add the following lines:

C:\path\to\portable\git\bin
C:\path\to\portable\git\cmd

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecmc_scraper-0.2.0.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecmc_scraper-0.2.0-py3-none-any.whl (28.7 kB view details)

Uploaded Python 3

File details

Details for the file ecmc_scraper-0.2.0.tar.gz.

File metadata

  • Download URL: ecmc_scraper-0.2.0.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.9.7 Windows/10

File hashes

Hashes for ecmc_scraper-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4fec33e7fe35a5c1477138e20c9cb84818640793c0ff78cca5984ebb60eefb7c
MD5 fdc9687ee80a249a61d91de5aa8c8940
BLAKE2b-256 fb4718bde2395bf3a33b023f16205bb8f9ef600c12c191f8cb2e0341ac62c9dc

See more details on using hashes here.

File details

Details for the file ecmc_scraper-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ecmc_scraper-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 28.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.9.7 Windows/10

File hashes

Hashes for ecmc_scraper-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfc1dc4a70481d7590a4ced97f1a5a711dffc8391ed0d08c5492ca5bf4ea02e8
MD5 b429ad511a8ee3cf942c31a1f2ba903e
BLAKE2b-256 484a9665610e5aa17a636da6679f1532346363db175ef83fe0ce85e48c8aea67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page