I could see adding something like this to a utils package in opaque keys, but it'd be nice if it worked across all key types instead of being course key specific.
Is it a requirement that the generated file names be human readable? Using base64.urlsafe_b64encode on the serialized key would give you something that's guaranteed to be robust and reversible -- in which case you might not need to add a new method at all. Take care. Dave On Fri, Aug 5, 2016 at 2:31 AM, <[email protected]> wrote: > Hello, > > I'm wondering whether it would be ok to move the edx-analytics-pipeline > method opaque_key_util.get_filename_safe_course_id() > <https://github.com/edx/edx-analytics-pipeline/blob/2bd27a516be103ca0cd5c833db553045115992aa/edx/analytics/tasks/util/opaque_key_util.py#L61-L75> > into the edx-opaque-keys <https://github.com/edx/opaque-keys> repository. > > This method is currently also defined (identically) in > edx-analytics-exporter.course_export > <https://github.com/edx/edx-analytics-exporter/blob/25df95b21370a5640013d6e259b1f40db5fed377/exporter/course_export.py#L144-L158>, > and we've got a PR in review for the edx-analytics-data-api > <https://github.com/edx/edx-analytics-data-api/pull/131>that would also > find it useful. > > Does this sound ok? > > Any preferences on where it should live in opaque_keys? > > -- > Jill > @OpenCraft <http://opencraft.com/> > > -- > You received this message because you are subscribed to the Google Groups > "General Open edX discussion" group. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/edx-code/08b5861c-591d-412a-b1c3-9bb7ad4b4498%40googlegroups.com > <https://groups.google.com/d/msgid/edx-code/08b5861c-591d-412a-b1c3-9bb7ad4b4498%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "General Open edX discussion" group. To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/CAO_oFPyxXxXVYjcYUX1dUanJMYQZuQ_8uhumn_p1NY3wFObOUQ%40mail.gmail.com.
