-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update docs for development
- Loading branch information
Showing
13 changed files
with
3,980 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
output=my_script.py | ||
echo "#!/usr/bin/env python3" > $output | ||
grep -E "(^from|^import)" src/brew_file/*.py|grep -v "from \."| cut -d ":" -f2|sort -u >> $output | ||
cat src/brew_file/info.py|grep -vE "(^from|^import)" >> $output | ||
cat src/brew_file/utils.py|grep -vE "(^from|^import)" >> $output | ||
cat src/brew_file/brew_helper.py|grep -vE "(^from|^import)" >> $output | ||
cat src/brew_file/brew_info.py|grep -vE "(^from|^import)" >> $output | ||
cat src/brew_file/brew_file.py|grep -vE "(^from|^import)" >> $output | ||
cat src/brew_file/main.py|grep -vE "(^from|^import)" >> $output | ||
|
||
black $output | ||
isort $output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Development | ||
=========== | ||
|
||
Preparation | ||
----------- | ||
|
||
To develop this package, use poetry. | ||
|
||
$ pip install poetry | ||
$ poetry install | ||
$ poetry shell | ||
|
||
Then, you can run ``brew-file`` command made from ``src`` directory. | ||
|
||
Update scripts | ||
-------------- | ||
|
||
Do not edit ``bin/brew-file`` directly. | ||
|
||
Edit ``src/brew_file/*.py`` and run:: | ||
|
||
$ ./combine.sh | ||
|
||
|
||
Test | ||
---- | ||
|
||
Run:: | ||
|
||
$ pytest | ||
|
||
|
||
Tests in ``tests`` will test ``bin/brew-file`` instead of files in ``src``, therefore run ``combine.sh`` before run tests. | ||
|
||
|
||
Commit | ||
------ | ||
|
||
When you run ``git commit``, ``pre-commit`` will run ``black`` and other linters. | ||
|
||
Some of parts will be automatically fixed | ||
and you need just rerun ``git commit``. | ||
|
||
Some of parts will be remained and you need to fix them manually. | ||
|
||
Fix them and rerun ``git commit``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from .info import __version__ | ||
from .main import main | ||
|
||
__all__ = ["__version__", "main"] |
Oops, something went wrong.