Add the capability to include installed apps from packages
This is just a list(set(apps))
when returning installed apps.
It adds a test to make sure the deduplication process works.
@calummackervoy I think this MR answers a request you made a while ago. Do you see anythings we could add before merging ?
In particulary it solves this one djangoldp-community#5 (closed)
Merge request reports
Activity
Fuck ! I already did it and forgot to merge it !!
mentioned in merge request !215 (closed)
mentioned in issue djangoldp-community#5 (closed)
mentioned in merge request djangoldp-community!4 (closed)
mentioned in merge request djangoldp-invoice!14 (merged)
Looks good! The order of
INSTALLED_APPS
can be important (https://stackoverflow.com/questions/31925458/importance-of-apps-orders-in-installed-apps)But as I read this code, it essentially appends each packages missing dependencies to the
INSTALLED_APPS
from mysettings.yml
? Therefore if I explicitly define an order insettings.yml
this will be preserved?@calummackervoy It's difficult to know what
list(set(mylist))
does as sets are not ordered. :)We could change the deduplication methods for something keeping the order. The resolution method for INSTALLED_APPS is somehow working as the opposite of the other settings: https://git.startinblox.com/djangoldp-packages/djangoldp/blob/master/djangoldp/conf/ldpsettings.py#L76
May be we could change the global order to make the config from
settings.yml[INSTALL_APPS]
arrive first. Therefore it will be possible to specify all the INSTALLED_APPS you want because the ones from other sources (packages, core default,...) will be define next and will be removed by deduplication process.But it's very difficult to unittest because once django
setup()
is run you can't change the settings.I think this would be better to include in specs for a general refactoring of the settings: #364
It's difficult to know what
list(set(mylist))
does as sets are not ordered. :)Ah I did realise this but I had assumed that the conversion to a set
set(mylist)
wouldn't change the order in practice (turns out it might). It could be done using an OrderedDict:from collections import OrderedDict list(OrderedDict.fromkeys(mylist)) # removes duplicates but maintains order
mentioned in issue #364
added 1 commit
- b8e5e973 - feat: ensured order is kept in deduplication
enabled an automatic merge when the pipeline for b8e5e973 succeeds
mentioned in commit 591a563d
mentioned in merge request documentation/doc!86 (merged)