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

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.28
File Size Uploaded
pipeline_csv-1.28.tar.gz 32.8 kB Details

Built distribution (wheel)

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

Total release size: 72.1 kB

Release files / pipeline_csv-1.28.tar.gz

Download URL pipeline_csv-1.28.tar.gz
Size 32.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9998b10db4b9ba326c54058faac8c7b3b06344aa3301a6139e0c712f7f4f930f
BLAKE2b-256 checksum
How to use checksums
962d4af2f14f767b56158f05a66e7d1eead113dfa1cba25f0482062f52abc846
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.28-py3-none-any.whl

Download URL pipeline_csv-1.28-py3-none-any.whl
Size 39.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c28386d175158e5d0d255c6593e12a4e00bb4d3aa29e37c748976b622b654ca
BLAKE2b-256 checksum
How to use checksums
ff8ad3faa8d858e144992dd4ca7966c79db8ae231d2f485d20e0ecd77d14f1ff
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.28 This release

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