Skip to content

Commit 6421834

Browse files
DataScienceDeconstructedClayton DavisSaumil Davesaumil-d
authored
Requirements updates (#28)
* add deprecation module to requirements file. used new file to create new conda and non-conda venvs ran unit tests in new venvs to ensure they passed. * made several changes to setup instructions. tested the instructions for conda and nonconda venvs tests expected to pass with API key did * docs: python version requirement * docs: formatting, python version req, standard sample env name/path Co-authored-by: Clayton Davis <[email protected]> Co-authored-by: Saumil Dave <[email protected]> Co-authored-by: saumil-d <[email protected]>
1 parent 56283ca commit 6421834

File tree

3 files changed

+50
-22
lines changed

3 files changed

+50
-22
lines changed

CONTRIBUTING.adoc

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,31 @@ Clone the repository:
8787

8888
- `$ git clone https://github.com/modzy/sdk-python.git`
8989

90-
Install dependencies:
90+
Setup a virtual environment from the local git directory (NOTE: Requires Python >= 3.8):
91+
92+
- `$ conda create --name VIRTUAL_ENVIRON_NAME --file requirements_dev.txt -c conda-forge python=3.9`
93+
or for non-conda python distros:
94+
- `$ python3 -m venv /path/to/VIRTUAL_ENVIRON_NAME`
95+
96+
Activate the virtual environment:
97+
98+
- `$ conda activate VIRTUAL_ENVIRON_NAME`
99+
100+
or for non-conda python distros there are different commands for Linux vs. Windows.
101+
102+
On Linux use source to activate
103+
104+
- `$ source /path/to/VIRTUAL_ENVIRON_NAME/bin/activate`
105+
106+
On Windows run the activate.bat file
107+
108+
- `C:>\path\to\VIRTUAL_ENVIRON_NAME\Scripts\activate.bat`
109+
110+
111+
Install dependencies (if not using conda):
112+
113+
- `$ pip3 install -r requirements_dev.txt`
91114

92-
- `$ pip install ./sdk-python`
93115

94116
Create a branch for your awesome new feature:
95117

@@ -102,12 +124,15 @@ Fix that bug or build your feature.
102124

103125
=== 3. Run unit tests
104126

105-
Configure the environment variables to easily run all the tests with a single configuration point.
127+
Configure the environment variables to easily run all the tests with a single configuration point.
128+
Note that the environment variables must be set before opening the terminal or program that you will be running your tests from. Environmental variables do not update on the fly.
106129

107130
You can:
108131

109132
==== Set environment variables in bash
110-
133+
There are 2 environmental variables that the test scripts will need.
134+
MODZY_BASE_URL: This variable holds the network address of the modzy installation. Notice the '/api' appeanded to the end of the url. This is mandatory and will cause errors if not present.
135+
MODZY_API_KEY: This variable holds a full copy of a modzy API key. Modzy's role based access controls will cause some of the tests to fail if your key doesn't have all the roles assigned.
111136
===== Windows
112137

113138
[source,bash]
@@ -146,7 +171,7 @@ Or specify the test that you want to run:
146171

147172
Add supporting documentation for your code.
148173

149-
//what else would be useful for Raúl?
174+
//what else would be useful for maintainers?
150175

151176
=== 5. Send a pull request
152177

@@ -160,6 +185,9 @@ Push your branch to GitHub:
160185

161186
- `$ git push origin my-new-awesome-feature`
162187

188+
Initiate a Pull Request:
189+
190+
If your PR doesn't pass all tests due to role based access controls with your key, please provide log information so that we may test the PR under appropriate conditions.
163191

164192

165193

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
[![installation](https://github.com/modzy/sdk-python/raw/main/install.gif)](https://asciinema.org/a/0lHaPxvXTrPTp1Bb6bNea1ZCG)
2222

23-
Use the package manager [pip](https://pip.pypa.io/en/stable/) install the SDK:
23+
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install the SDK (NOTE: Requires Python >= 3.8):
2424

2525
- `$ pip install modzy-sdk`
2626

requirements_dev.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
certifi==2019.9.11
2-
chardet==3.0.4
3-
idna==2.8
4-
requests==2.22.0
5-
urllib3==1.26.5
1+
certifi==2021.5.30
2+
chardet==4.0.0
3+
idna==3.1
4+
requests==2.26.0
5+
urllib3==1.26.7
66

7-
pip==19.2
8-
bump2version==0.5.10
9-
wheel==0.32.1
10-
watchdog==0.9.0
11-
flake8==3.5.0
12-
tox==3.5.2
13-
coverage==4.5.1
14-
Sphinx==2.2.0
7+
pip>=20.0.0
8+
bump2version==1.0.1
9+
wheel==0.37.0
10+
watchdog==2.1.5
11+
flake8==3.9.2
12+
tox==3.24.4
13+
coverage==5.5
14+
Sphinx==4.2.0
1515

16-
pytest==4.6.5
17-
python-dotenv==0.13.0
18-
pytest-dotenv==0.13.0
16+
pytest==6.2.5
17+
python-dotenv==0.19.0
18+
pytest-dotenv==0.5.2
1919

2020
deprecation==2.1.0

0 commit comments

Comments
 (0)