akamai/AkamaiOPEN-edgegrid-python

Release tarball missing sample_edgerc

coreycb opened this issue · 3 comments

The source code has:
./akamai/edgegrid/test/sample_edgerc

However the release tarball on pypi doesn't have that file. I'm trying to package this project up for Ubuntu and can't run all of the unit tests as a result.

======================================================================
ERROR: test_edgerc_default (akamai.edgegrid.test.test_edgegrid.EGSimpleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-edgegrid-1.1.1/akamai/edgegrid/test/test_edgegrid.py", line 123, in test_edgerc_default
    auth = EdgeGridAuth.from_edgerc(os.path.join(mydir, 'sample_edgerc'))
  File "/build/python-edgegrid-1.1.1/akamai/edgegrid/edgegrid.py", line 120, in from_edgerc
    client_token=rc.get(section, 'client_token'),
  File "/usr/lib/python3.8/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/lib/python3.8/configparser.py", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'default'

======================================================================
ERROR: test_edgerc_broken (akamai.edgegrid.test.test_edgegrid.EGSimpleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-edgegrid-1.1.1/akamai/edgegrid/test/test_edgegrid.py", line 131, in test_edgerc_broken
    auth = EdgeGridAuth.from_edgerc(os.path.join(mydir, 'sample_edgerc'), 'broken')
  File "/build/python-edgegrid-1.1.1/akamai/edgegrid/edgegrid.py", line 120, in from_edgerc
    client_token=rc.get(section, 'client_token'),
  File "/usr/lib/python3.8/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/lib/python3.8/configparser.py", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'broken'

======================================================================
ERROR: test_edgerc_headers (akamai.edgegrid.test.test_edgegrid.EGSimpleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-edgegrid-1.1.1/akamai/edgegrid/test/test_edgegrid.py", line 145, in test_edgerc_headers
    auth = EdgeGridAuth.from_edgerc(os.path.join(mydir, 'sample_edgerc'), 'headers')
  File "/build/python-edgegrid-1.1.1/akamai/edgegrid/edgegrid.py", line 120, in from_edgerc
    client_token=rc.get(section, 'client_token'),
  File "/usr/lib/python3.8/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/lib/python3.8/configparser.py", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'headers'

======================================================================
ERROR: test_edgerc_from_object (akamai.edgegrid.test.test_edgegrid.EGSimpleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/python-edgegrid-1.1.1/akamai/edgegrid/test/test_edgegrid.py", line 149, in test_edgerc_from_object
    auth = EdgeGridAuth.from_edgerc(EdgeRc(os.path.join(mydir, 'sample_edgerc')))
  File "/build/python-edgegrid-1.1.1/akamai/edgegrid/edgegrid.py", line 120, in from_edgerc
    client_token=rc.get(section, 'client_token'),
  File "/usr/lib/python3.8/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/lib/python3.8/configparser.py", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'default'

----------------------------------------------------------------------
Ran 21 tests in 0.008s

FAILED (errors=4)

Thank you @coreycb , we have fixed this in our internal repository and will be released soon.

hi @coreycb ,

Thank you once again. In previous release (1.2.0) we tried to solve this issue by including those resource files in MANIFEST.in. Unfortunately, due to not putting each of them in a separate line, they were not properly included in the release. This has been finally fixed in our latest release.

Regards,

Roberto