MetaCell / MetaCell/NetPyNE-UI

[Proposal] Add warning message when setParam fails silently

Open
#835 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
23
Forks
10
PR merge metrics
No merged PRs in 30d

Description

**Description**
While working on PEP8 cleanups in `netpyne/specs/netParams.py`, I noticed that `setParam` and similar methods fail silently when a label is not found.

**Current Behavior**
```python
if label in self:
d = self[label]
else:
return False # Silently fails, user is not notified
```

**Proposed Improvement**
I propose adding an explicit warning so users can debug their scripts easier:

```python
else:
print(f\"Warning: Label '{label}' not found. Parameter '{param}' not set.\")
return False
```

**Question**
Should I include this UX improvement as part of the PEP8 cleanup PR, or would you prefer a separate PR for this logic change?"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in netpyne/specs/netParams.py by reading setParam and the similar methods described in the issue. Confirm the intended behavior for a missing label, then verify that the warning is emitted and the method still returns False without setting the parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.