Skip to main content

PipelineCsv library

GitHub Workflow Status GitHub Workflow Status Codacy Badge Codacy Badge

In Russian

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
  • calculate the degree of danger of defects using various methods

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.

Development

git clone git@github.com:vb64/pipeline.csv.git
cd pipeline.csv
make setup PYTHON_BIN=/path/to/python3
make tests

Metadata

Release files for pipeline-csv 1.27

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pipeline-csv 1.27
File Size Uploaded
pipeline_csv-1.27.tar.gz 32.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pipeline-csv 1.27
File Interpreter ABI Platform
pipeline_csv-1.27-py3-none-any.whl Python 3 none any Details

Total release size: 72.1 kB

Release files / pipeline_csv-1.27.tar.gz

Download URL pipeline_csv-1.27.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
64ace2df0893354489954a248123f396dc22bcbe2fe6751fe5ea1a177728b7a1
BLAKE2b-256 checksum
How to use checksums
e8a1dcda78a3d7fe64859b4af343d34b737887546337c8eb95598090c33f32ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pipeline_csv-1.27-py3-none-any.whl

Download URL pipeline_csv-1.27-py3-none-any.whl
Size 39.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5bed26cba4fea9ab4852d33caac6629e2b7cd2259301fb9566eb9a47f36c228
BLAKE2b-256 checksum
How to use checksums
06c06e5df6dc9e5fbaa8f83cbaabc6f7bfafa349c62ea7b43fda776069591daa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

1.28

2 release files

This release

1.27 This release

2 release files

1.26

2 release files

1.25

2 release files

1.24

2 release files

1.23

2 release files

1.22

2 release files

1.21

2 release files

1.20

2 release files

1.19

2 release files

1.18

2 release files

1.17

2 release files

1.16.3

2 release files

1.16.2

2 release files

1.16

2 release files

1.15

2 release files

1.14

2 release files

1.13

2 release files

1.12

2 release files

1.11

2 release files

1.10

2 release files

1.9.2

2 release files

1.9.1

2 release files

1.9

2 release files

1.8

2 release files

1.7

2 release files

1.6

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page