bp / bp/resqpy

Use class constructor methods in PolylineSet

Open
#167 1 comment 0 reactions 0 assignees View on GitHub
refactor
Dominant language
Python
Stars
67
Forks
18
Avg merge
2h 26m
Merged PRs (30d)
1

Description

I think the init method of `PolylineSet` is doing a fair bit of work and could be refactored. In other resqpy classes, we've tried separate out any alternative constructor options as separate class methods. An example is `resqpy.well.DeviationSurvey.from_data_frame` . This helps keep the init method simple.

I would suggest making class methods e.g.`PolylineSet.from_irap_file()` and `PolylineSet.from_charisma_file()`

_Originally posted by @connortann in https://github.com/bp/resqpy/issues/164#issuecomment-892548762_

Contributor guide

Open the contributing guide

Research direction

Start by reading the PolylineSet init method and compare its alternative-constructor work with resqpy.well.DeviationSurvey.from_data_frame. Separate the IRAP and Charisma construction paths into PolylineSet.from_irap_file() and PolylineSet.from_charisma_file(), preserving existing behavior and checking the surrounding PolylineSet usage to confirm the refactor is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.