Skip to content

Commit

Permalink
Merge pull request #21 from Promptly-Technologies-LLC/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
chriscarrollsmith authored Nov 6, 2024
2 parents 97b463d + 5e12bdd commit ed1afe0
Show file tree
Hide file tree
Showing 20 changed files with 5,602 additions and 8,179 deletions.
117 changes: 57 additions & 60 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,58 @@
name: test-format-render

on:
push:
branches: [dev]
pull_request:
branches: [dev]

jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.12"]
poetry-version: [latest]
os: [ubuntu-latest]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Install project
run: |
poetry install
- name: Run tests with pytest
run: |
poetry run pytest tests
outputs:
matrix: ${{ toJson(matrix) }}

render:
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Install project
run: |
poetry install
- name: Format code with black
run: |
poetry run black .
- name: Build README.md
run: |
poetry run python README_files/render.py
- name: Commit and push changes to repository
uses: stefanzweifel/git-auto-commit-action@v5
with:
name: test-format-render

on:
push:
branches: [dev]
pull_request:
branches: [dev]

jobs:
test:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
poetry-version: [latest]
os: [ubuntu-latest]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Install project
run: |
poetry install
- name: Run tests with pytest
run: |
poetry run pytest tests
outputs:
matrix: ${{ toJson(matrix) }}

render:
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Install project
run: |
poetry install
- name: Format code with black
run: |
poetry run black .
- name: Commit and push changes to repository
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'Automated code format and README render'
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
if ! poetry publish --build -u __token__ -p $PYPI_TOKEN; then
output=$(poetry publish --build -u __token__ -p $PYPI_TOKEN 2>&1)
if [ $? -ne 0 ]; then
echo "::warning::Version has not been incremented. No new version published."
echo "$output"
fi
267 changes: 135 additions & 132 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,132 +1,135 @@
# Temporarily ignoring docs folder until I learn how to automate Sphinx doc build
docs

# VSCode files
.vscode

# Byte-compiled / optimized / DLL files
*__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
# Temporarily ignoring docs folder until I learn how to automate Sphinx doc build
docs

# VSCode files
.vscode

# Byte-compiled / optimized / DLL files
*__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Quarto
/.quarto/
Empty file added .nojekyll
Empty file.
Loading

0 comments on commit ed1afe0

Please sign in to comment.