diff --git a/.github/workflows/python-deploy.yml b/.github/workflows/python-deploy.yml new file mode 100644 index 0000000..6160295 --- /dev/null +++ b/.github/workflows/python-deploy.yml @@ -0,0 +1,37 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python Deployment + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + +jobs: + deployment: + runs-on: ubuntu-latest + environment: production + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Build the application + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -e . + pip install pydoctor + python -m bootstraparse "example_userfiles" "docs" + - name: Build the documentation + run: | + pydoctor --make-html --html-output=docs/apidoc src/bootstraparse/ + - name: deploy + uses: JamesIves/github-pages-deploy-action@v4.3.3 + with: + branch: gh-pages # The branch the action should deploy to. + folder: docs diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-tests.yml similarity index 65% rename from .github/workflows/python-app.yml rename to .github/workflows/python-tests.yml index f0b2e45..d962337 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-tests.yml @@ -1,13 +1,13 @@ # This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Python application +name: Python Tests and Lint on: push: - branches: [ main, test ] + branches: [ main, release, releases/*] pull_request: - branches: [ main, test ] + branches: [ main, release, releases/* ] jobs: @@ -40,23 +40,3 @@ jobs: - name: Test with pytest run: | pytest --cov-fail-under=100 -o xfail_strict=true --cov-report=term-missing . - deployment: - runs-on: ubuntu-latest - environment: production - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.10 - uses: actions/setup-python@v2 - with: - python-version: "3.10" - - name: Build the application - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -e . - python -m bootstraparse "example_userfiles" "docs" - - name: deploy - uses: JamesIves/github-pages-deploy-action@v4.3.3 - with: - branch: gh-pages # The branch the action should deploy to. - folder: docs diff --git a/README.md b/README.md index da087b2..6c75e7a 100644 --- a/README.md +++ b/README.md @@ -5,42 +5,49 @@ bootstraparse aims to be customisable in that regard, but its first iteration an You can refer to the `example_userfiles` for an idea of what the parser expects you to feed it and find an example of our automated generation at https://idle-org.github.io/bootstraparse/ for this particular folder. Or you can run the program yourself for the same result! -[![Python application](https://github.com/idle-org/bootstraparse/actions/workflows/python-app.yml/badge.svg?branch=main)](https://github.com/idle-org/bootstraparse/actions/workflows/python-app.yml) +- Main + - [![Python Main](https://github.com/idle-org/bootstraparse/actions/workflows/python-app.yml/badge.svg?branch=main)](https://github.com/idle-org/bootstraparse/actions/workflows/python-app.yml) +- Releases + - [![Python Release](https://github.com/idle-org/bootstraparse/actions/workflows/python-app.yml/badge.svg?branch=release)](https://github.com/idle-org/bootstraparse/actions/workflows/python-app.yml) --- -## Roadmap +## Release Notes ### V1.0.1 -- Make the default example site way more useful +- Remove old regex usage +- Add copy behaviour to config file - Add the type and return types of all functions - Add documentation to remaining lone functions -- Write a documentation for the application (use specs.yaml) - -### V1.0.2 -- Move the WARNING-level output to INFO for config overwrite - -### V1.0.3 - Copy un-parsable files to destination folder without modifications -- Add copy behaviour to config file +- Many bug fixes and improvements + +## Roadmap +### V1.0.2 +- Make the default example site way more useful ☐ +- Write a documentation for the application (use specs.yaml) ☐ +- Move the WARNING-level output to INFO for config overwrite ☐ ### V1.1 -- Functioning `table` Token -- Functioning `code` Token -- Establish a list of all configurable parameters to implement in the future, and update the roadmap with them. -- Decide level of logic to be implemented, and whether it should be configurable -- Update the uses of remaining files +- Functioning `table` Token ☐ +- Functioning `code` Token ☐ +- Establish a list of all configurable parameters to implement in the future, and update the roadmap with them. ☐ +- Decide level of logic to be implemented, and whether it should be configurable ☐ +- Update the uses of remaining files ☐ ### V1.2 -- Check error messages and add a real debug level to parameters -- Functioning `blockquote` Token -- Remove old regex usage +- Check error messages and add a real debug level to parameters ☐ +- Functioning `blockquote` Token ☐ ### V1.3 - Add advanced lookahead logic for `*` +- Functioning `lead` Token ### V1.4 -- Add html indentation for human readability of the output. +- Add html indentation for human readability of the output. ☐ ### V2 - Add a functioning post-context enhancer able to generate menus and elements from arbitrary logic. - Achieve perfect markdown compatibility with appropriate config parameters + +### V3 +- Add Template customisation. diff --git a/example_userfiles/index.bpr b/example_userfiles/index.bpr index b2acd7a..a96516a 100644 --- a/example_userfiles/index.bpr +++ b/example_userfiles/index.bpr @@ -3,27 +3,27 @@ Structural Elements: <
>[class='blue', 123]{var='test', number=11}{{cinsertion}} +div>>{class='blue', 123}{{cinsertion}}[var='test', number=11] <
>[class='blue', 123]{var='test', number=11}{{cinsertion}} +article>>{class='blue', 123}{{cinsertion}}[var='test', number=11] <