Repository: mwouts/jupytext

Issue:
Jupytext's MyBinder link is broken
The MyBinder launch fails. Apparently it's trying to parse `jupytext.py` as a configuration file when converting the `get_started.md` notebook :smile: 
![Screenshot from 2020-07-06 22-06-19](https://user-images.githubusercontent.com/29915202/86636835-0cafab80-bfd5-11ea-99b6-dbd9e363ba5c.png)


Discussion:

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7d78bca..fc9fd1e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
 
 **Fixed**
 - Preserve indentation when commenting out magic commands (#437)
+- Fixed MyBinder - `jupytext.py` is not a configuration file (#559, #567)
 
 
 1.5.1 (2020-07-05)
diff --git a/jupytext/config.py b/jupytext/config.py
index 9f67477..4ecd69f 100644
--- a/jupytext/config.py
+++ b/jupytext/config.py
@@ -17,10 +17,11 @@ JUPYTEXT_CONFIG_FILES = [
     "jupytext.yml",
     "jupytext.yaml",
     "jupytext.json",
-    "jupytext.py",
 ]
 
-JUPYTEXT_CONFIG_FILES.extend(["." + filename for filename in JUPYTEXT_CONFIG_FILES])
+JUPYTEXT_CONFIG_FILES.extend(
+    ["." + filename for filename in JUPYTEXT_CONFIG_FILES] + [".jupytext.py"]
+)
 JUPYTEXT_CEILING_DIRECTORIES = [
     path
     for path in os.environ.get("JUPYTEXT_CEILING_DIRECTORIES", "").split(":")


Test patch:
diff --git a/tests/test_config.py b/tests/test_config.py
index f34c255..ff3f564 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -33,6 +33,18 @@ def test_find_jupytext_configuration_file(tmpdir):
     )
 
 
+def test_jupytext_py_is_not_a_configuration_file(tmpdir):
+    jupytext_py = tmpdir.join("jupytext.py")
+    jupytext_py.write("# Not a config file!")
+
+    assert find_jupytext_configuration_file(str(tmpdir)) is None
+
+    dot_jupytext_py = tmpdir.join(".jupytext.py")
+    dot_jupytext_py.write("# This is a config file!")
+
+    assert find_jupytext_configuration_file(str(tmpdir)) == str(dot_jupytext_py)
+
+
 @pytest.mark.parametrize(
     "config_file",
     ["jupytext", "jupytext.toml", "jupytext.yml", "jupytext.json", "jupytext.py"],