Skip to content

Commit

Permalink
Add FAQ section about skill name/ID (#25)
Browse files Browse the repository at this point in the history
Add clarifying note about skill installation specs
  • Loading branch information
NeonDaniel authored Sep 7, 2023
1 parent 027c873 commit 92f16af
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/overview/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,32 @@ If that doesn't work, ask Neon to "check for updates" and run the update again.
### How can I restore Neon to a default state
Neon can be restored by going to `Settings` -> `Factory Settings` and selecting
`Factory Reset`. This will remove any configuration changes and restore Neon to
the version that was originally shipped.
the version that was originally shipped.

### What is a Skill ID vs a Package Name vs a Class Name
Skills can be identified differently in different contexts. The definitions here
will use the [About Skill](https://github.com/NeonGeckoCom/skill-about) as an
example.

#### Skill ID
A skill ID is used to identify a globally unique skill, and generally follows the
format of `<skill_name>.<skill_author>`. For most skills, this is specified
[in setup.py](https://github.com/NeonGeckoCom/skill-about/blob/d0796bbbdf37cb53dfe583e701048331f5e9731e/setup.py#L35).
For older skills without a `setup.py` the skill ID is specified as the directory
containing the skill's `__init__.py`; tools like `msm` and `osm` install skills
to directories matching the usual format, using information from a git URL or
[skill.json](https://github.com/NeonGeckoCom/skill-about/blob/dev/skill.json#L48-L49).

#### Package name
A skill package may be created with an arbitrary package name
[in setup.py](https://github.com/NeonGeckoCom/skill-about/blob/d0796bbbdf37cb53dfe583e701048331f5e9731e/setup.py#L87).
This identifier is used for installing the skill or listing it as a dependency like other
Python packages. If the skill is uploaded to PyPI, then it may be installed by package
name using pip (i.e. `pip install neon-skill-about`). Older skills that are not packaged
will not have a package name.

#### Skill Class
A [skill class](https://github.com/NeonGeckoCom/skill-about/blob/d0796bbbdf37cb53dfe583e701048331f5e9731e/__init__.py#L45)
generally has a descriptive name and is capitalized according to [Python standards](https://peps.python.org/pep-0008/#class-names).
This class is referenced in the [setup.py entrypoint](https://github.com/NeonGeckoCom/skill-about/blob/d0796bbbdf37cb53dfe583e701048331f5e9731e/setup.py#L35)
but is otherwise not referenced directly.
4 changes: 4 additions & 0 deletions docs/quick_reference/installing_skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ skills:
- git+https://github.com/NeonGeckoCom/skill-translation
- neon-skill-translation~=1.0
```
> Note that the skills here are [Python packages](https://packaging.python.org/en/latest/).
> This is the same kind of string you would pass to
> [`pip install`](https://pip.pypa.io/en/stable/cli/pip_install/), including any (optional)
> version specs.

## Installing Skills from GitHub
> OSM installation is documented here, but not recommended. Skills should be
Expand Down

0 comments on commit 92f16af

Please sign in to comment.