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.29

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.29
File Size Uploaded
pipeline_csv-1.29.tar.gz 33.0 kB Details

Built distribution (wheel)

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

Total release size: 72.5 kB

Release files / pipeline_csv-1.29.tar.gz

Download URL pipeline_csv-1.29.tar.gz
Size 33.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c184882966ef763d7581c544770d9aca330bf08454899d01b04087a3bd7df313
BLAKE2b-256 checksum
How to use checksums
13183f2497ed32ccac19c0935a222d7148eab389b507f54969b5b5fa0368396a
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.29-py3-none-any.whl

Download URL pipeline_csv-1.29-py3-none-any.whl
Size 39.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97d90f7750aebb2d0c4cb59d5240a2adce5fb2244d8df936c171d902f5e42278
BLAKE2b-256 checksum
How to use checksums
001b37c9cc76d4868f58cd20dcdd8b6003cc34212b608f65bb12402f461d31ea
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

This release

1.29 This release

2 release files

1.28

2 release files

1.27

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