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

Agnostic IPynb, supersede 1774 #1834

Merged
merged 29 commits into from Jun 20, 2015
Merged

Agnostic IPynb, supersede 1774 #1834

merged 29 commits into from Jun 20, 2015

Conversation

@damianavila
Copy link
Member

@damianavila damianavila commented Jun 18, 2015

Now in the nikola repo to allow easy collaboration...

@damianavila
Copy link
Member Author

@damianavila damianavila commented Jun 18, 2015

To know previous discussions, see #1774
ping @Kwpolska who was reviewing the other PR...

content_subformat = None

if "@" in content_format:
content_format, content_subformat = tuple(content_format.split("@"))
Copy link
Member

@Kwpolska Kwpolska Jun 18, 2015

tuple() is unnecessary and weird

Copy link
Member Author

@damianavila damianavila Jun 18, 2015

you are right... will change

Kwpolska added 8 commits Jun 20, 2015
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Jun 20, 2015

I just cleaned up a lot of things and made python(2|3) the default kernel.

Still needs to be done:

  • support importing posts (should not be hard)
  • replace IPYNB_KERNELS with something that gets data out of the local system.

cc @damianavila

Kwpolska added 3 commits Jun 20, 2015
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
* just read in the file as a notebook and resave
* cleaner than before by testing for "{" instead of "Write your"

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Kwpolska added 4 commits Jun 20, 2015
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
We could probably go even further.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
language_info is not needed and will be filled in by the
notebook webapp.

cc @damianavila

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Jun 20, 2015

@damianavila I introduced a lot of changes here today. Please test and review.

@damianavila
Copy link
Member Author

@damianavila damianavila commented Jun 20, 2015

@Kwpolska thanks for working on this... I was just starting to do it by myself and I thought, I have to check if Chris did not do it before proceed... I will review it in a little bit!

@damianavila
Copy link
Member Author

@damianavila damianavila commented Jun 20, 2015

@Kwpolska, I just push some minor fixes... still there seems to be an error in the TravisCI run:

=================================== FAILURES ===================================
______________________ InvariantBuildTest.test_invariance ______________________
self = <tests.test_integration.InvariantBuildTest testMethod=test_invariance>
    def test_invariance(self):
        """Compare the output to the canonical output."""
        if sys.version_info[0:2] != (2, 7):
            pytest.skip('only python 2.7 is supported right now')
        good_path = os.path.join(os.path.dirname(__file__), 'data', 'baseline{0[0]}.{0[1]}'.format(sys.version_info))
        if not os.path.exists(good_path):
            pytest.skip('no baseline found')
        with cd(self.target_dir):
            try:
                diff = subprocess.check_output(['diff', '-ubwr', good_path, 'output'])
                self.assertEqual(diff.strip(), '')
            except subprocess.CalledProcessError as exc:
                print('Unexplained diff for the invariance test. (-canonical +built)')
                print(exc.output.decode('utf-8'))
>               self.assertEqual(exc.returncode, 0, 'Unexplained diff for the invariance test.')
E               AssertionError: Unexplained diff for the invariance test.
/home/travis/build/getnikola/nikola/tests/test_integration.py:545: AssertionError
----------------------------- Captured stdout call -----------------------------
Unexplained diff for the invariance test. (-canonical +built)
diff -ubwr /home/travis/build/getnikola/nikola/tests/data/baseline2.7/assets/css/nikola_ipython.css output/assets/css/nikola_ipython.css
--- /home/travis/build/getnikola/nikola/tests/data/baseline2.7/assets/css/nikola_ipython.css    2015-06-20 08:34:47.000000000 +0000
+++ output/assets/css/nikola_ipython.css    2015-06-20 13:41:26.194658000 +0000
@@ -52,10 +52,6 @@
   margin: 0 0 0px;
 }

-h1, h2, h3, .metadata p {
-margin-left: 15px;
-}
-
 .highlight .hll { background-color: #ffffcc }
 .highlight  { background: #f8f8f8; }
 .highlight .c { color: #408080; font-style: italic } /* Comment */

Ideas about the diff?

Otherwise, I tested the PR and everything works as expected, AFAIK...

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Jun 20, 2015

This is expected, I removed that in f571726 and thus made the site output different. Just ignore it, it will disappear as soon as I merge and rebuild the invariant master.

Merging!

Kwpolska added a commit that referenced this issue Jun 20, 2015
Agnostic IPynb, supersede 1774
@Kwpolska Kwpolska merged commit 7f5e201 into master Jun 20, 2015
1 of 3 checks passed
@Kwpolska Kwpolska deleted the update_ipynb branch Jun 20, 2015
@damianavila
Copy link
Member Author

@damianavila damianavila commented Jun 20, 2015

Thanks for your help!! Nice to this merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants