Skip to content

Commit

Permalink
* Updated Makefile and development document to add everything for dev…
Browse files Browse the repository at this point in the history
…elopment install;

* Validated tests with 'libsass==0.13.4';
* Document watcher behavior about inspection, close #24;
* Bump to 1.2.1;
  • Loading branch information
sveetch committed Nov 15, 2017
1 parent 381b02c commit ad53d3e
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ __pycache__/
*.py[cod]
*$py.class

# virtualenv
/venv

# Distribution / packaging
.installed.cfg
eggs/
bin/
build/
dist/
*.egg-info

Expand All @@ -23,4 +23,4 @@ coverage.xml
.hypothesis/

# Various
boussole/dev_inspector.py
boussole/dev_inspector.py
24 changes: 20 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
PYTHON2_PATH=`which python2.7`
PYTHON=python3

PIP=venv/bin/python -m pip
FLAKE=venv/bin/flake8
PYTEST=venv/bin/py.test

.PHONY: help clean delpyc tests flake quality

Expand All @@ -17,13 +21,25 @@ delpyc:
find . -name "*\.pyc"|xargs rm -f

clean: delpyc
rm -Rf dist .tox boussole.egg-info .cache tests/__pycache__/
rm -Rf venv dist .tox boussole.egg-info .cache tests/__pycache__/

venv:
$(PYTHON) -m venv venv
# This is required for those ones using ubuntu<16.04
$(PIP) install --upgrade pip
$(PIP) install --upgrade setuptools

install: venv
$(PIP) install -e .

install-dev: install
$(PIP) install -r requirements/dev.txt

flake:
flake8 --show-source boussole
$(FLAKE) --show-source boussole

tests:
py.test -vv tests
$(PYTEST) -vv tests

quality: tests flake

Expand Down
2 changes: 1 addition & 1 deletion boussole/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Commandline interface to build Sass projects using libsass-python"""
__version__ = '1.2.0'
__version__ = '1.2.1'
7 changes: 7 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
Changelog
=========

Version 1.2.1 - 2017/11/15
--------------------------

* Updated Makefile and development document to add everything for development install;
* Validated tests with ``libsass==0.13.4``;
* Document watcher behavior about inspection, close #24;

Version 1.2.0 - 2017/01/21
--------------------------

Expand Down
18 changes: 8 additions & 10 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,17 @@ Every requirement is available in file ``requirements/dev.txt``.
Install for development
***********************

First ensure you have `pip`_ and `virtualenv`_ installed, then type this: ::
First ensure you have `pip`_ and ``python-venv`` package installed then type: ::

mkdir Boussole-dev
cd Boussole-dev
virtualenv .
git clone https://github.com/sveetch/boussole.git
bin/pip install -e boussole
bin/pip install -r boussole/requirements/dev.txt
source bin/activate
cd boussole
make install-dev

Boussole will be installed in editable mode from the last commit on master branch.

When it's done, you will be able to check for boussole version, just type: ::

boussole version
venv/bin/boussole version

Unittests
---------
Expand All @@ -65,8 +61,10 @@ Then go in the ``boussole`` module directory, where ``the setup.py`` and ``tox.i
Documentation
-------------

You should see about `sphinx-autobuild`_ for a watcher which automatically rebuild HTML documentation when you change sources.
`sphinx-autobuild`_ is installed for a watcher which automatically rebuild HTML documentation when you change sources.

When installed you can use following command from ``docs/`` directory: ::
When environnement is activated, you can use following command from ``docs/`` directory: ::

make livehtml

And go on ``http://127.0.0.1:8002/``.
7 changes: 7 additions & 0 deletions docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,10 @@ When an event occurs, it will compile eligible sources from the file dependencie
.. Note::
Default behavior is to use the Watchdog native platform observer. It may not work for all environments (like on shared directories through network or Virtual machine), in this case use the ``--poll`` to use the Watchdog polling observer instead of the default one.

Boussole has its own internal code to inspect Sass sources to be aware of sources paths it has to watch for.

It results inspection does not have exactly the same path resolution process than libsass.

It can lead to troubleshooting situations where ``compile`` command can build some sources that can fails with ``watch`` command because the latter need to inspect sources to be able to find dependencies and choke on unclear path resolution.

These unclear paths are almost allways due to some Sass libraries trying to import components using a relative path outside of itself like with ``../``. This is often the case with libraries that have been made to be included in your main scss directory.
4 changes: 3 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
-r tests.txt
sphinx==1.3.6
sphinx
sphinx-rtd-theme
sphinx-autobuild

0 comments on commit ad53d3e

Please sign in to comment.