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

Fix #2850 — rewrite nikola auto with asyncio and aiohttp #2882

Merged
merged 16 commits into from Aug 1, 2017
Merged

Conversation

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Jul 30, 2017

This is #2850, a more modern (and less hacky) version of nikola auto.

Work in progress. To do:

  • add a rebuild queue (currently, rebuilds may happen concurrently)
  • restore no-server option (do we need it?)
  • figure out what the liveCSS option means in LiveReload (it reloads CSS without reloading the entire page, let’s leave it enabled)
  • code style
  • test on Linux and Windows
  • test on Python 3.3 (dropped support), 3.4, 3.5, 3.6
  • stop depending on virtualenvs being active/nikola in $PATH

I don’t think we can merge it with nikola serve, because it requires extra dependencies.


Tested on:

  • Ubuntu 14.04, Python 3.4, using a remote server (it works!)
  • macOS, Python 3.5 (thanks @offby1)
  • macOS Sierra, Python 3.6
  • Arch Linux, Python 3.6
  • Windows 7, Python 3.6
  • Kubuntu 16.04, Python 3.5 (thanks @altendky)

If anyone wants to help with testing: clone and install with extra requirements; create a demo site (nikola init -qd n), run nikola auto -b in the site, verify everything works (index; /pages/ path; any subpage), try editing a post and see if it works.

@Kwpolska Kwpolska added this to the v8.0.0 milestone Jul 30, 2017
@Kwpolska Kwpolska self-assigned this Jul 30, 2017
@Kwpolska Kwpolska requested a review from ralsina Jul 30, 2017
Kwpolska added 3 commits Jul 30, 2017
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 Kwpolska force-pushed the auto-aiohttp branch from e9d644c to 6a3c68e Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
Kwpolska added 2 commits Jul 30, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
Kwpolska added 2 commits Jul 30, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska changed the title [WIP] Fix #2850 — rewrite nikola auto with asyncio and aiohttp Fix #2850 — rewrite nikola auto with asyncio and aiohttp Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
Kwpolska added 2 commits Jul 30, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
…fby1)

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Jul 30, 2017
@getnikola getnikola deleted a comment Jul 30, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Jul 31, 2017
@getnikola getnikola deleted a comment Jul 31, 2017
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska
Copy link
Member Author

@Kwpolska Kwpolska commented Jul 31, 2017

@ralsina, @felixfontein, this is finished — reviews welcome.

@getnikola getnikola deleted a comment Jul 31, 2017
@getnikola getnikola deleted a comment Jul 31, 2017
@felixfontein
Copy link
Contributor

@felixfontein felixfontein commented Jul 31, 2017

I don't use nikola auto so I cannot comment much on this, but I went through the change and it looks good to me.

Just a minor thing: in case you change conf.py (like changing the name of the posts folders), nikola auto will not start watching the new folders, right? I guess implementing that would require a lot of extra work (and the previous version didn't do that either) and is a very infrequent usecase, but I thought I'd still ask :)

@Kwpolska
Copy link
Member Author

@Kwpolska Kwpolska commented Jul 31, 2017

@felixfontein Yes, that’s a edge case that would be pretty hard to support.

Copy link
Member

@ralsina ralsina left a comment

Awesome work!

@Kwpolska Kwpolska merged commit 47d57ee into master Aug 1, 2017
5 checks passed
5 checks passed
codacy/pr Good work! A positive pull request.
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@Kwpolska Kwpolska deleted the auto-aiohttp branch Aug 1, 2017
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

3 participants