You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Example with Screen-shots](#example-with-screen-shots)
25
+
-[1. Create a fork of the mlforecast repo](#1-create-a-fork-of-the-mlforecast-repo)
26
+
-[2. Clone the repository](#2-clone-the-repository)
27
+
-[3. Make the changes you want](#3-make-the-changes-you-want)
28
+
-[4. Create a pull request](#4-create-a-pull-request)
29
+
-[Notes](#notes)
17
30
18
31
## Prerequisites
19
32
@@ -42,7 +55,7 @@ Branching in GitHub is a key strategy for effectively managing and isolating cha
42
55
43
56
After testing, branches are merged back into the main branch via a pull request, and then typically deleted to maintain a clean repository. You can read more about github and branching [here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository).
44
57
45
-
## Set Up a Virtual Environment
58
+
## Set Up a Virtual Environment
46
59
47
60
> If you want to use Docker or Codespaces, let us know opening an issue and we will set you up.
48
61
@@ -71,25 +84,50 @@ Install the library in editable mode using `uv pip install --no-build-isolation
71
84
By using the `-e` flag the package is linked directly to the source code, allowing any changes made to the source code to be immediately reflected in your Python environment without the need to reinstall the package. This is useful for testing changes during package development.
72
85
73
86
### Re-compiling the shared library
87
+
74
88
If you're working on the C++ code, you'll need to re-compile the shared library, which can be done with: `python setup.py build_ext --inplace` (this will compile it into the `build` directory and copy it to the python package location).
75
89
76
90
## Set Up your Notebook based development environment
77
91
78
-
Notebook-based development refers to using interactive notebooks, such as Jupyter Notebooks, for coding, data analysis, and visualization. Here's a brief description of its characteristics:
92
+
Notebooks are only used in the project for how-to-guides and code-walkthroughs.
93
+
94
+
## Running tests
95
+
96
+
To run the tests, run
97
+
98
+
```sh
99
+
uv run pytest
100
+
```
101
+
102
+
## Viewing documentation locally
103
+
104
+
The new documentation pipeline relies on `quarto`, `mintlify` and `lazydocs`.
105
+
106
+
### Install `quarto`
79
107
80
-
1.**Interactivity**: Code in notebooks is written in cells which can be run independently. This allows for iterative development and testing of small code snippets.
108
+
Install `quarto` from →[this link](https://quarto.org/docs/get-started/)
81
109
82
-
2.**Visualization**: Notebooks can render charts, tables, images, and other graphical outputs within the same interface, making it great for data exploration and analysis.
110
+
### Install mintlify
83
111
84
-
3.**Documentation**: Notebooks support Markdown and HTML, allowing for detailed inline documentation. Code, outputs, and documentation are in one place, which is ideal for tutorials, reports, or sharing work.
112
+
> [!NOTE]
113
+
> Please install Node.js before proceeding.
85
114
86
-
For notebook based development you'll need `nbdev` and a notebook editor (such as VS Code, Jupyter Notebook or Jupyter Lab). `nbdev` and jupyter have been installed in the previous step. If you use VS Code follow [this tutorial](https://code.visualstudio.com/docs/datascience/jupyter-notebooks).
115
+
```sh
116
+
npm i -g mint
117
+
```
87
118
88
-
[nbdev](https://github.com/fastai/nbdev) makes debugging and refactoring your code much easier than in traditional programming environments since you always have live objects at your fingertips. `nbdev` also promotes software engineering best practices because tests and documentation are first class.
119
+
For additional instructions, you can read about it →[this link](https://mintlify.com/docs/installation).
89
120
90
-
All your changes must be written in the notebooks contained in the library (under the `nbs` directory). Once a specific notebook is open (more details to come), you can write your Python code in cells within the notebook, as you would do in a traditional Python development workflow. You can break down complex problems into smaller parts, visualizing data, and documenting your thought process. Along with your code, you can include markdown cells to add documentation directly in the notebook. This includes explanations of your logic, usage examples, and more. Also, `nbdev` allows you to write [tests inline](https://nbdev.fast.ai/tutorials/best_practices.html#document-error-cases-as-tests) with your code in your notebook. After writing a function, you can immediately write tests for it in the following cells.
121
+
```sh
122
+
uv pip install -e '.[dev]' lazydocs
123
+
make all_docs
124
+
```
91
125
92
-
Once your code is ready, `nbdev` can automatically convert your notebook into Python scripts. Code cells are converted into Python code, and markdown cells into comments and docstrings.
126
+
Finally to view the documentation
127
+
128
+
```sh
129
+
make preview_docs
130
+
```
93
131
94
132
## Start Coding
95
133
@@ -99,7 +137,6 @@ Open a jupyter notebook using `jupyter lab` (or VS Code).
99
137
100
138
2.**Commit Your Changes:** Add the changed files using `git add [your_modified_file_0.ipynb] [your_modified_file_1.ipynb]`, then commit these changes using `git commit -m "<type>: <Your descriptive commit message>"`. Please use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
101
139
102
-
103
140
3.**Push Your Changes:**
104
141
Push your changes to the remote repository on GitHub with `git push origin feature/your-feature-name`.
105
142
@@ -116,6 +153,7 @@ You can find a detailed step by step buide with screen-shots below.
116
153
## Example with Screen-shots
117
154
118
155
### 1. Create a fork of the mlforecast repo
156
+
119
157
The first thing you need to do is create a fork of the GitHub repository to your own account:
In this section, we assume that we want to increase the default number of windows used to create prediction intervals from 2 to 3. The first thing we need to do is create a specific branch for that change using `git checkout -b [new_branch]` like this:
155
193
@@ -181,8 +219,7 @@ Finally, push your changes using `git push`:
In GitHub, open your repository that contains your fork of the original repo. Once inside, you will see the changes you just pushed. Click on "Compare and pull request":
188
225
@@ -196,6 +233,6 @@ Finally, you will see something like this:
- This file was generated using [this file](https://github.com/Nixtla/nixtla-commons/blob/main/docs/contribute/step-by-step.md). Please change that file if you want to enhance the document.
0 commit comments