bcgov / bcgov/ligo-lib

Reading Chunk Size and Other Such Values From Config, Some Cleanup etc.

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

[Use config file for the values like those in lines 19 to 24: ](https://github.com/bcgov-c/data-linking/blob/develop-2.0/lib/cdi-linking/cdilinker/linker/base.py#L19)

Let's move hard coded values like CHUNK_SIZE, ... to some config file or ...

A generic comment about all the self.outcomes fields in develop-2.0/lib/cdi-linking/cdilinker/plugins/field_category.py (like https://github.com/bcgov-c/data-linking/blob/develop-2.0/lib/cdi-linking/cdilinker/plugins/field_category.py#L80);
In general instead of hard coding right in the init cannot we pass it?
And/or cannot we store those in some config, or var and load from there?. Also can we
group all the common ones (like grouping all that has the same three items and read/load those from config, group all that has the same two items and read/load those from config etc).

[Let's use logging instead of printing](https://github.com/bcgov-c/data-linking/blob/develop-2.0/lib/cdi-linking/cdilinker/linker/base.py#L88)

[I guess the purpose of these statements for creating and closing are to make sure ... exists. Is not there any better way of doing it? How about moving the hard coded string to somewhere else too? Also if these code is no longer in use, do we want to mark it as such or remove it altogether?](https://github.com/bcgov-c/data-linking/blob/develop-2.0/lib/cdi-linking/cdilinker/linker/base.py#L222)

Too many hard coding like this: https://github.com/bcgov-c/data-linking/blob/develop-2.0/lib/cdi-linking/cdilinker/linker/chunked_link.py#L375 Cannot we get rid of hard_coding in a file that is not a configuration file?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.