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

tickets/PREOPS-4848: update for pytest 8 and black 24 #68

Merged
merged 5 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .github/workflows/test_and_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ jobs:
shell: bash -l {0}
run: conda list

- name: black format test
shell: bash -l {0}
run: black --check .

- name: Run unit tests
shell: bash -l {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: trailing-whitespace
- id: check-toml
- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.1.1
hooks:
- id: black
# It is recommended to specify the latest version of Python
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ test = [
"isort",
"ruff",
"pytest-cov",
"pytest-black",
"geckodriver"
]
dev = [
Expand All @@ -71,7 +70,7 @@ __version__ = "{version}"
"""

[tool.pytest.ini_options]
addopts = "--black --ignore-glob=*/version.py --ignore-glob=*data_dir/*"
addopts = "--ignore-glob=*/version.py --ignore-glob=*data_dir/*"
testpaths = "."

[tool.black]
Expand Down
6 changes: 3 additions & 3 deletions schedview/plot/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,9 @@
if "displayed_value_metadata" in self.bokeh_models:
tier = f"tier {self.survey_index[0]}"
survey = self._unique_survey_name()
self.bokeh_models[
"displayed_value_metadata"
].text = f"<p>Displayed value: {self.map_key} from {tier}, {survey}</p>"
self.bokeh_models["displayed_value_metadata"].text = (

Check warning on line 891 in schedview/plot/scheduler.py

View check run for this annotation

Codecov / codecov/patch

schedview/plot/scheduler.py#L891

Added line #L891 was not covered by tests
f"<p>Displayed value: {self.map_key} from {tier}, {survey}</p>"
)

def make_time_display(self):
"""Create the bokeh model showing what time is being represented."""
Expand Down
5 changes: 2 additions & 3 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
pytest<8.0.0
black>=23.0.0,<24.0.0
pytest
black
ruff
pytest-cov
pytest-black
firefox
geckodriver
Loading