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

Import ribs[visualize] in tutorials that need it #379

Merged
merged 3 commits into from Sep 21, 2023
Merged

Conversation

btjanaka
Copy link
Member

@btjanaka btjanaka commented Sep 21, 2023

Description

Since the visualize extra is installed in the CI for the tutorials, we did not detect bugs where the tutorials needed ribs[visualize] but only installed ribs. This PR adds ribs[visualize] to the tutorials that need it and also makes a note in the "Adding a Tutorial" section of CONTRIBUTING.md.

TODO

Questions

Status

  • I have read the guidelines in
    CONTRIBUTING.md
  • I have formatted my code using yapf
  • I have tested my code by running pytest
  • I have linted my code with pylint
  • I have added a one-line description of my change to the changelog in
    HISTORY.md
  • This PR is ready to go

@btjanaka btjanaka merged commit 435551e into master Sep 21, 2023
17 checks passed
@btjanaka btjanaka deleted the tutorial-deps branch September 21, 2023 23:38
btjanaka added a commit that referenced this pull request Sep 22, 2023
## Description

<!-- Provide a brief description of the PR's purpose here. -->

Since the visualize extra is installed in the CI for the tutorials, we
did not detect bugs where the tutorials needed ribs[visualize] but only
installed ribs. This PR adds ribs[visualize] to the tutorials that need
it and also makes a note in the "Adding a Tutorial" section of
CONTRIBUTING.md.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

## Questions

<!-- Any concerns or points of confusion? -->

## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] I have added a one-line description of my change to the changelog
in
      `HISTORY.md`
- [x] This PR is ready to go
btjanaka added a commit that referenced this pull request Sep 22, 2023
## Description

<!-- Provide a brief description of the PR's purpose here. -->

Previously, we always installed `ribs[visualize]` before testing
tutorials. This led to uncaught bugs where some tutorials needed
`ribs[visualize]` to be installed but did not install it -- namely,
since we always installed `ribs[visualize]`, the tutorial could get by
without installing `ribs[visualize]`. This led to bugs such as those in
#379. To remedy this issue, this PR removes the default installation of
`ribs[visualize]` in the tutorial CI.

Instead, the notebook now installs the local copy of pyribs on its own
-- we do this by replacing, e.g., `pip install ribs[visualize]` with
`pip install .[visualize]`. Note that it is not possible to leave this
dependency as is (i.e., `pip install ribs[visualize]`) because the
tutorial would pull from PyPI instead of the local copy.

## TODO

<!-- Notable points that this PR has either accomplished or will
accomplish. -->

- [x] Fix bug in fooling mnist tutorial caused by matplotlib not being
installed

## Questions

## Status

- [x] I have read the guidelines in

[CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md)
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] I have added a one-line description of my change to the changelog
in
      `HISTORY.md`
- [x] This PR is ready to go
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.

None yet

1 participant