creativecommons / quantifying

quantify the size and diversity of the commons--the collection of works that are openly licensed or in the public domain
MIT License
22 stars 30 forks source link

[Feature] Integrate Python Logging into Codebase for Improved Management #85

Closed naishasinha closed 3 months ago

naishasinha commented 3 months ago

Problem

The current codebase relies on simplistic print() statements for debugging purposes, resulting in limited visibility, traceability, and debugging capabilities. As we expand the codebase for Quantifying the Commons, this approach will hamper our ability to effectively manage and diagnose issues for a much larger system, leading to inefficiencies in development, troubleshooting, and maintenance processes.

Description

Integrate Python logging into the codebase to improve logging capabilities. Python's logging module provides advanced features such as log levels, log formatting, logging to files, and integration with external logging systems. By implementing Python logging, we can enhance the maintainability, readability, and debugging experience of the codebase.

Alternatives

Another alternative is to use third-party logging libraries instead of Python's built-in logging module. However, although some third-party libraries do offer additional features and customization options, they may introduce dependencies and compatibility issues. This is why using Python's logging module would be a better option for this codebase.

Implementation

IamMQaisar commented 3 months ago

I would love to work on this feature, when confirmed, can @TimidRobot you assign me this?

TimidRobot commented 3 months ago

Please see Contribution Guidelines — Creative Commons Open Source for how we manage issues and PRs.

We generally don't assign issues prior to resolution. Instead of asking for issues to be assigned, do the work and submit a pull request (PR). Even if multiple people submit PRs for the same issue, multiple ideas and implementations strengthen the final product.

For work program applicants, each can all list their own PRs on their application. It is the quality of work that is important, not whether it is merged.

TimidRobot commented 3 months ago

Also see creativecommons/ccos-scripts for examples of logging with scripts and libraries

naishasinha commented 3 months ago

Also see creativecommons/ccos-scripts for examples of logging with scripts and libraries

Would you prefer I do it how it's done in this repository to keep consistency?

TimidRobot commented 3 months ago

Also see creativecommons/ccos-scripts for examples of logging with scripts and libraries

Would you prefer I do it how it's done in this repository to keep consistency?

Not necessarily, but the way it's done there encapsulates a lot of trial and error regarding logging from loaded modules. This project doesn't have shared modules, yet, but I expect that to change. I would focus on creating the simplest solution for the current codebase with the addition of being able to log from a shared module.

I created an issue to create a shared library:

naishasinha commented 3 months ago

Not necessarily, but the way it's done there encapsulates a lot of trial and error regarding logging from loaded modules. This project doesn't have shared modules, yet, but I expect that to change. I would focus on creating the simplest solution for the current codebase with the addition of being able to log from a shared module.

Sounds good, I will keep that in mind when implementing it!

I created an issue to create a shared library:

I will also work towards issue #91 as soon as I'm done with this one.