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

Development dependency updates for next #5248

Merged
merged 13 commits into from
Feb 12, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
ports:
- "6379:6379"
selenium:
image: "selenium/standalone-firefox:4.9.1"
image: "selenium/standalone-firefox:4.17"
ports:
- "4444:4444"
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ jobs:
ports:
- "6379:6379"
selenium:
image: "selenium/standalone-firefox:4.9.1"
image: "selenium/standalone-firefox:4.17"
ports:
- "4444:4444"
steps:
Expand Down
1 change: 1 addition & 0 deletions changes/5248.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Broadened `Markdown` dependency to permit versions up to 3.5.x.
1 change: 1 addition & 0 deletions changes/5248.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed source code excerpts from the "App Developer Guide > Code Reference" section of the documentation.
1 change: 1 addition & 0 deletions changes/5248.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated development dependencies including `coverage`, `django-debug-toolbar`, `factory-boy`, `mkdocs-material`, `mkdocstrings`, `mkdocstrings-python`, `pylint`, `rich`, `ruff`, `selenium`, `splinter`, `towncrier`, `watchdog`, and `yamllint` to their latest available versions.
2 changes: 1 addition & 1 deletion development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ services:
env_file:
- dev.env
selenium:
image: selenium/standalone-firefox:4.9.1
image: selenium/standalone-firefox:4.17
ports:
- "4444:4444"
- "15900:5900"
Expand Down
7 changes: 3 additions & 4 deletions examples/example_app/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Jinja2==3.1.3
mkdocs==1.5.3
mkdocs-include-markdown-plugin==4.0.4
mkdocs-material==9.1.18
mkdocstrings==0.22.0
mkdocstrings-python==1.3.0
mkdocs-material==9.5.8
mkdocstrings==0.24.0
mkdocstrings-python==1.8.0
Comment on lines -3 to +5
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a .removed changelog fragment for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since it has no functional impact to the end user, I don't think so? Could add it to the .housekeeping if you like though. Note that the changes to the docs/requirements.txt files really only impact ReadTheDocs though.

1 change: 0 additions & 1 deletion examples/example_app/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ markdown_extensions:
- "pymdownx.superfences"
plugins:
- "search"
- "include-markdown"

nav:
- Introduction: "index.md"
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ plugins:
- "gen-files":
scripts:
- docs/generate_code_reference_pages.py
- "include-markdown"
- "mkdocs-version-annotations"
- "section-index"
- "mkdocstrings":
Expand All @@ -113,6 +112,7 @@ plugins:
heading_level: 1
show_root_heading: true
show_root_members_full_path: true
show_source: false
- "redirects":
redirect_maps:
'additional-features/caching.md': 'user-guide/administration/guides/caching.md'
Expand Down
7 changes: 3 additions & 4 deletions nautobot/core/models/tree_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def display(self):
except self.DoesNotExist:
# Expected to occur at times during bulk-delete operations
pass
finally:
display_str += self.name
cache.set(cache_key, display_str, 5)
return display_str # pylint: disable=lost-exception
display_str += self.name
cache.set(cache_key, display_str, 5)
return display_str
54 changes: 0 additions & 54 deletions nautobot/core/testing/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from django.test import override_settings, tag
from django.urls import reverse
from django.utils.functional import classproperty
from selenium import webdriver
from splinter.browser import Browser

from nautobot.core import testing
Expand All @@ -20,42 +19,6 @@
LOGIN_URL = reverse(settings.LOGIN_URL)


FIREFOX_PROFILE_PREFERENCES = {
"network.http.pipelining": True,
"network.http.proxy.pipelining": True,
"network.http.pipelining.maxrequests": 8,
"content.notify.interval": 500000,
"content.notify.ontimer": True,
"content.switch.threshold": 250000,
"browser.cache.memory.capacity": 65536, # Increase the cache capacity.
"reader.parse-on-load.enabled": False, # Disable reader: we won't need that.
"browser.pocket.enabled": False, # Firefox pocket too!
"loop.enabled": False,
"browser.chrome.toolbar_style": 1, # Text on Toolbar instead of icons
"browser.display.show_image_placeholders": False, # Don't show thumbnails on not loaded images.
"browser.display.use_document_colors": False, # Don't show document colors.
"browser.display.use_document_fonts": 0, # Don't load document fonts.
"browser.display.use_system_colors": True, # Use system colors.
"browser.formfill.enable": False, # Autofill on forms disabled.
"browser.helperApps.deleteTempFileOnExit": True, # Delete temporary files.
"browser.shell.checkDefaultBrowser": False,
"browser.startup.homepage": "about:blank",
"browser.startup.page": 0, # Blank startup page
"browser.tabs.forceHide": True, # Disable tabs: We won't need that.
"browser.urlbar.autoFill": False, # Disable autofill on URL bar.
"browser.urlbar.autocomplete.enabled": False, # Disable autocomplete on URL bar.
"browser.urlbar.showPopup": False, # Disable list of URLs when typing on URL bar.
"browser.urlbar.showSearch": False, # Disable search bar.
"extensions.checkCompatibility": False, # Addon update disabled
"extensions.checkUpdateSecurity": False,
"extensions.update.autoUpdateEnabled": False,
"extensions.update.enabled": False,
"general.startup.browser": False,
"plugin.default_plugin_disabled": False,
"permissions.default.image": 2,
}


# In CI, sometimes the FQDN of SELENIUM_HOST gets used, other times it seems to be just the hostname?
@override_settings(ALLOWED_HOSTS=["nautobot.example.com", SELENIUM_HOST, SELENIUM_HOST.split(".")[0]])
@tag("integration")
Expand All @@ -74,11 +37,9 @@ class SeleniumTestCase(StaticLiveServerTestCase, testing.NautobotTestCaseMixin):
def setUpClass(cls):
super().setUpClass()
# Instantiate the browser object.
profile = cls._create_firefox_profile()
cls.browser = Browser(
"remote",
command_executor=SELENIUM_URL,
browser_profile=profile,
# See: https://developer.mozilla.org/en-US/docs/Web/WebDriver/Timeouts
# desired_capabilities={"timeouts": {"implicit": 60 * 60 * 1000 }}, # 1 hour timeout
)
Expand Down Expand Up @@ -113,18 +74,3 @@ def login(self, username, password, login_url=LOGIN_URL, button_text="Log In"):

def logout(self):
self.browser.visit(f"{self.live_server_url}/logout")

@classmethod
def _create_firefox_profile(cls):
"""
Return a `FirefoxProfile` with speed-optimized preferences such as disabling image loading,
enabling HTTP pipelining, among others.

Credit: https://bit.ly/2TuHa9D
"""

profile = webdriver.FirefoxProfile()
for key, value in FIREFOX_PROFILE_PREFERENCES.items():
profile.set_preference(key, value)

return profile
2 changes: 1 addition & 1 deletion nautobot/core/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class BaseFilterSetTest(TestCase):
Ensure that a BaseFilterSet automatically creates the expected set of filters for each filter type.
"""

class TestFilterSet(filters.BaseFilterSet):
class TestFilterSet(filters.BaseFilterSet): # pylint: disable=used-before-assignment # appears to be a pylint bug
"""Filterset for testing various fields."""

class TestModel(django_models.Model): # noqa: DJ008 # django-model-without-dunder-str -- fine since this isn't a "real" model
Expand Down
9 changes: 4 additions & 5 deletions nautobot/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
Jinja2==3.1.3
Markdown==3.3.7
Markdown==3.5.2
markdown-data-tables==1.0.0
mkdocs==1.5.3
mkdocs-gen-files==0.5.0
mkdocs-include-markdown-plugin==4.0.4
mkdocs-material==9.1.18
mkdocs-material==9.5.8
mkdocs-redirects==1.2.1
mkdocs-section-index==0.3.8
mkdocs-version-annotations==1.0.0
mkdocstrings==0.22.0
mkdocstrings-python==1.3.0
mkdocstrings==0.24.0
mkdocstrings-python==1.8.0