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

Docs build workflow #27

Merged
merged 26 commits into from
Mar 26, 2024
Merged

Docs build workflow #27

merged 26 commits into from
Mar 26, 2024

Conversation

UmairK5669
Copy link
Member

@UmairK5669 UmairK5669 commented Mar 23, 2024

Description:
Added a workflow to build the sphinx docs and check for any errors in the build. These errors will be annotated automatically to the PR.

Related Issues:
#16

Tips for the Reviewer:
Commit changes to docs build and observe workflow, if the changes break the build process there will be annotations appearing.

Also, we should probably update the readme.md or coding.md to guide contributors on what to do when a check fails (check annotations etc)

Checklist:
Please be sure to check all boxes honestly. This is to ensure a smooth development process, and to reduce the
likelihood of needing to make additional changes later on.

  • I understand that changes authored by individuals who have not signed a Contributor License Agreement (CLA),
    or whose authorship we cannot verify, may not be accepted.
  • These contribution address a triaged issue.
  • I have performed a self-review of my code and my changes generate no new warnings.
  • I have included unit tests for my code contributions, and all tests are passing.
  • The docstrings are complete, include doctests demonstrating usage, and are properly formatted.
    I have verified that any updates to the project documentation are complete and look okay.
  • I have confirmed all my code contributions are formatted in accordance with the project's Flake8, Black,
    and isort style configurations.
  • No unnecessary changes have been made to the Poetry lock file, but pyproject.toml and the Poetry lock file
    have been updated to reflect any dependency changes.
  • I acknowledge that upon the submission of this pull request, Qoherent will assume the copyright for this
    contribution.

Note: Sorry for the polluted PR, unsure why that happened. There should only be the Docs build workflow here, the codecov one and flake8 should be in a separate PR and should not be merged in yet.

@UmairK5669 UmairK5669 marked this pull request as ready for review March 23, 2024 22:32
@UmairK5669 UmairK5669 requested a review from mrl280 March 23, 2024 22:32
Copy link
Collaborator

@mrl280 mrl280 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! These workflows are going to be very valuable. I've added a couple of comments/questions inline.

pyproject.toml Outdated
@@ -75,6 +76,7 @@ exclude = '''
/(
\.git
| \.github
| .tox
Copy link
Collaborator

@mrl280 mrl280 Mar 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be tox.ini?

poetry lock --no-update
poetry install
pip install black
pip install isort
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't Black and isort come with poetry install --with dev?

poetry lock --no-update
poetry install --with test
pip install pytest
pip install pytest-cov
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't pytest and pytest-cov come with poetry install --with test?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this file be in the project root?

image
Source: https://docs.codecov.com/docs/codecov-yaml#repository-yaml

@mrl280
Copy link
Collaborator

mrl280 commented Mar 23, 2024

Note: Let's remember to squash these commits at merge time.

@UmairK5669
Copy link
Member Author

Should this be tox.ini?

I was running flake8 locally and it was lining through .tox as well which was causing issues however, I realize now it wouldn't get pushed to GitHub so no need to keep it in.

Shouldn't Black and isort come with poetry install --with dev?

Shouldn't pytest and pytest-cov come with poetry install --with test?

Unfortunately, using poetry doesn't seem to work for our workflows. I know it is possible since I have seen others do it but I can't figure out why it doesn't work. Check out this commit I made on the flake8-workflow PR, the workflow that ran as a result of this changed failed because the command line black wasn't found. Have tried this without the --with dev argument as well and it still doesn't work. I think we can merge in for now, report it as a bug and come back to this afterwards.

Should this file be in the project root?

Yes it should! Fixed.

Also, I added an artifact that gets produced when the docs build workflow runs so now, we can see all the updates directly through GitHub without having to fetch the code and build the docs ourselves. I'll demo this in tomorrow's meeting for further clarity.

@UmairK5669 UmairK5669 requested a review from mrl280 March 25, 2024 20:26
Copy link
Collaborator

@mrl280 mrl280 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, let's remember to squash the commits

@UmairK5669 UmairK5669 merged commit 2c7ea9b into main Mar 26, 2024
1 of 3 checks passed
@UmairK5669 UmairK5669 deleted the docs-build-workflow branch March 26, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants