Pipeline inline inspection data as CSV file.
Project description
PipelineCsv library
The free, open source PipelineCsv library is designed to work with the results of analysis of in-line flaw detection data in the form of a CSV file.
The library provides a set of high-level operations with CSV file.
Data can be
- mirrored
- glued together from several CSV files
- stretched/compressed along the distance according to a given set of intermediate points
- interpreted as an iterable sequence of pipes with geodata
- get statistics about objects in a CSV file
Installation
pip install pipeline-csv
Usage
It is necessary to define the sets of defects and markers used in your project.
To do this, you need to define your class for CSV row by deriving it from the pipeline_csv.csvfile.row.Row class and
override two methods of this class: defekts_dict and lineobj_dict.
from pipeline_csv.csvfile.row import Row
class TypeMarker:
VALVE = 0
CASE_START = 1
CASE_END = 2
class TypeDefekt:
CORROZ = 0
DENT = 1
FACTORY = 2
class MyRow(Row):
@staticmethod
def defekts_dict():
return {
TypeDefekt.CORROZ: "Corrosion",
TypeDefekt.DENT: "Dent",
TypeDefekt.FACTORY: "Manufacturing defect",
}
@staticmethod
def lineobj_dict():
return {
TypeMarker.VALVE: "Valve",
TypeMarker.CASE_START: "Casing start",
TypeMarker.CASE_END: "Casing end",
}
For the data mirroring operation, you need to override the markers_reverse method, which returns a dictionary that specifies the rules for replacing when mirroring.
class MyRow(Row):
@staticmethod
def markers_reverse():
return {
TypeMarker.CASE_START: TypeMarker.CASE_END,
TypeMarker.CASE_END: TypeMarker.CASE_START,
}
Further, the MyRow class can be used in operations with data of CSV files.
- Creating a CSV file
- Data mirroring
- Docking new data and compression/stretching
- Pipe sequence
- Defect location at the pipe
- Depth of defect
- Pipeline diameter changing
- Get statistics
Development
git clone git@github.com:vb64/pipeline.csv.git
cd pipeline.csv
make setup PYTHON_BIN=/path/to/python3
make tests
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 pipeline_csv-1.21.tar.gz.
File metadata
- Download URL: pipeline_csv-1.21.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efc4fc4f78658e997d108bf1f583321e16bee06f5e3659853a72594e3299947e
|
|
| MD5 |
30dc22de26bed6bd76c354cb675497ac
|
|
| BLAKE2b-256 |
526696c34143ab4a87e58259977a22d99a0a39cde82c663ebb250d3203cd7c51
|
File details
Details for the file pipeline_csv-1.21-py3-none-any.whl.
File metadata
- Download URL: pipeline_csv-1.21-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6db92c9cfb0766061f6037361d1c8e3ff876e49a38d10208832014c365273a83
|
|
| MD5 |
153865fd448d5a3e2a725ed05cd9e36c
|
|
| BLAKE2b-256 |
49cc99de687c89b8c67af5626410c28d8f81b2ba8c7d63735d61e51da6477808
|