### **User description**
Closes #
https://linear.app/codeflash-ai/issue/CF-175/account-for-numpyrandom-calls-by-setting-a-seed
___
### **PR Type**
Enhancement, Tests
___
### **Description**
- Enhanced the handling of random number generator (RNG) modules by
adding a dictionary to map modules to their seed-setting functions.
- Improved the visitor pattern to detect RNG imports and set seeds
accordingly in the test instrumentation process.
- Updated existing test cases and added new ones to cover various
scenarios of RNG usage and seed setting.
- Adjusted the indentation and added a caution comment in the optimizer
code regarding loop index handling.
___
### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>optimizer.py</strong><dd><code>Adjust indentation and
add caution comment in optimizer</code> </dd></summary>
<hr>
cli/codeflash/optimization/optimizer.py
<li>Adjusted the indentation of <code>total_timing</code>
assignment.<br> <li> Added a caution comment about loop index
handling.<br>
</details>
</td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1165/files#diff-9bbfdc23f4fbf008e5c7d80d4ac3dbb36e757835ef7f868b42d86aad0b29a77b">+1/-1</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>instrument_new_tests.py</strong><dd><code>Enhance RNG
handling and seed setting in test instrumentation</code></dd></summary>
<hr>
django/aiservice/testgen/instrumentation/instrument_new_tests.py
<li>Added a dictionary for RNG modules and their seed functions.<br>
<li> Enhanced the visitor pattern to handle RNG imports and set
seeds.<br> <li> Implemented methods to create seed statements and
process statements <br>recursively.<br>
</details>
</td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1165/files#diff-b174c49c3e090435474a9548d4d2522d0ac073fc1a2658d6ca97c4c85e9c5adc">+131/-81</a></td>
</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>test_instrument_generated_tests.py</strong><dd><code>Update
and expand test cases for RNG seed handling</code>
</dd></summary>
<hr>
django/aiservice/testgen/instrumentation/tests/test_instrument_generated_tests.py
<li>Updated test cases to use new seed setting logic.<br> <li> Added
multiple test cases for different RNG import scenarios.<br> <li>
Modified assertions to reflect changes in seed handling.<br>
</details>
</td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1165/files#diff-27560015a80c8a9bdf30c40c8e57b65b82312f452a51c11b65ffe2b38ac4bb79">+1113/-8</a></td>
</tr>
</table></td></tr></tr></tbody></table>
___
> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
---------
Co-authored-by: Saurabh Misra <misra.saurabh1@gmail.com>
### **User description**
Adding files to be excluded while building pypi project or avoiding
sensitive files like .env from check in
___
### **PR Type**
enhancement, configuration changes
___
### **Description**
- Added exclusion rules in `pyproject.toml` files to prevent sensitive
and unnecessary files from being included in the package build.
- Excluded files include sensitive files like `.env` and `.pem`,
development files like `.git` and `Dockerfile`, and unnecessary file
types like `*.log` and `*.db`.
- This enhancement improves the security and cleanliness of the package
distribution.
___
### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>pyproject.toml</strong><dd><code>Add exclusion rules
for sensitive and unnecessary files</code> </dd></summary>
<hr>
cli/pyproject.toml
<li>Added an <code>exclude</code> section to specify files and
directories to be <br>excluded from the package build.<br> <li> Included
patterns for sensitive files like <code>.env</code>, <code>.pem</code>,
and <code>secrets.*</code>.<br> <li> Excluded common development and
configuration files such as <code>.git</code>,
<br><code>Dockerfile</code>, and <code>.vscode</code>.<br> <li> Excluded
unnecessary file types like <code>*.log</code>, <code>*.tmp</code>, and
<code>*.db</code>.<br>
</details>
</td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1190/files#diff-0c21298b23605dcadf25950579e3ada906093fa49e7c5f98eaa7f3d816c29d28">+47/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>pyproject.toml</strong><dd><code>Add exclusion rules
for sensitive and unnecessary files</code> </dd></summary>
<hr>
django/aiservice/pyproject.toml
<li>Added an <code>exclude</code> section to specify files and
directories to be <br>excluded from the package build.<br> <li> Included
patterns for sensitive files like <code>.env</code>, <code>.pem</code>,
and <code>secrets.*</code>.<br> <li> Excluded common development and
configuration files such as <code>.git</code>,
<br><code>Dockerfile</code>, and <code>.vscode</code>.<br> <li> Excluded
unnecessary file types like <code>*.log</code>, <code>*.tmp</code>, and
<code>*.db</code>.<br>
</details>
</td>
<td><a
href="https://github.com/codeflash-ai/codeflash/pull/1190/files#diff-1cd1f75beb8e70c006a688caffdd71f14a3babb13cc499ca48f499bd530fca1e">+45/-1</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
___
> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information