Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fields mask #451

Merged
merged 15 commits into from May 12, 2016
Merged

Use fields mask #451

merged 15 commits into from May 12, 2016

Conversation

noirbizarre
Copy link
Contributor

This PR make use of fields Mask and GenericModelFields.

Extracted from #380 (so requires #380 )

VisibleDatasetFactory, DatasetDiscussionFactory, LicenseFactory
)
from udata.core.reuse.factories import VisibleReuseFactory
from udata.core.dataset.factories import VisibleDatasetFactory, LicenseFactory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bewarn that it may conflict with #444

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already rebased and fixed in last commit ;)

@@ -92,7 +92,11 @@ import DatasetFilters from 'components/dataset/filters';
import placeholders from 'helpers/placeholders';
import config from 'config';

const MASK = 'id,title,description,spatial{zones,granularity},metrics,organization,frequency,temporal_coverage';
const MASK = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discussed – and this is subjective – I know that mask actually refers to X-Fieldsin the API meta. I would therefore have called it XFIELDS or FIELDS to make it more uniform.
An extra opinion would be welcome.

@vinyll
Copy link
Member

vinyll commented May 4, 2016

Massively impressive PR. 😮

@@ -64,7 +64,18 @@ import placeholders from 'helpers/placeholders';
import moment from 'moment';
import config from 'config';

const MASK = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency? ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different day, different mood, different solution :)
Which one do you prefer: single line or joined array ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arrays, joined when necessary, not during the definition otherwise we'll have to split if again if we need to merge/modify it later.

@davidbgk
Copy link
Member

r+wc

@noirbizarre noirbizarre merged commit bc93fc2 into opendatateam:dev May 12, 2016
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.

None yet

3 participants