Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation PR #151

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
47ac24d
add metadata class for flash in docs
zain-sohail Sep 14, 2023
30c248b
adding example data first try
zain-sohail Oct 4, 2023
62ce18a
tutorial files and index.rst edited for docs
zain-sohail Oct 5, 2023
3ae3cfd
workflow for auto generation of tutorial docs
zain-sohail Oct 5, 2023
47dc164
tutorial file with outputs for testing
zain-sohail Oct 5, 2023
0a13521
update to workflow
zain-sohail Oct 5, 2023
88caa16
Use github cache feature
zain-sohail Oct 11, 2023
ccc69bf
Merge branch 'main' into documentation
zain-sohail Oct 12, 2023
d7299d9
try distributed testing and coveralls action
zain-sohail Oct 12, 2023
04a996b
add the setup-python action (accidentally commented out)
zain-sohail Oct 12, 2023
8b25f63
go back to the combined action
zain-sohail Oct 12, 2023
103c9a6
remove race condition for sed_config.yaml detetion from test_processo…
rettigl Oct 12, 2023
2644b41
remove race condition in test_io, and remove generated test files
rettigl Oct 12, 2023
ef76eff
remove race condition for flash loader tests and remove additional ge…
rettigl Oct 12, 2023
f4ea9b1
update testing workflow for coveralls and change name
zain-sohail Oct 13, 2023
48c6fe3
linting workflow restricted to only lint, also allowing code analysis…
zain-sohail Oct 13, 2023
132f7cc
try ignoring docs, installing package
zain-sohail Oct 13, 2023
4e99f9d
remove code analysis section for now and use old way of running linter
zain-sohail Oct 13, 2023
e7d4780
remove matrix testing
zain-sohail Oct 13, 2023
097a566
fix linter
zain-sohail Oct 13, 2023
627ecb6
revert back linting configs
zain-sohail Oct 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/document_tutorials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: autogenerate docs from tutorials
# Not finished! Only will run on a specific branch for now so can be left
on:
# Triggers the workflow on push but only for the main branch
push:
branches: [ workflow_trials ]
paths: ['**.ipynb']

jobs:
docs-from-tutorials:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
# Check out repo and set up Python
- name: Check out the repository
uses: actions/checkout@v4
with:
lfs: true

- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: 3.8
poetry-version: 1.2.2

#
- name: run python script after setting up
run: |
poetry run pip install nbconvert
poetry install
mkdir tutorial
poetry run python renaming.py

- name: remove notebooks from docs
run: rm *.ipynb

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'Updating tutorial rsts for docs'
add: 'sed/docs/tutorial/'
21 changes: 0 additions & 21 deletions .github/workflows/generate-requirements.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This workflow will install Python dependencies, lint and run tests with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
# TODO: switch to the cached version
name: linting

on: [push]

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
linter: [pylint, mypy, flake8]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: advanced-security/python-lint-code-scanning-action@v1
with:
linter: ${{ matrix.linter }}
47 changes: 0 additions & 47 deletions .github/workflows/pylint.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/pytest_coveralls.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/pytest_muliversion.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: testing

on:
push:
branches: [ main ]
pull_request:
branches: [main]

jobs:
pytest:
# Using matrix strategy
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
runs-on: ubuntu-latest
steps:
#-------------------------------------#
# Check out repo and set up Python #
#-------------------------------------#
- name: Check out the repository
uses: actions/checkout@v4
with:
lfs: true

- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: ${{matrix.python-version}}
poetry-version: 1.2.2

#------------------------#
# Run pytest
#------------------------#
- name: Run tests on python ${{matrix.python-version}}
run: |
poetry run pytest --cov=sed -n auto tests/
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true

finish:
needs: pytest
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
# Coveralls missing
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: "run-3.8,run-3.9,run-3.10"
34 changes: 34 additions & 0 deletions .github/workflows/update_requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: update requirements.txt

on:
# Triggers the workflow on push but only for the main branch
push:
branches: [ main ]
paths: [pyproject.toml]

jobs:
pytest:
runs-on: ubuntu-latest
steps:
# Check out repo and set up Python
- name: Check out the repository
uses: actions/checkout@v4
with:
lfs: true

- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: 3.8
poetry-version: 1.2.2

# Generates and commits a requirements.txt used by readthedocs
- name: Export requirements.txt
run: poetry export --without-hashes --format=requirements.txt -o docs/requirements.txt -E docs -E notebook

- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'Updating requirements for docs'
add: 'docs/requirements.txt'
File renamed without changes.
Loading