Skip to content

Fix small bugs related to #487#659

Merged
joelvai merged 7 commits intoCodaone:develfrom
bitphage:fix-migrations-tests
Aug 21, 2019
Merged

Fix small bugs related to #487#659
joelvai merged 7 commits intoCodaone:develfrom
bitphage:fix-migrations-tests

Conversation

@bitphage
Copy link
Collaborator

We're now creating table structure from migrations, this test needs to
be adjusted.

We're now creating table structure from migrations, this test needs to
be adjusted.
@bitphage bitphage changed the title Fix migrations tests Fix small bugs related to #487 Aug 20, 2019
@joelvai joelvai self-requested a review August 21, 2019 04:42
Use pkg_resources to access migrations files. When dexbot is packaged
into egg file (normal `setup.py install` result), we cannot just access
files inside egg (zip archive), so we're using native setuptools API to
extract the files (resource_filename()). In case files are not in egg,
pkg_resources will use normal file access.

https://setuptools.readthedocs.io/en/latest/pkg_resources.html#basic-resource-access
https://setuptools.readthedocs.io/en/latest/setuptools.html#accessing-data-files-at-runtime
http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources
@joelvai joelvai merged commit 1d0f181 into Codaone:devel Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants