internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: mozilla/kitsune

Issue:
Move static asset hosting to s3
The static files (JS, CSS, Images, etc.) are currently being served from the app servers. This can be an issue during deployment when some pods are serving new HTML while others don't yet have the new media files. This mismatch period can be several minutes since we deploy the 2 clusters separately.

See https://github.com/mozilla/bedrock/pull/5932


Discussion:

Resolving patch:
diff --git a/docker/bin/move_hashed_staticfiles.py b/docker/bin/move_hashed_staticfiles.py
new file mode 100755
--- /dev/null
+++ b/docker/bin/move_hashed_staticfiles.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+from __future__ import print_function, unicode_literals
+
+import json
+import os
+import sys
+from textwrap import dedent
+
+
+def get_hashed_filenames(static_path):
+    json_file = '{}/staticfiles.json'.format(static_path)
+    with open(json_file) as jsonf:
+        staticfiles = json.load(jsonf)
+
+    return staticfiles['paths'].values()
+
+
+def move_hashed_files(static_path, hashed_path):
+    filenames = get_hashed_filenames(static_path)
+    moved_count = 0
+    for filename in filenames:
+        # some filenames in the file are in the form
+        # fontawesome/fonts/fontawesome-webfont.f7c2b4b747b1.eot?v=4.3.0
+        # we can skip these as they're duplicated
+        if '?' in filename:
+            continue
+
+        src_fn = os.path.join(static_path, filename)
+        dst_fn = os.path.join(hashed_path, filename)
+        if not os.path.exists(os.path.dirname(dst_fn)):
+            os.makedirs(os.path.dirname(dst_fn))
+
+        os.rename(src_fn, dst_fn)
+        moved_count += 1
+
+    return moved_count
+
+
+def main(static_path, hashed_path):
+    moved = move_hashed_files(static_path, hashed_path)
+    print('Successfully moved {} files'.format(moved))
+
+
+if __name__ == '__main__':
+    try:
+        main(sys.argv[1], sys.argv[2])
+    except IndexError:
+        sys.exit(dedent("""\
+            ERROR: source and destination directory arguments required.
+
+            Usage: move_hashed_staticfiles.py <source_dir> <dest_dir>
+
+            Moves hashed static files from source_dir to dest_dir based on the
+            map of staticfiles in `source_dir/staticfiles.json`.
+        """))
diff --git a/kitsune/sumo/storage.py b/kitsune/sumo/storage.py
--- a/kitsune/sumo/storage.py
+++ b/kitsune/sumo/storage.py
@@ -1,7 +1,8 @@
-from pipeline.storage import PipelineCachedStorage
+from django.contrib.staticfiles.storage import ManifestStaticFilesStorage
+from pipeline.storage import PipelineMixin
 
 
-class SumoFilesStorage(PipelineCachedStorage):
+class SumoFilesStorage(PipelineMixin, ManifestStaticFilesStorage):
     def __init__(self, *args, **kwargs):
         kwargs['file_permissions_mode'] = 0o644
         kwargs['directory_permissions_mode'] = 0o755


Test patch:
Repository: mozilla/kitsune

Issue:
monkeypatch_render should only be used in testing
https://github.com/mozilla/kitsune/blob/69253e763ada10422d3c88e681bcb4af00e1eb4f/kitsune/sumo/monkeypatch.py#L105 will always evaluate to True, so monkeypatch_render is always called by patch_all, but: https://github.com/mozilla/kitsune/blob/69253e763ada10422d3c88e681bcb4af00e1eb4f/kitsune/sumo/monkeypatch.py#L143


Discussion:

Resolving patch:
diff --git a/kitsune/sumo/monkeypatch.py b/kitsune/sumo/monkeypatch.py
--- a/kitsune/sumo/monkeypatch.py
+++ b/kitsune/sumo/monkeypatch.py
@@ -1,3 +1,4 @@
+import sys
 from functools import wraps
 
 from django.forms import fields
@@ -8,6 +9,7 @@
 
 
 _has_been_patched = False
+TESTING = (len(sys.argv) > 1 and sys.argv[1] == 'test') or sys.argv[0].endswith('py.test')
 
 
 class DateWidget(fields.DateField.widget):
@@ -102,7 +104,7 @@ def _collect(self, objs, source_attr=None, **kwargs):
     session_csrf.monkeypatch()
 
     # In testing contexts, patch django.shortcuts.render
-    if 'TESTING' == 'TESTING':
+    if TESTING:
         monkeypatch_render()
 
     # Monkey patch ES


Test patch:
Repository: mozilla/kitsune

Issue:
Layout of "These fine people helped write this article" sections breaks in some cases
As per this comment: https://github.com/mozilla/kitsune/issues/3269#issuecomment-407125115
Product icons are squished
The new product icons are squished on multiple pages:

https://dev.sumo.moz.works/en-US/questions
https://dev.sumo.moz.works/en-US/questions/new


Discussion:

Resolving patch:
diff --git a/kitsune/products/views.py b/kitsune/products/views.py
--- a/kitsune/products/views.py
+++ b/kitsune/products/views.py
@@ -7,6 +7,7 @@
 from product_details import product_details
 
 from kitsune.products.models import Product, Topic
+from kitsune.sumo.utils import get_browser
 from kitsune.wiki.decorators import check_simple_wiki_locale
 from kitsune.wiki.facets import topics_for, documents_for
 
@@ -43,8 +44,11 @@ def product_landing(request, template, slug):
         else:
             latest_version = 0
 
-    # Don't show firefox download button at header at firefox product page
-    hide_fx_download = product.slug == 'firefox'
+    user_agent = request.META.get('HTTP_USER_AGENT', '')
+    browser = get_browser(user_agent)
+
+    # Only show firefox download button when product is firefox and browser is not Firefox
+    show_fx_download = (product.slug == 'firefox' and browser != 'Firefox')
 
     return render(request, template, {
         'product': product,
@@ -52,7 +56,7 @@ def product_landing(request, template, slug):
         'topics': topics_for(product=product, parent=None),
         'search_params': {'product': slug},
         'latest_version': latest_version,
-        'hide_fx_download': hide_fx_download
+        'show_fx_download': show_fx_download
     })
 
 
@@ -77,6 +81,12 @@ def document_listing(request, template, product_slug, topic_slug,
 
     documents, fallback_documents = documents_for(**doc_kw)
 
+    user_agent = request.META.get('HTTP_USER_AGENT', '')
+    browser = get_browser(user_agent)
+
+    # Only show firefox download button when product is firefox and browser is not Firefox
+    show_fx_download = (product.slug == 'firefox' and browser != 'Firefox')
+
     return render(request, template, {
         'product': product,
         'topic': topic,
@@ -85,5 +95,6 @@ def document_listing(request, template, product_slug, topic_slug,
         'subtopics': topics_for(product=product, parent=topic),
         'documents': documents,
         'fallback_documents': fallback_documents,
-        'search_params': {'product': product_slug}
+        'search_params': {'product': product_slug},
+        'show_fx_download': show_fx_download
     })
diff --git a/kitsune/wiki/views.py b/kitsune/wiki/views.py
--- a/kitsune/wiki/views.py
+++ b/kitsune/wiki/views.py
@@ -220,7 +220,7 @@ def document(request, document_slug, template=None, document=None):
 
     user_agent = request.META.get('HTTP_USER_AGENT', '')
     browser = get_browser(user_agent)
-    show_fx_download = (product.slug == 'thunderbird' and browser != 'Firefox')
+    show_fx_download = (product.slug == 'firefox' and browser != 'Firefox')
 
     data = {
         'document': doc,


Test patch:
Repository: mozilla/kitsune

Issue:
Revert to using square/alternate product icons where appropriate
The newly added square/alternate product icons are a better fit than the rectangle icons in many places across the new design.


Discussion:

Resolving patch:
diff --git a/kitsune/sumo/templatetags/jinja_helpers.py b/kitsune/sumo/templatetags/jinja_helpers.py
--- a/kitsune/sumo/templatetags/jinja_helpers.py
+++ b/kitsune/sumo/templatetags/jinja_helpers.py
@@ -499,14 +499,15 @@ def fe(format_string, *args, **kwargs):
 @library.global_function
 def image_for_product(product_slug):
     """
-    Return image for product slug
+    Return square/alternate image for product slug
     """
 
     try:
         obj = Product.objects.get(slug=product_slug)
     except Product.DoesNotExist:
-        return os.path.join(settings.STATIC_URL, 'products', 'img', 'product_placeholder.png')
-    return obj.image_url
+        return os.path.join(settings.STATIC_URL, 'products', 'img',
+                            'product_placeholder_alternate.png')
+    return obj.image_alternate_url
 
 
 @jinja2.contextfunction


Test patch:
Repository: mozilla/kitsune

Issue:
Make Amazon product changes in AAQ
[The bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1488581)

Go Live date is Oct 11

- [x] Create product
- [x] Create topics that match the topics in `questions.config` mark them visible and in aaq
- [x] Link `English` AAQ Locale 
- [ ] Push code

See #3178 as an example of doing this


Discussion:

Resolving patch:
diff --git a/kitsune/questions/config.py b/kitsune/questions/config.py
--- a/kitsune/questions/config.py
+++ b/kitsune/questions/config.py
@@ -233,22 +233,22 @@
         ])
     }),
 
-    ('firefox-fire-tv', {
-        'name': _lazy(u'Firefox Fire TV'),
-        'subtitle': _lazy(u'Firefox for Amazon Fire TV'),
+    ('firefox-amazon-devices', {
+        'name': _lazy(u'Firefox for Amazon Devices'),
+        'subtitle': _lazy(u'Browser for Amazon devices'),
         'extra_fields': [],
-        'tags': ['firefox-fire-tv'],
-        'product': 'firefox-fire-tv',
+        'tags': ['firefox-amazon'],
+        'product': 'firefox-amazon-devices',
         'categories': SortedDict([
-            ('get-started', {
-                'name': _lazy(u'Get started'),
-                'topic': 'get-started',
-                'tags': ['get-started']
-            }),
-            ('fix-problems', {
-                'name': _lazy(u'Fix problems'),
-                'topic': 'fix-problems',
-                'tags': ['fix-problems']
+            ('firefox-fire-tv', {
+                'name': _lazy(u'Firefox for Fire TV'),
+                'topic': 'firefox-fire-tv',
+                'tags': ['firefox-fire-tv']
+            }),
+            ('firefox-echo-show', {
+                'name': _lazy(u'Firefox for Echo Show'),
+                'topic': 'firefox-echo-show',
+                'tags': ['firefox-echo-show']
             }),
         ])
     }),


Test patch:
Repository: mozilla/kitsune

Issue:
Remove Firefox OS from AAQ
See #3383 


Discussion:

Resolving patch:
diff --git a/kitsune/questions/config.py b/kitsune/questions/config.py
--- a/kitsune/questions/config.py
+++ b/kitsune/questions/config.py
@@ -184,35 +184,6 @@
         ])
     }),
 
-    ('firefox-os', {
-        'name': _lazy(u'Firefox OS'),
-        'subtitle': _lazy(u'Mobile OS for smartphones'),
-        'extra_fields': ['device', 'os'],
-        'tags': [],
-        'product': 'firefox-os',
-        'categories': SortedDict([
-            # TODO: Just use the IA topics for this.
-            # See bug 979397
-            ('download-and-install', {
-                'name': _lazy(u'Download and install apps'),
-                'topic': 'marketplace',
-                'tags': ['marketplace'],
-            }),
-            ('customize', {
-                'name': _lazy(u'Customize controls, options, settings and '
-                              u'preferences'),
-                'topic': 'settings',
-                'tags': ['settings'],
-            }),
-            ('fix-problems', {
-                'name': _lazy(u'Fix slowness, crashing, error messages and '
-                              u'other problems'),
-                'topic': 'fix-problems',
-                'tags': ['fix-problems'],
-            }),
-        ])
-    }),
-
     ('focus', {
         'name': _lazy(u'Firefox Focus'),
         'subtitle': _lazy(u'Automatic privacy browser and content blocker'),
@@ -297,12 +268,12 @@
         ])
     }),
 
-    ('firefox-rocket', {
-        'name': _lazy(u'Firefox Rocket'),
+    ('firefox-lite', {
+        'name': _lazy(u'Firefox Lite'),
         'subtitle': _lazy(u'Mobile browser for Indonesia'),
         'extra_fields': [],
-        'tags': ['firefox-rocket'],
-        'product': 'firefox-rocket',
+        'tags': ['firefox-lite'],
+        'product': 'firefox-lite',
         'categories': SortedDict([
             ('get-started', {
                 'name': _lazy(u'Get started'),


Test patch:
Repository: mozilla/kitsune

Issue:
Auto-detect Firefox Lite on mobile AAQ start page
See https://github.com/mozilla-tw/Rocket/issues/3004 for all of the details.

Basically the mobile version of https://support.mozilla.org/questions/new does some auto-detection to highlight a best-guess of the product in use at the time. We should auto-select Firefox Lite when viewed from Lite.


Discussion:

Resolving patch:
diff --git a/kitsune/questions/views.py b/kitsune/questions/views.py
--- a/kitsune/questions/views.py
+++ b/kitsune/questions/views.py
@@ -519,14 +519,20 @@ def aaq(request, product_key=None, category_key=None, showform=False,
     if product_key is None:
         product_key = request.GET.get('product')
         if request.MOBILE and product_key is None:
+            ua = request.META.get('HTTP_USER_AGENT', '').lower()
+
             # Firefox OS is weird. The best way we can detect it is to
             # look for a mobile Firefox that is not Android.
-            ua = request.META.get('HTTP_USER_AGENT', '').lower()
             if 'firefox' in ua and 'android' not in ua:
                 product_key = 'firefox-os'
+            # 'Rocket' is currently in the UA and is expected to remain
+            # https://github.com/mozilla-tw/FirefoxLite/issues/3004#issuecomment-455245375
+            elif 'rocket' in ua:
+                product_key = 'firefox-lite'
             elif 'fxios' in ua:
                 product_key = 'ios'
             else:
+                # android
                 product_key = 'mobile'
 
     product_config = config.products.get(product_key)


Test patch:
Repository: mozilla/kitsune

Issue:
Implement banner below navigation
https://bugzilla.mozilla.org/show_bug.cgi?id=1535689


Discussion:

Resolving patch:
diff --git a/kitsune/bundles.py b/kitsune/bundles.py
--- a/kitsune/bundles.py
+++ b/kitsune/bundles.py
@@ -271,6 +271,12 @@
             'sumo/kb-ux-experiment/src.4a0feb03.css'
         ),
         'output_filename': 'build/kb-ux-experiment-min.css'
+    },
+    'fxa-banner-test': {
+        'source_filenames': (
+            'sumo/less/fxa-banner.less',
+        ),
+        'output_filename': 'build/fxa-banner-test.css'
     }
 }
 
@@ -666,5 +672,11 @@
             'sumo/kb-ux-experiment/submit-gform.js'
         ),
         'output_filename': 'build/kb-ux-experiment-min.js'
+    },
+    'fxa-banner-test': {
+        'source_filenames': (
+            'sumo/js/fxa-banner.js',
+        ),
+        'output_filename': 'build/fxa-banner-test.js'
     }
 }
diff --git a/kitsune/settings.py b/kitsune/settings.py
--- a/kitsune/settings.py
+++ b/kitsune/settings.py
@@ -1173,3 +1173,6 @@ def filter_exceptions(event, hint):
 BADGE_LIMIT_SUPPORT_FORUM = config('BADGE_LIMIT_SUPPORT_FORUM', default=30, cast=int)
 BADGE_MAX_RECENT = config('BADGE_MAX_RECENT', default=15, cast=int)
 BADGE_PAGE_SIZE = config('BADGE_PAGE_SIZE', default=50, cast=int)
+
+# fxa banner test
+FXA_BANNER_LANGUAGES = config('FXA_BANNER_LANGUAGES', default='en-US', cast=Csv())


Test patch:
Repository: mozilla/kitsune

Issue:
Remove Firefox Account promo banners on Support website
We'd like to remove the Firefox Account promo banners that have been running on support.mozilla.org. We will likely continue experimentation but committed to the SUMO community that we would be removing the experiment and reporting back on results before continuing with more treatments. 

Ideally, this work could be completed this week. (before April 12, 2019).



Discussion:
The banner has been disabled.

How likely are we to use this code again? It doesn't really cost us anything to keep the code in place, but if it's not going to be used again, we should remove it. Can we decide this in the next couple weeks or so?
I'd say we're pretty likely to re-use again within the next two weeks. 
Excellent. It shall remain in place then. 😄 
@LaurenNiolet SUMO is now using FxA for login/signups. Is it likely to use this banner again or shall we remove it?

Resolving patch:
diff --git a/kitsune/bundles.py b/kitsune/bundles.py
--- a/kitsune/bundles.py
+++ b/kitsune/bundles.py
@@ -264,12 +264,6 @@
             'sumo/less/badges.less',
         ),
         'output_filename': 'build/badges-min.css'
-    },
-    'fxa-banner-test': {
-        'source_filenames': (
-            'sumo/less/fxa-banner.less',
-        ),
-        'output_filename': 'build/fxa-banner-test.css'
     }
 }
 
@@ -659,11 +653,5 @@
             'sumo/js/gtm-snippet.js',
         ),
         'output_filename': 'build/gtm-snippet-min.js'
-    },
-    'fxa-banner-test': {
-        'source_filenames': (
-            'sumo/js/fxa-banner.js',
-        ),
-        'output_filename': 'build/fxa-banner-test.js'
     }
 }
diff --git a/kitsune/settings.py b/kitsune/settings.py
--- a/kitsune/settings.py
+++ b/kitsune/settings.py
@@ -1205,8 +1205,5 @@ def filter_exceptions(event, hint):
 BADGE_MAX_RECENT = config('BADGE_MAX_RECENT', default=15, cast=int)
 BADGE_PAGE_SIZE = config('BADGE_PAGE_SIZE', default=50, cast=int)
 
-# fxa banner test
-FXA_BANNER_LANGUAGES = config('FXA_BANNER_LANGUAGES', default='en-US', cast=Csv())
-
 # The canonical, production URL without a trailing slash
 CANONICAL_URL = 'https://support.mozilla.org'


Test patch:
Repository: mozilla/kitsune

Issue:
Importing ABC directly from collections has been deprecated and will be removed in Python 3.10
Use `collections` for Python 2 and `collections.abc` for Python 3.4+

https://github.com/mozilla/kitsune/blob/db42cf7841b75ff0d4b6d3b21ac2524636110429/kitsune/wiki/widgets.py#L34


Discussion:
I'll take a look at this, and create a PR :)


Resolving patch:
diff --git a/kitsune/wiki/widgets.py b/kitsune/wiki/widgets.py
--- a/kitsune/wiki/widgets.py
+++ b/kitsune/wiki/widgets.py
@@ -1,4 +1,3 @@
-import collections
 
 from django import forms
 from django.template.loader import render_to_string
@@ -6,6 +5,11 @@
 from kitsune.products.models import Topic
 from kitsune.wiki.models import Document
 
+try:
+    from collections.abc import Iterable
+except ImportError:
+    from collections import Iterable
+
 
 class ProductTopicsAndSubtopicsWidget(forms.widgets.SelectMultiple):
     """A widget to render topics organized by product and with subtopics."""
@@ -35,7 +39,7 @@ def process_topic(self, value, topic):
             topic.checked = True
         elif (
             not isinstance(value, str)
-            and isinstance(value, collections.Iterable)
+            and isinstance(value, Iterable)
             and topic.id in value
         ):
             topic.checked = True
@@ -49,7 +53,7 @@ class RelatedDocumentsWidget(forms.widgets.SelectMultiple):
     def render(self, name, value, attrs=None, renderer=None):
         if isinstance(value, int):
             related_documents = Document.objects.filter(id__in=[value])
-        elif not isinstance(value, str) and isinstance(value, collections.Iterable):
+        elif not isinstance(value, str) and isinstance(value, Iterable):
             related_documents = Document.objects.filter(id__in=value)
         else:
             related_documents = Document.objects.none()


Test patch:
Repository: sagemath/sage

Issue:
compute matrix kernels modulo composites
<div id="comment:0"></div>

Currently, Sage cannot compute kernels of matrices over `Zmod(n)` for composite `n`.

This patch adds a call path from `Matrix.right_kernel_matrix()` to PARI's `matkermod()` function for matrices defined over `IntegerModRing`s with composite modulus.

Also, for symmetry we add a `.left_kernel_matrix()` method that simply calls `.transpose()` and defers to `.right_kernel_matrix()`.

Component: **linear algebra**

Author: **Lorenz Panny**

_Issue created by migration from https://trac.sagemath.org/ticket/34862_




Discussion:

Resolving patch:
diff --git a/src/sage/geometry/polyhedron/ppl_lattice_polytope.py b/src/sage/geometry/polyhedron/ppl_lattice_polytope.py
--- a/src/sage/geometry/polyhedron/ppl_lattice_polytope.py
+++ b/src/sage/geometry/polyhedron/ppl_lattice_polytope.py
@@ -855,8 +855,8 @@ def base_projection_matrix(self, fiber):
             sage: poly = LatticePolytope_PPL((-9,-6,-1,-1),(0,0,0,1),(0,0,1,0),(0,1,0,0),(1,0,0,0))
             sage: fiber = next(poly.fibration_generator(2))
             sage: poly.base_projection_matrix(fiber)
-            [0 0 1 0]
-            [0 0 0 1]
+            [ 0  0 -1  0]
+            [ 0  0  0 -1]
 
         Note that the basis choice in :meth:`base_projection` for the
         quotient is usually different::
@@ -866,7 +866,7 @@ def base_projection_matrix(self, fiber):
             sage: [ proj(p) for p in poly.integral_points() ]
             [(-1, -1), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 1), (1, 0)]
             sage: [ proj_matrix*p for p in poly.integral_points() ]
-            [(-1, -1), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 1), (1, 0)]
+            [(1, 1), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, 0), (0, -1), (-1, 0)]
         """
         return matrix(ZZ, fiber.vertices()).right_kernel_matrix()
 


Test patch:
Repository: sagemath/sage

Issue:
strongly regular tournaments
<div id="comment:0"></div>

This is a followup to #24045:

This is generalisation of Paley digraphs from #24045, due to A.Duval, [​J.Comb.Th. 47(1988) pp. 71-100](http://www.sciencedirect.com/science/article/pii/009731658890043X), nowadays called strongly regular digraph/tournament. We can use code in comment 14 of #24045, and Paley would be a subcase (in fact, this code will give you Paley if 4n-1 happens to be a prime power).

Component: **graph theory**

Author: **Matteo Cati**

_Issue created by migration from https://trac.sagemath.org/ticket/24682_




Discussion:

Resolving patch:
diff --git a/src/sage/graphs/digraph_generators.py b/src/sage/graphs/digraph_generators.py
--- a/src/sage/graphs/digraph_generators.py
+++ b/src/sage/graphs/digraph_generators.py
@@ -349,6 +349,53 @@ def Path(self, n):
         g.set_pos({i: (i, 0) for i in range(n)})
         return g
 
+    def StronglyRegular(self, n):
+        r"""
+        Return a Strongly Regular digraph with `n` vertices.
+
+        The adjacency matrix of the graph is constructed from a skew Hadamard
+        matrix of order `n+1`. These graphs were first constructed in [Duv1988]_.
+
+        INPUT:
+
+        - ``n`` -- integer, the number of vertices of the digraph.
+
+        .. SEEALSO::
+
+            - :func:`sage.combinat.matrices.hadamard_matrix.skew_hadamard_matrix`
+            - :meth:`Paley`
+
+        EXAMPLES:
+
+        A Strongly Regular digraph satisfies the condition `AJ = JA = kJ` where
+        `A` is the adjacency matrix::
+
+            sage: g = digraphs.StronglyRegular(7); g
+            Strongly regular digraph: Digraph on 7 vertices
+            sage: A = g.adjacency_matrix()*ones_matrix(7); B = ones_matrix(7)*g.adjacency_matrix()
+            sage: A == B == A[0, 0]*ones_matrix(7)
+            True
+
+        TESTS:
+
+        Wrong parameter::
+
+            sage: digraphs.StronglyRegular(73)
+            Traceback (most recent call last):
+            ...
+            ValueError: strongly regular digraph with 73 vertices not yet implemented
+
+        """
+        from sage.combinat.matrices.hadamard_matrix import skew_hadamard_matrix
+        from sage.matrix.constructor import ones_matrix, identity_matrix
+        if skew_hadamard_matrix(n + 1, existence=True) is not True:
+            raise ValueError(f'strongly regular digraph with {n} vertices not yet implemented')
+
+        H = skew_hadamard_matrix(n + 1, skew_normalize=True)
+        M = H[1:, 1:]
+        M = (M + ones_matrix(n)) / 2 - identity_matrix(n)
+        return DiGraph(M, format='adjacency_matrix', name='Strongly regular digraph')
+
     def Paley(self, q):
         r"""
         Return a Paley digraph on `q` vertices.


Test patch: