AnswerDotAI / AnswerDotAI/nbdev
[idea]simplify console_scripts
- Dominant language
- Jupyter Notebook
- Stars
- 5.3k
- Forks
- 513
- Avg merge
- 2d 30m
- Merged PRs (30d)
- 8
Description
Thank you for the repository.
Lately, I've been working extensively with `console_scripts`. Currently, we're using fastcore's `call_parse` to wrap functions and then manually adding entries to the `settings.ini` file, like so:
```ini
console_scripts = nbdev_export=nbdev.cli:nbdev_export
```
I believe this process could be simplified. Imagine if we could enhance `call_parse` to automatically generate the `console_scripts` entry based on a decorator, such as:
```python
@call_parse(script_name="nbdev-fastcore-amazing")
def nbdev_export(…):
...
```
This would automatically update console_scripts like:
```ini
console_scripts = nbdev-fastcore-amazing=nbdev.cli:nbdev_export
```
This approach could save a lot of manual typing and streamline the process.
Contributor guide
Research direction
Start by reading fastcore's call_parse usage in the issue and nbdev's settings.ini console_scripts entry. Determine how a decorator argument could connect the function path to that configuration, and define done as generating the requested entry without manually editing settings.ini.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100