From b44707c5e0f0df4536f0cf76adb41c3c08c2a78f Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 11:22:46 +0100 Subject: [PATCH 01/15] Removed non needed file --- git | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 git diff --git a/git b/git deleted file mode 100644 index e69de29b..00000000 From b44f6250bbb3ce4f7da900d606c7b9254cff9f22 Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 11:22:57 +0100 Subject: [PATCH 02/15] Cleaned up sorting gitignore (folders first) --- .gitignore | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8f3f9365..a854a047 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,14 @@ +# static/ +# media/ +__pycache__/ +.venv/ +.vscode/ .env env.py -.vscode *.py[cod] -__pycache__/ *.sqlite3 -# static/ -# media/ settings.json .gitpod.yml -.venv/ -setup.bat +setup.* Pipfile Pipfile.lock \ No newline at end of file From 73226a47cc26c54f166b3762f76e9ce1d8eec652 Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 11:25:16 +0100 Subject: [PATCH 03/15] Moved and rename to make github use it --- pull_request_template.md => .github/PULL_REQUEST_TEMPLATE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pull_request_template.md => .github/PULL_REQUEST_TEMPLATE.md (100%) diff --git a/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE.md From 2063b5d52fb66dae63af3c270d15197f891ba1be Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 11:25:21 +0100 Subject: [PATCH 04/15] Added issue templates --- .github/ISSUE_TEMPLATE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..e69de29b From 135ed173c134dab0c262a093a46b537772ecae73 Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 11:33:20 +0100 Subject: [PATCH 05/15] Added suggestion for pull request templates --- .github/PULL_REQUEST_TEMPLATE.md | 42 +++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 63010b68..9f3da4f3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,23 +1,41 @@ -**Description:** +## Description -Describe in a couple of sentences what this PR adds + -**Related Issue:** +## Pull request type -Link to the related Issue +Please check the type of change your PR introduces: -**Configuration instructions:** +- [ ] Bugfix +- [ ] Feature +- [ ] Code style update (formatting, renaming) +- [ ] Refactoring +- [ ] Build related changes +- [ ] Documentation content changes +- [ ] Other (please describe): -List any non-trivial configuration instructions (if any) +## Related Issue -**Testing:** + -Explain what kind of testing was performed and list any testing instructions (if needed) +## Configuration instructions -**Screenshots:** + -Add any screenshots (if needed) +## Testing -**Additional Information:** + -Any other information that is needed +## Screenshots + + + +## Additional Information + + + +## Does this introduce a breaking change + +- [ ] Yes +- [] No + From 5760bcb7a538a9c9da9e76fc1489a5bed5a0c108 Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 11:40:01 +0100 Subject: [PATCH 06/15] Updated PR Template with types --- .github/PULL_REQUEST_TEMPLATE.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9f3da4f3..ecfc951f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,9 +3,11 @@ ## Pull request type - -Please check the type of change your PR introduces: - + +- [ ] #M01 (Miscellaneous User Story #01) +- [ ] #P02 (Participant User Story #02) +- [ ] #S03 (Staff User Story #03) +- [ ] #A04 (Admin User Story #04) - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting, renaming) From 92a23428a57b8424b5bbc3b27c99318ad714ed63 Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 15:27:53 +0100 Subject: [PATCH 07/15] Added issue template --- .github/ISSUE_TEMPLATE.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index e69de29b..c05bc538 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,39 @@ + + +## Expected Behavior + + + + +## Current Behavior + + + + +## Possible Solution + + + + +## Steps to Reproduce (for bugs) + + + + +1. +2. +3. +4. + +## Context + + + + +## Your Environment (for bugs) + + + +- Version used: +- Environment name and version (e.g. Chrome 39, node.js 5.4): +- Operating System and version (desktop or mobile): \ No newline at end of file From 9d167ff4214e767620f808f2ce9f1eca7271e7ad Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 17:30:21 +0100 Subject: [PATCH 08/15] Added vscode sample file for linting --- settings_sample.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 settings_sample.json diff --git a/settings_sample.json b/settings_sample.json new file mode 100644 index 00000000..647816ae --- /dev/null +++ b/settings_sample.json @@ -0,0 +1,8 @@ +{ + "python.pythonPath": ".venv/bin/python", + "python.terminal.activateEnvironment": true, + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.linting.pylintArgs": ["--load-plugins=pylint_django"], + "files.autoSave": "onFocusChange" +} From 3ac8348b8597a72d4c724619ac0e923b00db9f0a Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 17:31:25 +0100 Subject: [PATCH 09/15] Pipfile should be enabled if not using requirements --- .gitignore | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index a854a047..82ce8452 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,4 @@ env.py *.sqlite3 settings.json .gitpod.yml -setup.* -Pipfile -Pipfile.lock \ No newline at end of file +setup.* \ No newline at end of file From 4c29c3dee9fcde30e165e138f3fa74eee676c168 Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 17:38:01 +0100 Subject: [PATCH 10/15] Fixed where pipenv would use wrong version of python --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 6b8fa675..3fa7098b 100755 --- a/setup.sh +++ b/setup.sh @@ -6,7 +6,7 @@ cp .env_sample .env && sed -i '' -e 's/localhost/*/g' .env sed -i '' -e "s/your_secret_key_here/$randompass/g" .env echo "Setting up pipenv" pip3 install pipenv -pipenv install -r requirements.txt +pipenv install --three -r requirements.txt clear echo "============================" echo "Please make sure you installed python extension if using vscode" From a9f0b893bfc1e19b055f0e2a7177ecee92ef495a Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 17:39:34 +0100 Subject: [PATCH 11/15] Added pipfile updated with linting --- Pipfile | 31 ++++++ Pipfile.lock | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 298 insertions(+) create mode 100644 Pipfile create mode 100644 Pipfile.lock diff --git a/Pipfile b/Pipfile new file mode 100644 index 00000000..55f353c7 --- /dev/null +++ b/Pipfile @@ -0,0 +1,31 @@ +[[source]] +name = "pypi" +url = "https://pypi.org/simple" +verify_ssl = true + +[dev-packages] +pylint = "*" +pylint-django = "*" +pep8 = "*" +autopep8 = "*" + +[packages] +asgiref = "==3.2.10" +certifi = "==2020.6.20" +chardet = "==3.0.4" +defusedxml = "==0.6.0" +django-allauth = "==0.42.0" +django-crispy-forms = "==1.9.2" +idna = "==2.10" +oauthlib = "==3.1.0" +python-dotenv = "==0.14.0" +python3-openid = "==3.2.0" +pytz = "==2020.1" +requests = "==2.24.0" +requests-oauthlib = "==1.3.0" +sqlparse = "==0.3.1" +urllib3 = "==1.25.10" +Django = "==3.1.1" + +[requires] +python_version = "3.8" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 00000000..f3580b52 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,267 @@ +{ + "_meta": { + "hash": { + "sha256": "17d3e97b35c433d439123d980b7f720ee6c0df7c8f4f0bb6063f8c282e335991" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.8" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "asgiref": { + "hashes": [ + "sha256:7e51911ee147dd685c3c8b805c0ad0cb58d360987b56953878f8c06d2d1c6f1a", + "sha256:9fc6fb5d39b8af147ba40765234fa822b39818b12cc80b35ad9b0cef3a476aed" + ], + "index": "pypi", + "version": "==3.2.10" + }, + "certifi": { + "hashes": [ + "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3", + "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41" + ], + "index": "pypi", + "version": "==2020.6.20" + }, + "chardet": { + "hashes": [ + "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", + "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" + ], + "index": "pypi", + "version": "==3.0.4" + }, + "defusedxml": { + "hashes": [ + "sha256:6687150770438374ab581bb7a1b327a847dd9c5749e396102de3fad4e8a3ef93", + "sha256:f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5" + ], + "index": "pypi", + "version": "==0.6.0" + }, + "django": { + "hashes": [ + "sha256:59c8125ca873ed3bdae9c12b146fbbd6ed8d0f743e4cf5f5817af50c51f1fc2f", + "sha256:b5fbb818e751f660fa2d576d9f40c34a4c615c8b48dd383f5216e609f383371f" + ], + "index": "pypi", + "version": "==3.1.1" + }, + "django-allauth": { + "hashes": [ + "sha256:f17209410b7f87da0a84639fd79d3771b596a6d3fc1a8e48ce50dabc7f441d30" + ], + "index": "pypi", + "version": "==0.42.0" + }, + "django-crispy-forms": { + "hashes": [ + "sha256:888bb316db89b60050a42ec35080facb361d823eec38010ccb0702f45642d3b8", + "sha256:f2f1e0fbb458851636447cfb6be1a611b40c8ac9e41a74ba923011378670b43b" + ], + "index": "pypi", + "version": "==1.9.2" + }, + "idna": { + "hashes": [ + "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", + "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" + ], + "index": "pypi", + "version": "==2.10" + }, + "oauthlib": { + "hashes": [ + "sha256:bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889", + "sha256:df884cd6cbe20e32633f1db1072e9356f53638e4361bef4e8b03c9127c9328ea" + ], + "index": "pypi", + "version": "==3.1.0" + }, + "python-dotenv": { + "hashes": [ + "sha256:8c10c99a1b25d9a68058a1ad6f90381a62ba68230ca93966882a4dbc3bc9c33d", + "sha256:c10863aee750ad720f4f43436565e4c1698798d763b63234fb5021b6c616e423" + ], + "index": "pypi", + "version": "==0.14.0" + }, + "python3-openid": { + "hashes": [ + "sha256:33fbf6928f401e0b790151ed2b5290b02545e8775f982485205a066f874aaeaf", + "sha256:6626f771e0417486701e0b4daff762e7212e820ca5b29fcc0d05f6f8736dfa6b" + ], + "index": "pypi", + "version": "==3.2.0" + }, + "pytz": { + "hashes": [ + "sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed", + "sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048" + ], + "index": "pypi", + "version": "==2020.1" + }, + "requests": { + "hashes": [ + "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", + "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" + ], + "index": "pypi", + "version": "==2.24.0" + }, + "requests-oauthlib": { + "hashes": [ + "sha256:7f71572defaecd16372f9006f33c2ec8c077c3cfa6f5911a9a90202beb513f3d", + "sha256:b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a", + "sha256:fa6c47b933f01060936d87ae9327fead68768b69c6c9ea2109c48be30f2d4dbc" + ], + "index": "pypi", + "version": "==1.3.0" + }, + "sqlparse": { + "hashes": [ + "sha256:022fb9c87b524d1f7862b3037e541f68597a730a8843245c349fc93e1643dc4e", + "sha256:e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548" + ], + "index": "pypi", + "version": "==0.3.1" + }, + "urllib3": { + "hashes": [ + "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", + "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" + ], + "index": "pypi", + "version": "==1.25.10" + } + }, + "develop": { + "astroid": { + "hashes": [ + "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703", + "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386" + ], + "markers": "python_version >= '3.5'", + "version": "==2.4.2" + }, + "autopep8": { + "hashes": [ + "sha256:d21d3901cb0da6ebd1e83fc9b0dfbde8b46afc2ede4fe32fbda0c7c6118ca094" + ], + "index": "pypi", + "version": "==1.5.4" + }, + "isort": { + "hashes": [ + "sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7", + "sha256:dcaeec1b5f0eca77faea2a35ab790b4f3680ff75590bfcb7145986905aab2f58" + ], + "markers": "python_version >= '3.6' and python_version < '4.0'", + "version": "==5.6.4" + }, + "lazy-object-proxy": { + "hashes": [ + "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d", + "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449", + "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08", + "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a", + "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50", + "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd", + "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239", + "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb", + "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea", + "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e", + "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156", + "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142", + "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442", + "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62", + "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db", + "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531", + "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383", + "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a", + "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357", + "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4", + "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.4.3" + }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" + ], + "version": "==0.6.1" + }, + "pep8": { + "hashes": [ + "sha256:b22cfae5db09833bb9bd7c8463b53e1a9c9b39f12e304a8d0bba729c501827ee", + "sha256:fe249b52e20498e59e0b5c5256aa52ee99fc295b26ec9eaa85776ffdb9fe6374" + ], + "index": "pypi", + "version": "==1.7.1" + }, + "pycodestyle": { + "hashes": [ + "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", + "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.6.0" + }, + "pylint": { + "hashes": [ + "sha256:bb4a908c9dadbc3aac18860550e870f58e1a02c9f2c204fdf5693d73be061210", + "sha256:bfe68f020f8a0fece830a22dd4d5dddb4ecc6137db04face4c3420a46a52239f" + ], + "index": "pypi", + "version": "==2.6.0" + }, + "pylint-django": { + "hashes": [ + "sha256:770e0c55fb054c6378e1e8bb3fe22c7032a2c38ba1d1f454206ee9c6591822d7", + "sha256:b8dcb6006ae9fa911810aba3bec047b9410b7d528f89d5aca2506b03c9235a49" + ], + "index": "pypi", + "version": "==2.3.0" + }, + "pylint-plugin-utils": { + "hashes": [ + "sha256:2f30510e1c46edf268d3a195b2849bd98a1b9433229bb2ba63b8d776e1fc4d0a", + "sha256:57625dcca20140f43731311cd8fd879318bf45a8b0fd17020717a8781714a25a" + ], + "version": "==0.6" + }, + "six": { + "hashes": [ + "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", + "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.15.0" + }, + "toml": { + "hashes": [ + "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", + "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88" + ], + "version": "==0.10.1" + }, + "wrapt": { + "hashes": [ + "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" + ], + "version": "==1.12.1" + } + } +} From 84e62a589dd79d1db11ec87e549bdebe9dd6b35d Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 20:21:03 +0100 Subject: [PATCH 12/15] Added sample file --- settings_sample.json => vscode_settings_sample.json | 1 - 1 file changed, 1 deletion(-) rename settings_sample.json => vscode_settings_sample.json (84%) diff --git a/settings_sample.json b/vscode_settings_sample.json similarity index 84% rename from settings_sample.json rename to vscode_settings_sample.json index 647816ae..670225a1 100644 --- a/settings_sample.json +++ b/vscode_settings_sample.json @@ -1,5 +1,4 @@ { - "python.pythonPath": ".venv/bin/python", "python.terminal.activateEnvironment": true, "python.linting.enabled": true, "python.linting.pylintEnabled": true, From 9ca88b5584b97acb336ecefa4af0175bac7f541f Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 20:21:20 +0100 Subject: [PATCH 13/15] Auto installs python extension and optimization --- setup.sh | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index 3fa7098b..910b379f 100755 --- a/setup.sh +++ b/setup.sh @@ -1,16 +1,36 @@ #!/bin/bash echo "Gathering the force" +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +FILE="$DIR/Pipfile" randompass=`openssl rand -base64 16` mkdir .venv cp .env_sample .env && sed -i '' -e 's/localhost/*/g' .env sed -i '' -e "s/your_secret_key_here/$randompass/g" .env echo "Setting up pipenv" pip3 install pipenv + +if [ -e "$FILE " ] +then +echo "============================" +echo "Using Pipefile for installing" +echo "============================" +pipenv install +else +echo "============================" +echo "Using requirements.txt" +echo "============================" pipenv install --three -r requirements.txt -clear +fi echo "============================" -echo "Please make sure you installed python extension if using vscode" -echo "If restarted please select python interpreter selecting .venv" +echo "Setting up VSCode with Django Linting" echo "============================" - - +pipenv install --dev pylint pylint-django pep8 autopep8 +cp vscode_settings_sample.json .vscode/settings.json +echo "============================" +echo "Installing Python extension" +echo "============================" +code --install-extension ms-python.python +clear +echo "============================" +echo "Please restart VSCode if running" +echo "============================" \ No newline at end of file From b9ce0bbe34b71ea31ed93998856050b75397d462 Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 20:21:28 +0100 Subject: [PATCH 14/15] Installs python extension --- setup.bat | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/setup.bat b/setup.bat index 1f05d6aa..f5b70d17 100644 --- a/setup.bat +++ b/setup.bat @@ -5,17 +5,23 @@ ECHO CREATING .env file ECHO DEVELOPMENT=1 >> .env ECHO SECRET_KEY="your_secret_key_here" >> .env ECHO SITE_NAME="*" >> .env -ECHO Installing pipenv for development use +ECHO Installing Python extension pip install pipenv CLS @ECHO OFF ECHO Installing requirements.txt pipenv install -r requirements.txt - ECHO ============================ -ECHO Please edit .env file and add your secret key +ECHO Setting up VSCode with Django Linting +ECHO ============================ +pipenv install --dev pylint pylint-django pep8 autopep8 +COPY vscode_settings_sample.json .vscode/settings.json +ECHO ============================ +ECHO Installing Python extension ECHO ============================ -ECHO Please make sure you installed python extension if using vscode -ECHO If restarted please select python interpreter selecting .venv +code --install-extension ms-python.python +echo +ECHO ============================ +ECHO Please edit .env file and add your secret key +ECHO Please restart VSCode if running ECHO ============================ - From 8bf8c664d3f517b37695e159ca071d8699aa89dc Mon Sep 17 00:00:00 2001 From: Simen Daehlin Date: Mon, 19 Oct 2020 20:28:45 +0100 Subject: [PATCH 15/15] Added bit more info --- setup.bat | 1 + setup.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/setup.bat b/setup.bat index f5b70d17..66c795de 100644 --- a/setup.bat +++ b/setup.bat @@ -23,5 +23,6 @@ code --install-extension ms-python.python echo ECHO ============================ ECHO Please edit .env file and add your secret key +ECHO Please make sure you select python intepreter from .venv ECHO Please restart VSCode if running ECHO ============================ diff --git a/setup.sh b/setup.sh index 910b379f..b63ebc74 100755 --- a/setup.sh +++ b/setup.sh @@ -33,4 +33,5 @@ code --install-extension ms-python.python clear echo "============================" echo "Please restart VSCode if running" +echo "Please make sure you select python intepreter from .venv" echo "============================" \ No newline at end of file