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

Separate docs build workflow #2441

Merged
merged 3 commits into from
Jul 23, 2024
Merged

Conversation

purva-thakre
Copy link
Collaborator

Description

As discussed during the community call today, this PR splits the docs build job into a separate workflow. This makes it easier for us to rerun pytest related jobs without waiting for the docs build to be completed.

After this PR is merged, #2437 will be rebased.


License

  • I license this contribution under the terms of the GNU GPL, version 3 and grant Unitary Fund the right to provide additional permissions as described in section 7 of the GNU GPL, version 3.

Before opening the PR, please ensure you have completed the following where appropriate.

@purva-thakre purva-thakre mentioned this pull request Jul 5, 2024
6 tasks
Copy link

codecov bot commented Jul 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.70%. Comparing base (e61c058) to head (a124cb0).
Report is 45 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2441   +/-   ##
=======================================
  Coverage   98.70%   98.70%           
=======================================
  Files          88       88           
  Lines        4083     4083           
=======================================
  Hits         4030     4030           
  Misses         53       53           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@purva-thakre purva-thakre requested a review from cosenal July 9, 2024 16:45
@purva-thakre purva-thakre requested a review from natestemen July 21, 2024 15:29
@purva-thakre
Copy link
Collaborator Author

purva-thakre commented Jul 21, 2024

Pinging @natestemen because I want to rerun the jobs in #2447 without waiting for the docs build.

Once this PR is merged, I could rebase the other branch.

Copy link
Member

@natestemen natestemen left a comment

Choose a reason for hiding this comment

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

I don't see any problems with this. We'll see how it goes, and can revert if any problems arise.

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
make install requirements
Copy link
Member

Choose a reason for hiding this comment

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

IIRC this should do the same thing. Can you double check? Maybe in the past it was a different command, but now I think make install xyz performs the same action as make install.

Suggested change
make install requirements
make install

Copy link
Collaborator Author

@purva-thakre purva-thakre Jul 22, 2024

Choose a reason for hiding this comment

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

I do not know how a makefile works that well. It's on my list of todos.

Maybe in the past it was a different command,

Looking through the targets, why were we using make install requirements in the past? According to this, make install will install from the first installation target which is install. I see development is utilized in setup.py where we install things listed in requirements/.

mitiq/Makefile

Lines 49 to 51 in 231319d

.PHONY: install
install:
pip install -e .[development]

mitiq/Makefile

Lines 59 to 61 in 231319d

.PHONY: requirements
requirements: requirements/requirements.txt
pip install -r requirements/requirements.txt

Why do we have two separate installation targets in the makefile? IMO both appear to behave the same unless I am missing something.

Copy link
Member

Choose a reason for hiding this comment

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

pip install -e .[development]

This will install

  1. an editable installation of Mitiq (-e is short for --editable)
  2. all the dependencies (the [development] "tag" is defined in setup.py here to mean all of the dependencies found in requirements/.)

pip install -r requirements/requirements.txt

This will only install the requirements listed in requirements/requirements.txt which is currently numpy, scipy, cirq-core, and tabulate. I can't find any uses of this command in Mitiq and it should be safe to remove. I've added a note for the community call this week to discuss.

Copy link
Contributor

Choose a reason for hiding this comment

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

Discussed in the community call. Green light from everyone on removing it.
@purva-thakre is going to create a PR to remove it (no need for a ticket, we can just refer to this discussion) and there we will make sure all the builds pass.

@natestemen natestemen added the documentation Improvements or additions to documentation label Jul 22, 2024
@purva-thakre
Copy link
Collaborator Author

purva-thakre commented Jul 22, 2024

Going to go ahead and merge this if docs passes as one failure is what's in #2431

@purva-thakre purva-thakre merged commit 02ebc4b into main Jul 23, 2024
17 of 18 checks passed
@purva-thakre purva-thakre deleted the split_docs_build_from_other_jobs branch July 23, 2024 00:15
@purva-thakre purva-thakre added this to the 0.39.0 milestone Jul 23, 2024
@purva-thakre purva-thakre mentioned this pull request Aug 23, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants