Skip to content

Commit 3b59926

Browse files
committed
Merge branch 'release/v1.0.10'
2 parents fc09fed + d89bfa6 commit 3b59926

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
Changelog
22
=========
33

4+
v1.0.10 (2022-10-18)
5+
-------------------
6+
7+
* Added support for adding a coupon code when deploying a new instance
8+
49
v1.0.9 (2022-09-16)
510
-------------------
611

CONTRIBUTING.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,23 @@ Code Contribution:
3636

3737
5. Make your local changes
3838

39-
6. Run tests::
39+
6. Install dependencies for test::
40+
41+
pip3 install -e .[test]
42+
43+
pip3 install -U pytest
44+
45+
7. Run tests::
4046

4147
pytest
4248

43-
7. Commit and push::
49+
8. Commit and push::
4450

4551
git commit .am "Detailed commit message"
4652

4753
git push origin {branch-name}
4854

49-
8. Submit a pull request in GitHub.
55+
9. Submit a pull request in GitHub.
5056

5157
Pull Request Guidelines
5258
------------------------

datacrunch/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '1.0.9'
1+
VERSION = '1.0.10'

datacrunch/instances/instances.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ def create(self,
350350
startup_script_id: str = None,
351351
volumes: List[Dict] = None,
352352
os_volume: Dict = None,
353-
is_spot: bool = False) -> Instance:
353+
is_spot: bool = False,
354+
coupon: str = None) -> Instance:
354355
"""Creates (deploys) a new instance
355356
356357
:param instance_type: instance type. e.g. '8V100.48M'
@@ -373,6 +374,8 @@ def create(self,
373374
:type os_volume: Dict, optional
374375
:param is_spot: Is spot instance
375376
:type is_spot: bool, optional
377+
:param coupon: coupon code
378+
:type is_spot: str, optional
376379
:return: the new instance object
377380
:rtype: id
378381
"""
@@ -386,7 +389,8 @@ def create(self,
386389
"location": location,
387390
"os_volume": os_volume,
388391
"volumes": volumes,
389-
"is_spot": is_spot
392+
"is_spot": is_spot,
393+
"coupon": coupon
390394
}
391395
id = self._http_client.post(INSTANCES_ENDPOINT, json=payload).text
392396
instance = self.get_by_id(id)

0 commit comments

Comments
 (0)