Skip to content

Commit dc30b3f

Browse files
authored
Merge pull request #254 from emnify/development
rc
2 parents adae6fb + 63c43fc commit dc30b3f

19 files changed

Lines changed: 1754 additions & 209 deletions

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ updates:
1010
include: "scope"
1111
schedule:
1212
interval: "daily"
13+
groups:
14+
python:
15+
patterns:
16+
- "*"
1317
- package-ecosystem: "github-actions"
1418
directory: "/"
1519
commit-message:
1620
prefix: 'ci'
1721
include: "scope"
1822
schedule:
1923
interval: "daily"
24+
groups:
25+
github-actions:
26+
patterns:
27+
- "*"
2028
ignore:
2129
- dependency-name: "zricethezav/gitleaks-action"

.github/workflows/unit-tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ jobs:
2121
- uses: actions/checkout@v4
2222

2323
- name: Install dependencies
24-
run: pip install -r req.txt
24+
run: |
25+
pip install pipenv
26+
pipenv install --deploy --ignore-pipfile --dev
2527
2628
- name: Run tests
27-
run: pytest --cov=. --cov-report=xml
29+
run: pipenv run pytest --cov=. --cov-report=xml
2830

2931
- name: Export SonarCloud Result
3032
# Skip dependabot runs because they don't have access to secrets

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,6 @@ ipython_config.py
8383
# intended to run in multiple environments; otherwise, check them in:
8484
# .python-version
8585

86-
# pipenv
87-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
88-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
89-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
90-
# install all needed dependencies.
91-
Pipfile.lock
92-
9386

9487
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
9588
__pypackages__/

Dockerfile.dev

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
FROM python:latest
22

3+
RUN pip install pipenv
4+
35
WORKDIR /sdk
46

5-
COPY req.txt req.txt
6-
COPY req.dev.txt req.dev.txt
7+
COPY Pipfile Pipfile.lock ./
78

8-
RUN pip install -r req.txt
9-
RUN pip install -r req.dev.txt
9+
RUN pipenv install --deploy --ignore-pipfile --dev
1010

1111
COPY . .
1212

13-
CMD echo "Enter Command(Read DEVELOPMENT.md)"
13+
ENTRYPOINT ["pipenv", "run"]
14+
15+
CMD ["echo", "\"Enter Command(Read DEVELOPMENT.md)\""]

Pipfile

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,14 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
certifi = "==2023.7.22"
8-
charset-normalizer = "==3.1.0"
9-
distlib = "==0.3.6"
10-
filelock = "==3.12.2"
11-
idna = "==3.4"
12-
importlib-metadata = "==6.7.0"
13-
pipenv = "==2023.7.23"
14-
platformdirs = "==3.5.1"
15-
pydantic = "==1.10.9"
16-
requests = "==2.31.0"
17-
six = "==1.16.0"
18-
typing-extensions = "==4.7.1"
19-
urllib3 = "==2.0.4"
20-
virtualenv = "==20.24.1"
21-
virtualenv-clone = "==0.5.7"
22-
zipp = "==3.15.0"
7+
requests = ">=2.27.0,<2.30.0"
8+
pydantic = ">=1.9.0,<2.0"
239

2410
[dev-packages]
25-
26-
[requires]
27-
python_version = "3.12"
11+
vcrpy = "*"
12+
build = "*"
13+
twine = "*"
14+
bump2version = "*"
15+
pytest-cov = "*"
16+
exceptiongroup = "*"
17+
tomli = "*"

Pipfile.lock

Lines changed: 1104 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,21 @@ Automate your routines with this SDK for Python.
1515

1616
- Python ([version 3.6.0](https://www.python.org/downloads/release/python-360/) or higher)
1717

18-
### Install from source
18+
### Install from source (requires build)
1919

2020
```shell
2121
git clone https://github.com/emnify/emnify-sdk-python.git
2222
cd emnify-sdk-python
23-
python setup.py install
23+
python -m build --sdist --wheel
24+
```
25+
26+
For local development install with pipenv:
27+
```shell
28+
git clone https://github.com/emnify/emnify-sdk-python.git
29+
cd emnify-sdk-python
30+
brew install pipenv # for macOS
31+
python -m pip install pipenv # for other OS
32+
pipenv sync
2433
```
2534

2635
### Install with pip

docs/Dockerfile.dev

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ FROM python:alpine
22

33
WORKDIR /docs
44

5-
COPY docs/req.txt req.txt
5+
RUN pip install pipenv
66

7-
RUN pip install -r req.txt
7+
COPY docs/Pipfile docs/Pipfile.lock ./
8+
9+
RUN pipenv install --deploy --ignore-pipfile
810

911
COPY . .
1012

11-
CMD sh ./docs/build.sh
13+
CMD ["sh", "./docs/build.sh"]

docs/Pipfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
jinja2 = "*"
8+
sphinx = "*"
9+
sphinx-autoapi = "*"
10+
furo = "*"

docs/Pipfile.lock

Lines changed: 459 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)