Skip to content

Commit

Permalink
Merge pull request #27 from 6809/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
jedie authored Nov 3, 2023
2 parents 6df432c + fa0b841 commit 39f5502
Show file tree
Hide file tree
Showing 11 changed files with 1,503 additions and 521 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.10", "3.9"]
python-version: ["3.12", "3.11", "3.10", "3.9"]
env:
PYTHONUNBUFFERED: 1
PYTHONWARNINGS: always
steps:
- name: Checkout
run: |
echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git clone https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
Expand All @@ -36,12 +36,21 @@ jobs:
cache: 'pip' # caching pip dependencies
cache-dependency-path: '**/requirements.dev.txt'

- name: 'Bootstrap'
- name: 'Bootstrap app venv'
# The first CLI call will create the .venv
run: |
./cli.py version
- name: 'app CLI help'
run: |
./cli.py --help
- name: 'Bootstrap dev venv'
# The first CLI call will create the .venv
run: |
./dev-cli.py version
- name: 'CLI help'
- name: 'dev CLI help'
run: |
./dev-cli.py --help
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
*.egg-info
__pycache__
/dist/
/coverage.json
/coverage.xml
/coverage.*
*.orig

!.github
!.editorconfig
Expand Down
4 changes: 2 additions & 2 deletions MC6809/cli/cli_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from rich_click import RichGroup

import MC6809
from MC6809 import constants
from MC6809 import __version__, constants
from MC6809.core.bechmark import run_benchmark


Expand Down Expand Up @@ -96,7 +96,7 @@ def profile(loops, multiply):


def main():
print(f'[bold][green]MC6809[/green] v[cyan]{MC6809.__version__}')
print(f'[bold][green]MC6809[/green] v[cyan]{__version__}')

# Execute Click CLI:
cli.name = './cli.py'
Expand Down
6 changes: 3 additions & 3 deletions MC6809/cli/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

import rich_click as click
from bx_py_utils.path import assert_is_file
from cli_base.cli_tools.subprocess_utils import verbose_check_call
from cli_base.cli_tools.version_info import print_version
from manageprojects.utilities import code_style
from manageprojects.utilities.publish import publish_package
from manageprojects.utilities.subprocess_utils import verbose_check_call
from manageprojects.utilities.version_info import print_version
from rich import print # noqa; noqa
from rich_click import RichGroup

Expand Down Expand Up @@ -118,7 +118,7 @@ def update():
verbose_check_call(bin_path / 'pip', 'install', '-U', 'pip-tools')

extra_env = dict(
CUSTOM_COMPILE_COMMAND='./cli.py update',
CUSTOM_COMPILE_COMMAND='./dev-cli.py update',
)

pip_compile_base = [
Expand Down
22 changes: 22 additions & 0 deletions MC6809/tests/test_readme_history.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from unittest import TestCase

from bx_py_utils.auto_doc import assert_readme_block
from cli_base.cli_tools.git_history import get_git_history

import MC6809
from MC6809.cli.cli_app import PACKAGE_ROOT


class ReadmeHistoryTestCase(TestCase):
def test_readme_history(self):
git_history = get_git_history(
current_version=MC6809.__version__,
add_author=False,
)
history = '\n'.join(git_history)
assert_readme_block(
readme_path=PACKAGE_ROOT / 'README.md',
text_block=f'\n{history}\n',
start_marker_line='[comment]: <> (✂✂✂ auto generated history start ✂✂✂)',
end_marker_line='[comment]: <> (✂✂✂ auto generated history end ✂✂✂)',
)
Loading

0 comments on commit 39f5502

Please sign in to comment.