Skip to content

Commit c0344e0

Browse files
authored
Merge pull request #8 from labrijisaad/enhance--dependency-management
Enhanced dependency management & Updated Make commands;
2 parents e94aec0 + c5ccf41 commit c0344e0

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ AUTHOR := Labriji Saad
44
# Default target when no arguments are provided to make
55
.DEFAULT_GOAL := help
66

7+
prep-dev:
8+
@echo "Installing development dependencies..."
9+
@pip install -r dev-requirements.txt
10+
11+
prep-doc:
12+
@echo "Installing production (Docker) dependencies..."
13+
@pip install -r docker-requirements.txt
14+
715
# Run Jupyter Lab - starts Jupyter Lab to allow for interactive development
816
jupy:
917
@echo "Starting Jupyter Lab..."
@@ -37,6 +45,8 @@ dockerun:
3745
# Display help with available make targets
3846
help:
3947
@echo Available targets:
48+
@echo make prep-dev - Install development dependencies
49+
@echo make prep-doc - Install production (Docker) dependencies
4050
@echo make jupy - Activate the virtual environment and run Jupyter Lab
4151
@echo make run - Run Kedro pipelines
4252
@echo make viz - Run Kedro Viz

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,24 @@ Kedro-Energy-Forecasting/
104104

105105
First, **Clone the Repository** to download a copy of the code onto your local machine, and before diving into transforming **raw data** into a **trained pickle Machine Learning model**, please note:
106106

107-
🔴 **Important Preparation Steps**:
108-
- If you intend to run the code, it's better to remove the following directories if they exist: `data/02_processed`, `data/03_training_data`, `data/04_reporting`, and `data/05_model_output`. These directories will be regenerated or overwritten after executing the pipeline. They are **included** in the version control to **give you a preview of the expected outcomes**.
107+
## 🔴 Important Preparation Steps
109108

109+
Before you begin, please follow these preliminary steps to ensure a smooth setup:
110+
111+
- **Clear Existing Data Directories**: If you're planning to run the pipeline, we recommend removing these directories if they currently exist: `data/02_processed`, `data/03_training_data`, `data/04_reporting`, and `data/05_model_output`. They will be recreated or updated once the pipeline runs. These directories are tracked in version control to provide you with a glimpse of the **expected outputs**.
112+
113+
- **Makefile Usage**: To utilize the Makefile for running commands, you must have `make` installed on your system. Follow the instructions in the [installation guide](https://sp21.datastructur.es/materials/guides/make-install.html) to set it up.
114+
115+
Here is an example of the available targets:
116+
117+
<p align="center">
118+
<img src="https://github.com/labrijisaad/Kedro-Energy-Forecasting-Machine-Learning-Pipeline/assets/74627083/79e85afb-9966-4404-87d5-2c21b3c2526f" width="70%" />
119+
</p>
120+
121+
122+
- **Running the Kedro Pipeline**:
123+
- For **production** environments, initialize your setup by executing `make prep-doc` or using `pip install -r docker-requirements.txt` to install the production dependencies.
124+
- For a **development** environment, where you may want to use **Kedro Viz**, work with **Jupyter notebooks**, or test everything thoroughly, run `make prep-dev` or `pip install -r dev-requirements.txt` to install the development dependencies.
110125

111126

112127
### Standard Method (Conda / venv) 🌿
@@ -121,7 +136,7 @@ Adopt this method if you prefer a traditional Python development environment set
121136

122137
4. **Review the Results**: Inspect the `04_reporting` and `05_model_output` directories to assess the performance and outcomes of your models.
123138

124-
5. **(Optional) Explore with Kedro Viz**: To visually explore your pipeline's structure and data flows, initiate Kedro Viz using `make viz` or `kedro run viz`.
139+
5. **(Optional) Explore with Kedro Viz**: To visually explore your pipeline's structure and data flows, initiate Kedro Viz using `make viz` or `kedro viz run`.
125140

126141
### Docker Method 🐳
127142

dev-requirements.txt

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
1+
# Prduction requirements
2+
-r docker-requirements.txt
3+
14
# Kedro dependencies
2-
kedro~=0.19.3
35
kedro[all]
4-
kedro-datasets>=1.0
5-
kedro-viz>=6.7.0
66
kedro-docker
77

88
# Software development
99
python-dotenv
1010
tqdm
1111
black
12+
ruff
1213

1314
# Data science
14-
scikit-learn
1515
jupyterlab
1616
statsmodels
1717
missingno
18-
lightgbm
1918
ipython
20-
xgboost
21-
pandas
22-
numpy
19+
2320

2421
# Ploting
25-
matplotlib
2622
colorama
27-
plotly
28-
seaborn
23+
plotly

0 commit comments

Comments
 (0)