Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

APD.py code cleanup #98

Closed
mrengler opened this issue Apr 28, 2019 · 1 comment
Closed

APD.py code cleanup #98

mrengler opened this issue Apr 28, 2019 · 1 comment
Labels
exp/beginner Good for newcomers kind/enhancement Improve an existing feature

Comments

@mrengler
Copy link
Contributor

Issue Type

  • Feature request

While not a breaking issue, it would be good to make a few changes to the apd.py code to make it cleaner and more readable. These include:

  • putting regexes in verbose mode and explaining them
  • reducing repetition in the Deceased field parsing functions (could pass in delimiter as a parameter, or something)
  • more comments or modularity where appropriate to handle "special cases" of parsing

Context

As new contributors join the project, these changes will make it easier for them to understand what's going on and ultimately make us more effective at debugging and adding functionality.

@rgreinho rgreinho added the kind/enhancement Improve an existing feature label Apr 28, 2019
@rgreinho rgreinho added this to the 1.5.2 - Keep the code clean milestone Apr 28, 2019
rgreinho added a commit to rgreinho/scrapd that referenced this issue Apr 28, 2019
In order to increase the code readability and ease the maintenance, this
patch extract the functionality parsing the case number into its own
function `parse_case_field`.

Partial work for scrapd#98
rgreinho added a commit to rgreinho/scrapd that referenced this issue Apr 29, 2019
In order to increase the code readability and ease the maintenance, this
patch extract the functionality parsing the case number into its own
function parse_crashes_field.

Partial work for scrapd#98
@rgreinho rgreinho added the exp/beginner Good for newcomers label Apr 29, 2019
mergify bot pushed a commit that referenced this issue Apr 30, 2019
In order to increase the code readability and ease the maintenance, this
patch extract the functionality parsing the case number into its own
function `parse_case_field`.

Partial work for #98
rgreinho added a commit to rgreinho/scrapd that referenced this issue Apr 30, 2019
In order to increase the code readability and ease the maintenance, this
patch extract the functionality parsing the case number into its own
function parse_crashes_field.

Partial work for scrapd#98
Fixes scrapd#104
rgreinho added a commit to rgreinho/scrapd that referenced this issue Apr 30, 2019
In order to increase the code readability and ease the maintenance, this
patch extract the functionality parsing the case number into its own
function parse_crashes_field.

Partial work for scrapd#98
Fixes scrapd#104
rgreinho added a commit to rgreinho/scrapd that referenced this issue Apr 30, 2019
In order to increase the code readability and ease the maintenance, this
patch extract the functionality parsing the case number into its own
function parse_crashes_field.

Partial work for scrapd#98
Fixes scrapd#104
mergify bot pushed a commit that referenced this issue May 1, 2019
In order to increase the code readability and ease the maintenance, this
patch extract the functionality parsing the case number into its own
function parse_crashes_field.

Partial work for #98
Fixes #104
@rgreinho
Copy link
Member

rgreinho commented Jun 8, 2019

@mrengler a lot of worked was done around the tasks you mentioned. Once PRs #138, #139, and #140 get merged, I think this ticket will be fully done.

Let me know what you think and if you agree we could close it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/beginner Good for newcomers kind/enhancement Improve an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants