macroenergy / Dolphyn.jl

DOLPHYN: Decision Optimization for Low Carbon Power and Hydrogen Nexus
https://macroenergy.github.io/Dolphyn.jl/
GNU General Public License v2.0
36 stars 20 forks source link

Create PackageInstaller.jl #211

Closed Mrxia7757 closed 2 weeks ago

Mrxia7757 commented 8 months ago

Description

This commit adds a new Julia script that automates the management of package dependencies. The script includes a predefined list of essential packages for the project, such as JuMP, DataFrames, CSV, and various others crucial for data analysis, optimization, and statistical computations. It checks for the presence of these packages and installs any that are missing. This utility script ensures that all contributors can synchronize their working environments quickly, thus facilitating a smoother workflow and collaboration.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Test Configuration:

Checklist:

RuaridhMacd commented 8 months ago

Hi @Mrxia7757 Thanks for putting this together.

I think this could be useful to add for new Julia users but would it be better to have the script activate the environment in the Dolphyn Project.toml file and then install packages using Pkg.instantiate() or something similar? That would mean we would only have to maintain one list of dependencies.

Mrxia7757 commented 8 months ago

Thank you very much for your reply. I will continue to improve.The code has been modified according to your requirements. Your suggestion is very willing. Here I all have the latest version of the latest version. After the test, I find that it is not conflicting. However, considering that our procedures here mainly rely on Gurobi, I think it is necessary to write a comment and prompt to tell beginners how to use it, and to install guidance.