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

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

@damianavila
Copy link
Member Author

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

Choose a reason for hiding this comment

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

tuple() is unnecessary and weird

Copy link
Member Author

Choose a reason for hiding this comment

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

you are right... will change

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

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

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>
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

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

@damianavila
Copy link
Member Author

@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

@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

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 pull request Jun 20, 2015
Agnostic IPynb, supersede 1774
@Kwpolska Kwpolska merged commit 7f5e201 into master Jun 20, 2015
@Kwpolska Kwpolska deleted the update_ipynb branch June 20, 2015 17:05
@damianavila
Copy link
Member Author

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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants