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

Upgrade pydoc-markdown #2117

Merged
merged 60 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
fea2198
Upgrade pydoc-markdown and fix the YAMLs to work with it
ZanSara Feb 2, 2022
935ef42
Add latest docstring and tutorial changes
github-actions[bot] Feb 2, 2022
efcf56a
Pin pydoc-markdown to major version
ZanSara Feb 3, 2022
5f9bbb9
Add quotes
ZanSara Feb 3, 2022
3316ffa
Restore proper arguments rendering
ZanSara Feb 3, 2022
f922cb5
Add latest docstring and tutorial changes
github-actions[bot] Feb 3, 2022
c97148a
Reintroduce crossref too
ZanSara Feb 3, 2022
bcb39e4
Merge branch 'upgrade-pydoc-markdown' of github.com:deepset-ai/haysta…
ZanSara Feb 3, 2022
8db6e46
Generalize pydoc-markdown workflow
ZanSara Feb 3, 2022
bb7247f
Fix some wrongly formatted return docstrings
ZanSara Feb 3, 2022
308d7ae
Fix some wrongly formatted parameter names
ZanSara Feb 3, 2022
cfaaf04
Add latest docstring and tutorial changes
github-actions[bot] Feb 3, 2022
687b855
Trigger a new workflow
ZanSara Feb 3, 2022
2946e09
Remane workflow
ZanSara Feb 3, 2022
d3373d2
Merge branch 'upgrade-pydoc-markdown' of github.com:deepset-ai/haysta…
ZanSara Feb 3, 2022
f5dbbc0
Merge branch 'master' into upgrade-pydoc-markdown
ZanSara Feb 3, 2022
149ed30
Make a single Action to perform all tasks that require committing int…
ZanSara Feb 3, 2022
8489b00
Add one file to recreate docs/_scr/api/api
ZanSara Feb 3, 2022
302cb40
Update Documentation
github-actions[bot] Feb 3, 2022
b8d2740
Merge the code updates and the docs in the Linux CI to prevent the bo…
ZanSara Feb 3, 2022
7bfcce3
Merge branch 'upgrade-pydoc-markdown' of github.com:deepset-ai/haysta…
ZanSara Feb 3, 2022
4ab8516
Installing Jupyter deps for Black
ZanSara Feb 3, 2022
1e61ea9
Add some comments to understand CI failure
ZanSara Feb 3, 2022
cb5d282
Try disabling fetch-depth
ZanSara Feb 3, 2022
7bcc925
Remove redundant trigger
ZanSara Feb 3, 2022
495825a
-> Update Documentation
github-actions[bot] Feb 3, 2022
4046e45
Build cache before running generation tasks
ZanSara Feb 4, 2022
60f96a4
Merge branch 'upgrade-pydoc-markdown' of github.com:deepset-ai/haysta…
ZanSara Feb 4, 2022
52f3ed5
Merge branch 'master' into upgrade-pydoc-markdown
ZanSara Feb 4, 2022
4c8e0d5
Fix dependency among tasks
ZanSara Feb 4, 2022
85776ea
Update Documentation
github-actions[bot] Feb 4, 2022
11c7b92
Final tweaks to Linux CI
ZanSara Feb 4, 2022
d9e2121
Merge branch 'upgrade-pydoc-markdown' of github.com:deepset-ai/haysta…
ZanSara Feb 4, 2022
bbc555e
Change trigger for Linux CI
ZanSara Feb 4, 2022
0dd863b
Change trigger for Linux CI
ZanSara Feb 4, 2022
3e5280b
Testing trigger
ZanSara Feb 4, 2022
2cfaa27
Change trigger for Linux CI
ZanSara Feb 4, 2022
f13c3e0
Add check not to run the code generation on master
ZanSara Feb 4, 2022
84ac0b6
Fix typo in Linux CI
ZanSara Feb 4, 2022
9ec55f7
Simplify push action
ZanSara Feb 4, 2022
c13e503
Make cache stick a bit longer and try pushing to head_ref
ZanSara Feb 4, 2022
5bdaefb
Typo in cache key
ZanSara Feb 4, 2022
adaa52e
Move commit & push together
ZanSara Feb 4, 2022
6acae9e
Simplify push command
ZanSara Feb 4, 2022
d751869
Persist credentials
ZanSara Feb 4, 2022
ef54e0e
Add more test deps in setup.cfg and remove from GH Action workflow
ZanSara Feb 4, 2022
3587d28
Trying to set the ref explicitly
ZanSara Feb 4, 2022
88021c9
Set an explicit requirement that was not properly enforced between ty…
ZanSara Feb 4, 2022
5d65f06
Add comment to setup.cfg
ZanSara Feb 4, 2022
47b282a
remove forced upgrades on pip install
ZanSara Feb 4, 2022
8961873
Remove constraint on PyYAML, probably unnecessary
ZanSara Feb 4, 2022
c4ccf7d
Re-enable persist credentials
ZanSara Feb 4, 2022
f2dc50c
Merge branch 'master' into upgrade-pydoc-markdown
ZanSara Feb 4, 2022
122bb6b
Update Documentation & Code Style
github-actions[bot] Feb 4, 2022
a279fff
Last test
ZanSara Feb 4, 2022
9adc149
Last test
ZanSara Feb 4, 2022
7fc7914
Test when bot should not trigger
ZanSara Feb 4, 2022
0010dd0
Update Documentation & Code Style
github-actions[bot] Feb 4, 2022
aba8eb5
Remove comment
ZanSara Feb 4, 2022
f6ea921
Merge branch 'upgrade-pydoc-markdown' of github.com:deepset-ai/haysta…
ZanSara Feb 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/utils/generate_json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import haystack.nodes
import pydantic.schema
from fastapi.dependencies.utils import get_typed_signature
from github import Github
from pydantic import BaseConfig, BaseSettings, Required, SecretStr, create_model
from pydantic.fields import ModelField
from pydantic.schema import SkipField, TypeModelOrEnum, TypeModelSet, encode_default
Expand Down Expand Up @@ -217,6 +216,8 @@ def generate_json_schema():


def main():
from github import Github

generate_json_schema()
logging.basicConfig(level=logging.INFO)
settings = Settings()
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/blacken.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/generate_json_schema.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/generate_openapi_specs.yml

This file was deleted.

88 changes: 84 additions & 4 deletions .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,93 @@ name: Linux CI
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

code_and_docs_updates:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
#fetch-depth: 0 # otherwise, you will fail to push refs to dest repo

- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install dependencies
run: |
pip install --upgrade pip
pip install black[jupyter] "pydoc-markdown>=4,<5" mkdocs jupytercontrib watchdog==1.0.2

# Apply black on the entire codebase
- name: Blacken
run: python3 -m black .

# Convert the Jupyter notebooks into markdown tutorials
- name: Generate Tutorials
run: |
cd docs/_src/tutorials/tutorials/
python3 convert_ipynb.py

# Generate markdown files from the docstrings with pydoc-markdown
- name: Generate Docstrings
run: |
set -e # Fails on any error in the following loop
cd docs/_src/api/api/
for file in ../pydoc/* ; do
echo "Processing" $file
pydoc-markdown "$file"
done

# Generates the OpenAPI specs file to be used on the documentation website
- name: Generate OpenAPI Specs
run: |
pip install rest_api/
cd docs/_src/api/openapi/
python generate_openapi_specs.py

# Generates a new JSON schema for the pipeline YAML validation
- name: Generate JSON schema for pipelines
run: python ./.github/utils/generate_json_schema.py

# Commit the files to GitHub
- name: Commit files
run: |
git status
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"

echo "============= Documentation changes ============="
git add docs/_src/api/api/
git commit -m " -> Update Documentation" -a || echo "No documentation changes to commit"

echo "============= API Specs changes: ============="
git add docs/_src/api/openapi/
git commit -m "Update OpenAPI specs" -a || echo "No API specification changes to commit"

echo "============= JSON schema changes: ============="
git add json-schemas/
git commit -m "Update JSON schema" -a || echo "No JSON schema changes to commit"

echo "============= Code Style (Black): ============="
git add .
git commit -m "Apply Black" -a || echo "No code changes to commit"

echo "============= Summary: ============="
git status

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

type-check:
needs: code_and_docs_updates
runs-on: ubuntu-20.04
steps:

Expand All @@ -23,7 +104,6 @@ jobs:
- name: Test with mypy
run: mypy haystack


build-cache:
needs: type-check
runs-on: ubuntu-20.04
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/update_documentation.yml

This file was deleted.