From 5f656cfebbfd83238c224b1c2cca0fbc0c613935 Mon Sep 17 00:00:00 2001 From: HardipinderS Date: Mon, 5 Oct 2020 16:49:37 +0530 Subject: [PATCH 1/3] Alter Contribution file and Makefile for Windows and autorun docs server --- CONTRIBUTING.md | 13 +++++++++++-- docs/Makefile | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 69952d2..020c4dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -166,13 +166,13 @@ like [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv), Next, get an up to date checkout of the `drf-user` repository: ```sh -$ git clone git@github.com:101loop/drf-user.git +$ git clone git@github.com:/drf-user.git ``` or if you want to use git via `https`: ```sh -$ git clone https://github.com/101loop/drf-user.git +$ git clone https://github.com//browser-history.git ``` Change into the newly created directory and **after activating your virtual @@ -185,6 +185,15 @@ use [pre-commit](https://pre-commit.com/) hooks: (env) $ make install ``` +For Windows User: +``` +# install chocolatey and run "choco install make" to use make functions +(env) $ cd drf-user +(env) $ pip install -r requirements-dev.txt +(env) $ pip install -e . +pre-commit install +``` + At this point, ```sh diff --git a/docs/Makefile b/docs/Makefile index db5b17d..d8b8151 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -24,7 +24,7 @@ html: @echo "Build finished. The HTML pages are in $(BUILDDIR)/html" livehtml: - sphinx-autobuild -p $(PORT) -b html $(SOURCEDIR) $(BUILDDIR)/html $(O) + sphinx-autobuild -b html $(SOURCEDIR) $(BUILDDIR)/html $(O) --open-browser linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck From 432bd4412c89519664d67f1fb194515005499558 Mon Sep 17 00:00:00 2001 From: HardipinderS Date: Mon, 5 Oct 2020 16:57:18 +0530 Subject: [PATCH 2/3] Alter added port option --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index d8b8151..9a58466 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -24,7 +24,7 @@ html: @echo "Build finished. The HTML pages are in $(BUILDDIR)/html" livehtml: - sphinx-autobuild -b html $(SOURCEDIR) $(BUILDDIR)/html $(O) --open-browser + sphinx-autobuild --port $(PORT) -b html $(SOURCEDIR) $(BUILDDIR)/html $(O) --open-browser linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck From 81de9c270d26215ffd0552670848eeea0105aa92 Mon Sep 17 00:00:00 2001 From: HardipinderS Date: Mon, 5 Oct 2020 19:50:54 +0530 Subject: [PATCH 3/3] Alter for Windows Users --- CONTRIBUTING.md | 82 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 73 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 020c4dd..7e8d11d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -163,8 +163,12 @@ like [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv), [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/), and [pyenv-virtualenvwrapper](https://github.com/pyenv/pyenv-virtualenvwrapper). +for git related issues refer to https://github.com/101Loop/APIManager-Flutter/blob/master/CONTRIBUTING.md + Next, get an up to date checkout of the `drf-user` repository: +### For Linux Users: + ```sh $ git clone git@github.com:/drf-user.git ``` @@ -185,15 +189,6 @@ use [pre-commit](https://pre-commit.com/) hooks: (env) $ make install ``` -For Windows User: -``` -# install chocolatey and run "choco install make" to use make functions -(env) $ cd drf-user -(env) $ pip install -r requirements-dev.txt -(env) $ pip install -e . -pre-commit install -``` - At this point, ```sh @@ -235,6 +230,75 @@ Commit your changes and push your branch to GitHub: Submit a pull request through the GitHub website. +### For setting up in windows system: + +You can either install "chocolatey" and run "choco install make" to use make functions +or +you can utilize the below commands + +``` +(env) $ cd drf-user +(env) $ pip install -r requirements-dev.txt +(env) $ pip install -e . +``` + +then do + +``` +pre-commit install +``` + +to test the app + +``` +(env) $ python -m pytest --disable-pytest-warnings --ds=tests.settings --cov=drf_user tests/ +(env) $ sphinx-autobuild --port 8888 -b html . _build/html --open-browser + +``` + +The built documentation can then be found in +[`localhost:8888`](http://localhost:8888). + +Create a branch for local development: + +``` +(env) $ git checkout -b +``` + +Now you can make your changes locally. +make sure the format is checked + +You can use +``` +make check +``` + +or +copy and run this block of commands +``` +rm -rf build/ +rm -rf dist/ +rm -rf *.egg-info +find . -name '*.pyc' -follow -print0 | xargs -0 rm -f +find . -name '*.pyo' -follow -print0 | xargs -0 rm -f +find . -name '__pycache__' -type d -follow -print0 | xargs -0 rm -rf +rm -rf .coverage coverage* +rm -rf tests/.coverage test/coverage* +rm -rf htmlcov/ +flake8 --exclude=*/migrations/* --max-line-length 88 drf_user +black --exclude .+/migrations/.+\.py drf_user +(env) $ python -m pytest --disable-pytest-warnings --ds=tests.settings --cov=drf_user tests/ +``` + +Commit your changes and push your branch to GitHub: + +``` +(env) $ git add . +(env) $ git commit -m "Your detailed description of your changes." +(env) $ git push origin name-of-your-bugfix-or-feature +``` + + ## Code of Conduct Please note that this project is released with a Contributor