Closed aguennoune closed 9 months ago
Wow, this looks like a proper overhaul of the previously rather impractical scripts. I'll have a closer look over the weekend. Thanks a lot for supporting this project.
Hi @Ly0n ! AwesomeCure needs Awesome People like you. Thanks to you, i may learn and growth within the right track, and accordingly to the purposes of the Open Sustainability Technologies and such overwhelming perspectives it covers through the Open Source Software Sustainable Areas. So thank you for according me to contribute to such interesting perspectives!
This is an update to the open_sustain_tech
command-line interface, and here are the main changes to consider regarding this update:
The OpenSustainTech
class is a subclass of the Command
class from the cleo
library. It has a handle
method that is used to handle the command when the user executes it. The factory
function is a simple function that creates and returns an instance of the OpenSustainTech
class. This function is used as a "factory" for creating OpenSustainTech
instances.
The Options
class is a data class (thanks to the @dataclass
decorator) that contains options for the command-line parser. It uses the simple_parsing
library to define the options and their default values.
An ArgumentParser
object is created and configured to use the options defined in the Options
class. The command-line arguments are then parsed and stored in the args
variable.
The OSSOptionPlugin
class is a subclass of ApplicationPlugin
from the poetry
library. It has an activate
method that is used to register the open_sustain_tech
command with the application. It also has a commands
property that returns a list of available commands, in this case, an instance of OpenSustainTech
.
An extended Poetry's command-line interface by developing plugins
In response to the open issue, and for better integration and interaction with other tools, the alternative to the usage of a Jupyter notebook is a command-line tool out of the project.
Indeed, this option will allow users to interact with the project from a command line without having to install Jupyter notebooks or other dependencies.
Usage:
From an integrated terminal, the plugin needs to depend on Poetry to interface with it, so you can run the following commands:
Once it's done, and the
poetry.lock
file installed, you can run:As presented in the
protontypes/AwesomeCure
README.md, currently under theArchitecture
section and as described underData Acquisition
, theoss-opt
command-line interface lets your read the Awesome list from any repository as well.Note: Depending on the size of the list, the processing can take multiple hours.