Skip to content

Commit

Permalink
Updated Python dependencies (hitachienergy#2756)
Browse files Browse the repository at this point in the history
- Updated Python dependencies.
- Minor document addition.
- Added pytest_mock development dependency.
- Updated documentation for Python package management
  • Loading branch information
seriva authored Nov 24, 2021
1 parent 256209b commit 8b3766b
Show file tree
Hide file tree
Showing 8 changed files with 334 additions and 278 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ RUN : INSTALL PIP REQUIREMENTS \
&& pip install --disable-pip-version-check --no-cache-dir --default-timeout=100 \
--requirement /requirements.txt \
&& pip install --disable-pip-version-check --no-cache-dir --default-timeout=100 \
poetry pylint pylint_junit ansible-lint ansible-lint-to-junit-xml yamllint pytest setuptools twine wheel
poetry pylint pylint_junit ansible-lint ansible-lint-to-junit-xml yamllint pytest pytest_mock setuptools twine wheel

RUN : SETUP USER AND OTHERS \
&& groupadd --gid $USER_GID $USERNAME \
Expand Down
11 changes: 9 additions & 2 deletions .devcontainer/gen-dependency-info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ def get_pkg_data(pkgname: str, pat:str) -> str:
logging.warning('Failed to get license information for package: ' + pkgname)
return None
pkg = pkgs[0]
pkg_data = {}
pkg_data = {
'Name': '',
'Version': '',
'Summary': '',
'Home-page': '',
'Author': '',
'License': ''
}
for line in pkg.get_metadata_lines('METADATA'):
try:
(key, value) = line.split(': ', 1)
Expand All @@ -49,7 +56,7 @@ def get_pkg_data(pkgname: str, pat:str) -> str:
pkg_data['License'] = value

home = pkg_data['Home-page'].lower().rstrip('/')

if 'github' in home:
try:
split = home.split('/')
Expand Down
Loading

0 comments on commit 8b3766b

Please sign in to comment.