Skip to content

Commit

Permalink
Add more remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb committed Aug 19, 2024
1 parent 99ad077 commit 80a557a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/topics/creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ so ensure you trust it!
* [tasks and migrations][tasks-migrations]
:::

## First steps

Many operations in your Salt extension project require to be run inside an initialized Git repository
and a Python virtual environment with your project installed. Some `pre-commit` hooks might also create important files.

The following steps are therefore necessary to finish your project generation:

```bash
git init
python -m venv venv
source venv/bin/activate
python -m pip install -e '.[tests,dev,docs]'
python -m pre_commit install
git add .
git commit -m "Initial extension layout" # Can fail, just add the changes and repeat
```

## Important considerations
TODO
### Organization or individual
Expand Down
14 changes: 14 additions & 0 deletions docs/topics/extraction.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
# Extraction of Salt core modules
TODO - ref https://github.com/salt-extensions/extension_migration

## Gotchas
### Unit test imports

Unit tests import the modules directly. After migration, these imports
need to be adjusted, otherwise the tests will run against the modules found in Salt, but still pass (or fail once they are removed). Example:

```python
# Old import
from salt.modules import vault

# Correct
from saltext.vault.modules import vault
```

0 comments on commit 80a557a

Please sign in to comment.