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

Add title to Field calls where necessary #299

Merged
merged 7 commits into from
Dec 3, 2020

Conversation

jjnesbitt
Copy link
Member

This is something I've noticed for a while now, and figured I'd just add these titles. Almost all of the titles are just the variable name with capitalization and spaces, so I doubt there's much wrong here, but if there is please lmk.

@jjnesbitt jjnesbitt requested review from yarikoptic and satra December 2, 2020 21:19
@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #299 (bea4699) into master (511143d) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #299      +/-   ##
==========================================
- Coverage   81.88%   81.80%   -0.09%     
==========================================
  Files          54       54              
  Lines        4886     4886              
==========================================
- Hits         4001     3997       -4     
- Misses        885      889       +4     
Flag Coverage Δ
unittests 81.80% <100.00%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
dandi/models.py 81.25% <100.00%> (ø)
dandi/tests/test_models.py 100.00% <100.00%> (ø)
dandi/cli/cmd_organize.py 77.30% <0.00%> (-2.46%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 511143d...bea4699. Read the comment docs.

@yarikoptic
Copy link
Member

although "explicit better than implicit" I generally prefer to avoid duplication.
I wonder why just not at the level of UI to apply the rule of having camelCased to become Camel Cased and apply rules to downcase of, to etc if encountered upon splitting?

@yarikoptic
Copy link
Member

FWIW, might be better to have that "code" to be actually here within schema conversion tools, so produced .json would already have titles. That would centralize the code and not offload it upon UIs.

@satra
Copy link
Member

satra commented Dec 2, 2020

@AlmightyYakob - i sent some changes on top of yours (feel free to merge that). i was mostly focusing on the non-autogenerated ones. the reason license was misbehaving is that pydantic does not generate titles automatically for fields that have a type that's an enum. (i don't know why). so i fixed titles for all of them.

Co-authored-by: Jacob Nesbitt <jjnesbitt2@gmail.com>
@jjnesbitt
Copy link
Member Author

FWIW, might be better to have that "code" to be actually here within schema conversion tools, so produced .json would already have titles. That would centralize the code and not offload it upon UIs.

I agree, as otherwise it's more code that splits the schema used in the UI from the source schema. I realize that title formatting is a pretty small change, but JSON Schema is designed to be able to specify this information, without intervention from whatever is displaying it.

@yarikoptic
Copy link
Member

FWIW, might be better to have that "code" to be actually here within schema conversion tools, so produced .json would already have titles. That would centralize the code and not offload it upon UIs.

I agree, as otherwise it's more code that splits the schema used in the UI from the source schema. I realize that title formatting is a pretty small change, but JSON Schema is designed to be able to specify this information, without intervention from whatever is displaying it.

ok, filed #301 so could be done after to not hold this PR hostage

@jwodder
Copy link
Member

jwodder commented Dec 3, 2020

I've submitted a PR on the head repository to fix the failing tests: jjnesbitt#3

@yarikoptic
Copy link
Member

well, don't we need PRs to come from branches in this repository to get access to some secrets? then this PR should be redone from a branch here anyways. @jwodder , please just submit a new PR from a branch here to supersede this PR. @AlmightyYakob is also part of the team , so he should be able to push directly to that branch if would be needed

@jwodder
Copy link
Member

jwodder commented Dec 3, 2020

@yarikoptic Are you sure superseding this PR is necessary? The only secret the test workflow relies on is for pushing to Codecov.

@yarikoptic
Copy link
Member

we can wait for all the dance with merging of a PR for a PR to happen and then ignore codecov, or could just streamline with superseded PR with all the commits desired to bring it to the finish line together. up to you ;)

@jjnesbitt
Copy link
Member Author

@AlmightyYakob is also part of the team , so he should be able to push directly to that branch if would be needed

Do I have contributor access on this repo? If so, then in the future I'm happy to deal with branches here directly.

@yarikoptic
Copy link
Member

@AlmightyYakob is also part of the team , so he should be able to push directly to that branch if would be needed

Do I have contributor access on this repo? If so, then in the future I'm happy to deal with branches here directly.

AFAIK yes, you are part of the dandi-cli team https://github.com/orgs/dandi/teams/dandi-cli/members

@yarikoptic
Copy link
Member

ok, since @satra did not raise any concerns, I guess it is good to go!

@yarikoptic yarikoptic merged commit 1fd015f into dandi:master Dec 3, 2020
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.

4 participants