From 7ef7426f76fec683caa9cdd5e9cc8af738096517 Mon Sep 17 00:00:00 2001 From: Charles Beauville Date: Mon, 7 Oct 2024 17:15:31 +0200 Subject: [PATCH] ci(*:skip) Add TOML linting (#4203) --- dev/changelog_config.toml | 1933 +++++++++-------- dev/format.sh | 2 + dev/test.sh | 8 + e2e/docker/pyproject.toml | 4 +- e2e/e2e-bare-auth/pyproject.toml | 4 +- e2e/e2e-bare-https/pyproject.toml | 4 +- e2e/e2e-bare/pyproject.toml | 4 +- e2e/e2e-fastai/pyproject.toml | 1 + e2e/e2e-pandas/pyproject.toml | 8 +- e2e/e2e-scikit-learn/pyproject.toml | 4 +- examples/custom-metrics/pyproject.toml | 14 +- examples/fl-dp-sa/pyproject.toml | 2 +- examples/fl-tabular/pyproject.toml | 2 +- examples/flower-authentication/pyproject.toml | 6 +- examples/opacus/pyproject.toml | 8 +- examples/quickstart-mlcube/pyproject.toml | 2 +- examples/quickstart-tensorflow/pyproject.toml | 2 +- examples/tensorflow-privacy/pyproject.toml | 2 +- examples/vertical-fl/pyproject.toml | 1 - examples/xgboost-comprehensive/pyproject.toml | 6 +- examples/xgboost-quickstart/pyproject.toml | 2 +- pyproject.toml | 25 +- taplo.toml | 24 + 23 files changed, 1041 insertions(+), 1027 deletions(-) create mode 100644 taplo.toml diff --git a/dev/changelog_config.toml b/dev/changelog_config.toml index 82a10d30173b..3c155387ef93 100644 --- a/dev/changelog_config.toml +++ b/dev/changelog_config.toml @@ -3,972 +3,979 @@ type = ["ci", "docs", "feat", "fix", "refactor", "break"] -project = ["framework", "baselines", "datasets", "examples", "benchmarks", "glossary"] +project = [ + "framework", + "baselines", + "datasets", + "examples", + "benchmarks", + "glossary", +] scope = "skip" pattern_template = "^({types})\\(({projects})(?::({scope}))?\\) ([A-Z][^\\n]*[^\\.\\n])$" -allowed_verbs=[ - "Abandon", - "Abort", - "Abstract", - "Accept", - "Accomodate", - "Accompany", - "Account", - "Accumulate", - "Accuse", - "Ache", - "Achieve", - "Acknowledge", - "Acquire", - "Act", - "Activate", - "Active", - "Adapt", - "Add", - "Address", - "Adhere", - "Adjust", - "Admit", - "Adopt", - "Advance", - "Advise", - "Advocate", - "Affect", - "Affirm", - "Afford", - "Agree", - "Aim", - "Align", - "Allow", - "Alter", - "Amend", - "Analyse", - "Analyze", - "Anchor", - "Annotate", - "Announce", - "Annoy", - "Annul", - "Answer", - "Appeal", - "Appear", - "Append", - "Applicate", - "Apply", - "Appoint", - "Appreciate", - "Approach", - "Approve", - "Argue", - "Arise", - "Arrange", - "Arrest", - "Arrive", - "Ask", - "Assert", - "Assess", - "Assign", - "Assist", - "Associate", - "Assume", - "Assure", - "Attach", - "Attack", - "Attempt", - "Attend", - "Attract", - "Augment", - "Avoid", - "Awake", - "Back", - "Backport", - "Backup", - "Bake", - "Base", - "Battle", - "Be", - "Bear", - "Beat", - "Become", - "Begin", - "Behave", - "Believe", - "Belong", - "Bend", - "Benefit", - "Better", - "Beware", - "Bind", - "Blacklist", - "Blame", - "Blend", - "Block", - "Blow", - "Blur", - "Bootstrap", - "Born", - "Borrow", - "Bother", - "Break", - "Bridge", - "Bring", - "Broadcast", - "Buffer", - "Build", - "Bump", - "Bundle", - "Burn", - "Busy", - "Buy", - "Bypass", - "Cache", - "Calculate", - "Call", - "Cancel", - "Capitalize", - "Capture", - "Care", - "Carry", - "Carryout", - "Cast", - "Catch", - "Categorize", - "Cause", - "Center", - "Centralize", - "Challenge", - "Change", - "Chant", - "Charge", - "Chase", - "Chat", - "Check", - "Choose", - "Circle", - "Claim", - "Clarify", - "Clean", - "Cleanse", - "Clear", - "Climb", - "Clip", - "Close", - "Clothe", - "Coalesce", - "Collapse", - "Collect", - "Combine", - "Come", - "Command", - "Comment", - "Commit", - "Compare", - "Compensate", - "Compile", - "Complain", - "Complement", - "Complete", - "Compose", - "Compress", - "Compute", - "Conceal", - "Concentrate", - "Conclude", - "Concur", - "Conduct", - "Configure", - "Confirm", - "Confront", - "Connect", - "Connote", - "Consider", - "Consist", - "Consolidate", - "Constitute", - "Construct", - "Consume", - "Contact", - "Contain", - "Contest", - "Continue", - "Contribute", - "Control", - "Convert", - "Convey", - "Cook", - "Coordinate", - "Cope", - "Copy", - "Correct", - "Cost", - "Counsel", - "Count", - "Cover", - "Create", - "Cross", - "Cry", - "Cut", - "Cycle", - "Damage", - "Dance", - "Deal", - "Debate", - "Decide", - "Declare", - "Decode", - "Deconstruct", - "Decouple", - "Decrease", - "Dedup", - "Duplicate", - "Deduplicate", - "Default", - "Defeat", - "Defend", - "Defer", - "Define", - "Delay", - "Delegate", - "Delete", - "Deliver", - "Demand", - "Demolish", - "Demonstrate", - "Deny", - "Depart", - "Depend", - "Depict", - "Deprecate", - "Derive", - "Describe", - "Deserialize", - "Design", - "Desire", - "Destroy", - "Detail", - "Detect", - "Determine", - "Develop", - "Devote", - "Die", - "Dim", - "Direct", - "Disable", - "Disallow", - "Disappear", - "Disconnect", - "Discontinue", - "Discourage", - "Discover", - "Discuss", - "Dislike", - "Dismiss", - "Dispatch", - "Displace", - "Display", - "Distinguish", - "Divide", - "Do", - "Document", - "Dominate", - "Downgrade", - "Download", - "Draw", - "Dread", - "Dress", - "Drink", - "Drive", - "Drop", - "Dry", - "Dump", - "Duplicate", - "Earn", - "Eat", - "Echo", - "Edit", - "Educate", - "Elaborate", - "Elect", - "Elevate", - "Eliminate", - "Embed", - "Emerge", - "Emit", - "Employ", - "Empty", - "Enable", - "Encapsulate", - "Encourage", - "End", - "Endorse", - "Endure", - "Enforce", - "Engage", - "Enhance", - "Enjoy", - "Enquire", - "Enroll", - "Ensure", - "Enter", - "Enumerate", - "Equal", - "Equate", - "Erase", - "Escape", - "Establish", - "Estimate", - "Evaluate", - "Examine", - "Except", - "Exclude", - "Excuse", - "Execute", - "Exempt", - "Exercise", - "Exert", - "Exist", - "Exit", - "Expand", - "Expect", - "Experience", - "Explain", - "Explore", - "Export", - "Expose", - "Express", - "Extend", - "Extract", - "Face", - "Factor", - "Fail", - "Fall", - "Fault", - "Favor", - "Fear", - "Feature", - "Feed", - "Feel", - "Fetch", - "Fight", - "Fill", - "Filter", - "Find", - "Finish", - "Fit", - "Fix", - "Flatten", - "Flee", - "Flip", - "Float", - "Flow", - "Flunk", - "Flush", - "Fly", - "Focus", - "Fold", - "Follow", - "Force", - "Foresee", - "Forget", - "Fork", - "Form", - "Formalize", - "Format", - "Forward", - "Found", - "Free", - "Freeze", - "Gain", - "Gather", - "Generalize", - "Generate", - "Get", - "Gitignore", - "Give", - "Giveup", - "Glance", - "Go", - "Going", - "Govern", - "Grant", - "Grin", - "Group", - "Grow", - "Guard", - "Guess", - "Guide", - "Hack", - "Halt", - "Hand", - "Handle", - "Hang", - "Happen", - "Hardcode", - "Harm", - "Hate", - "Have", - "Head", - "Hear", - "Help", - "Hide", - "Highlight", - "Hint", - "Hire", - "Hit", - "Hold", - "Hook", - "Hope", - "House", - "Hurt", - "Identify", - "Ignore", - "Illuminate", - "Illustrate", - "Imagine", - "Impersonate", - "Implement", - "Imply", - "Import", - "Importune", - "Impose", - "Improve", - "Include", - "Incorporate", - "Increase", - "Incur", - "Indent", - "Indicate", - "Infer", - "Influence", - "Inform", - "Inherit", - "Init", - "Initialize", - "Initiate", - "Injure", - "In-line", - "Inline", - "Insist", - "Install", - "Instantiate", - "Instruct", - "Integrate", - "Intend", - "Intercept", - "Internalize", - "Interpret", - "Introduce", - "Invalidate", - "Invert", - "Invest", - "Investigate", - "Invite", - "Invoke", - "Involve", - "Isolate", - "Issue", - "Join", - "Journey", - "Joy", - "Judge", - "Jump", - "Justify", - "Keep", - "Key", - "Kick", - "Kill", - "Kiss", - "Knock", - "Know", - "Label", - "Lack", - "Land", - "Last", - "Laugh", - "Launch", - "Lay", - "Lead", - "Lean", - "Leap", - "Learn", - "Leave", - "Let", - "Lie", - "Lift", - "Light", - "Like", - "Limit", - "Link", - "List", - "Listen", - "Live", - "Load", - "Localize", - "Locate", - "Lock", - "Log", - "Login", - "Look", - "Loop", - "Lose", - "Love", - "Lower", - "Maintain", - "Make", - "Manage", - "Map", - "Mark", - "Marry", - "Match", - "Materialize", - "Matter", - "Mean", - "Measure", - "Meet", - "Memoize", - "Menace", - "Mention", - "Merge", - "Migrate", - "Mind", - "Mirror", - "Misinform", - "Miss", - "Mix", - "Mock", - "Modernize", - "Modify", - "Monitor", - "Monomorphize", - "Move", - "Mutate", - "Name", - "Navigate", - "Near", - "Need", - "Nod", - "Normalize", - "Notarize", - "Note", - "Notice", - "Notify", - "Observe", - "Obtain", - "Occupy", - "Occur", - "Offer", - "Officiate", - "Omit", - "Open", - "Operate", - "Optimise", - "Optimize", - "Order", - "Organise", - "Organize", - "Output", - "Overhaul", - "Override", - "Overwrite", - "Owe", - "Own", - "Pack", - "Package", - "Paint", - "Panic", - "Parameterize", - "Parse", - "Partake", - "Pass", - "Patch", - "Pause", - "Pay", - "Perform", - "Permit", - "Persist", - "Persuade", - "Pick", - "Pin", - "Ping", - "Pipe", - "Place", - "Plan", - "Play", - "Plow", - "Point", - "Ponder", - "Populate", - "Port", - "Position", - "Possess", - "Pour", - "Predict", - "Prefer", - "Prefix", - "Prepare", - "Present", - "Preserve", - "Press", - "Presume", - "Prevent", - "Print", - "Prioritize", - "Privatize", - "Proceed", - "Process", - "Procure", - "Produce", - "Prolong", - "Promise", - "Promote", - "Prompt", - "Propagate", - "Propose", - "Prosecute", - "Protect", - "Protest", - "Prove", - "Provide", - "Prune", - "Publish", - "Pull", - "Purchase", - "Purge", - "Pursue", - "Push", - "Put", - "Puton", - "Qualify", - "Query", - "Question", - "Queue", - "Quit", - "Quote", - "Race", - "Raise", - "Randomize", - "Reach", - "React", - "Read", - "Realise", - "Realize", - "Reapply", - "Rearrange", - "Reason", - "Rebuild", - "Recall", - "Receive", - "Reckon", - "Recognise", - "Recognize", - "Recommend", - "Reconnect", - "Record", - "Recover", - "Recur", - "Redact", - "Re-define", - "Redefine", - "Re-design", - "Redesign", - "Redirect", - "Re-do", - "Redo", - "Reduce", - "Re-enable", - "Refactor", - "Refer", - "Reference", - "Refine", - "Reflect", - "Reformat", - "Refresh", - "Refuse", - "Regard", - "Regenerate", - "Register", - "Reimplement", - "Re-instate", - "Reinstate", - "Reject", - "Relate", - "Relax", - "Release", - "Reload", - "Rely", - "Remain", - "Remember", - "Remind", - "Remove", - "Rename", - "Render", - "Re-order", - "Reorder", - "Reorganise", - "Reorganize", - "Repair", - "Reparent", - "Repeat", - "Repel", - "Rephrase", - "Replace", - "Reply", - "Report", - "Reposition", - "Represent", - "Request", - "Require", - "Rerender", - "Rerun", - "Re-scale", - "Rescale", - "Research", - "Re-set", - "Reset", - "Reside", - "Resize", - "Resolve", - "Respect", - "Respond", - "Rest", - "Restart", - "Restore", - "Restrict", - "Restructure", - "Result", - "Resume", - "Resurface", - "Retain", - "Retire", - "Retreat", - "Retrieve", - "Retry", - "Return", - "Reuse", - "Revamp", - "Reveal", - "Reverse", - "Revert", - "Review", - "Revise", - "Revisit", - "Revoke", - "Reword", - "Re-wrap", - "Rewrap", - "Rewrite", - "Ride", - "Ring", - "Rise", - "Roll", - "Rotate", - "Round", - "Route", - "Rule", - "Run", - "Sale", - "Salute", - "Sample", - "Sanitize", - "Save", - "Say", - "Scale", - "Scope", - "Score", - "Scroll", - "Search", - "Secure", - "See", - "Seek", - "Seem", - "Select", - "Self-initialize", - "Sell", - "Send", - "Separate", - "Serialize", - "Serve", - "Set", - "Settle", - "Shake", - "Shape", - "Share", - "Shift", - "Shoot", - "Shorten", - "Shout", - "Show", - "Shrink", - "Shuffle", - "Shut", - "Sign", - "Signify", - "Silence", - "Simplify", - "Simulate", - "Sing", - "Sit", - "Size", - "Skip", - "Sleep", - "Slide", - "Slip", - "Smile", - "Solve", - "Sort", - "Sound", - "Source", - "Spawn", - "Speak", - "Specify", - "Spend", - "Split", - "Spread", - "Stand", - "Standardize", - "Stare", - "Start", - "State", - "Stay", - "Steal", - "Steer", - "Step", - "Stick", - "Stop", - "Store", - "Stress", - "Stretch", - "Strike", - "Stringify", - "Strip", - "Struggle", - "Stub", - "Study", - "Style", - "Subclass", - "Submit", - "Substitute", - "Subtract", - "Succeed", - "Suffer", - "Suggest", - "Suit", - "Supply", - "Support", - "Suppose", - "Suppress", - "Surround", - "Survive", - "Suspect", - "Swallow", - "Swap", - "Sway", - "Switch", - "Sync", - "Synchronise", - "Synchronize", - "Synthesize", - "Take", - "Talk", - "Talkover", - "Target", - "Teach", - "Tell", - "Tempt", - "Tend", - "Terminate", - "Test", - "Testify", - "Thank", - "Think", - "Threaten", - "Throw", - "Tie", - "Time", - "Toggle", - "Touch", - "Track", - "Trade", - "Train", - "Transfer", - "Transform", - "Translate", - "Transpile", - "Trash", - "Travel", - "Tread", - "Treat", - "Trigger", - "Trim", - "Truncate", - "Trust", - "Try", - "Tune", - "Turn", - "Tweak", - "Twist", - "Unblock", - "Uncomment", - "Uncover", - "Understand", - "Undertake", - "Undo", - "Undry", - "Unescape", - "Unfold", - "Unify", - "Unignore", - "Unite", - "Unload", - "Unlock", - "Unpack", - "Unregister", - "Unskip", - "Unsubscribe", - "Untrack", - "Unwrap", - "Update", - "Upgrade", - "Upload", - "Urge", - "Use", - "Utter", - "Validate", - "Value", - "Vanish", - "Vary", - "Verbosify", - "Verify", - "View", - "Visit", - "Vocalize", - "Voice", - "Vote", - "Wait", - "Wake", - "Walk", - "Want", - "Warn", - "Warrant", - "Wash", - "Watch", - "Wear", - "Weep", - "Weigh", - "Welcome", - "Whitelist", - "Win", - "Wipe", - "Wire", - "Wish", - "Withdraw", - "Wonder", - "Work", - "Workout", - "Worry", - "Wrap", - "Write" +allowed_verbs = [ + "Abandon", + "Abort", + "Abstract", + "Accept", + "Accomodate", + "Accompany", + "Account", + "Accumulate", + "Accuse", + "Ache", + "Achieve", + "Acknowledge", + "Acquire", + "Act", + "Activate", + "Active", + "Adapt", + "Add", + "Address", + "Adhere", + "Adjust", + "Admit", + "Adopt", + "Advance", + "Advise", + "Advocate", + "Affect", + "Affirm", + "Afford", + "Agree", + "Aim", + "Align", + "Allow", + "Alter", + "Amend", + "Analyse", + "Analyze", + "Anchor", + "Annotate", + "Announce", + "Annoy", + "Annul", + "Answer", + "Appeal", + "Appear", + "Append", + "Applicate", + "Apply", + "Appoint", + "Appreciate", + "Approach", + "Approve", + "Argue", + "Arise", + "Arrange", + "Arrest", + "Arrive", + "Ask", + "Assert", + "Assess", + "Assign", + "Assist", + "Associate", + "Assume", + "Assure", + "Attach", + "Attack", + "Attempt", + "Attend", + "Attract", + "Augment", + "Avoid", + "Awake", + "Back", + "Backport", + "Backup", + "Bake", + "Base", + "Battle", + "Be", + "Bear", + "Beat", + "Become", + "Begin", + "Behave", + "Believe", + "Belong", + "Bend", + "Benefit", + "Better", + "Beware", + "Bind", + "Blacklist", + "Blame", + "Blend", + "Block", + "Blow", + "Blur", + "Bootstrap", + "Born", + "Borrow", + "Bother", + "Break", + "Bridge", + "Bring", + "Broadcast", + "Buffer", + "Build", + "Bump", + "Bundle", + "Burn", + "Busy", + "Buy", + "Bypass", + "Cache", + "Calculate", + "Call", + "Cancel", + "Capitalize", + "Capture", + "Care", + "Carry", + "Carryout", + "Cast", + "Catch", + "Categorize", + "Cause", + "Center", + "Centralize", + "Challenge", + "Change", + "Chant", + "Charge", + "Chase", + "Chat", + "Check", + "Choose", + "Circle", + "Claim", + "Clarify", + "Clean", + "Cleanse", + "Clear", + "Climb", + "Clip", + "Close", + "Clothe", + "Coalesce", + "Collapse", + "Collect", + "Combine", + "Come", + "Command", + "Comment", + "Commit", + "Compare", + "Compensate", + "Compile", + "Complain", + "Complement", + "Complete", + "Compose", + "Compress", + "Compute", + "Conceal", + "Concentrate", + "Conclude", + "Concur", + "Conduct", + "Configure", + "Confirm", + "Confront", + "Connect", + "Connote", + "Consider", + "Consist", + "Consolidate", + "Constitute", + "Construct", + "Consume", + "Contact", + "Contain", + "Contest", + "Continue", + "Contribute", + "Control", + "Convert", + "Convey", + "Cook", + "Coordinate", + "Cope", + "Copy", + "Correct", + "Cost", + "Counsel", + "Count", + "Cover", + "Create", + "Cross", + "Cry", + "Cut", + "Cycle", + "Damage", + "Dance", + "Deal", + "Debate", + "Decide", + "Declare", + "Decode", + "Deconstruct", + "Decouple", + "Decrease", + "Dedup", + "Duplicate", + "Deduplicate", + "Default", + "Defeat", + "Defend", + "Defer", + "Define", + "Delay", + "Delegate", + "Delete", + "Deliver", + "Demand", + "Demolish", + "Demonstrate", + "Deny", + "Depart", + "Depend", + "Depict", + "Deprecate", + "Derive", + "Describe", + "Deserialize", + "Design", + "Desire", + "Destroy", + "Detail", + "Detect", + "Determine", + "Develop", + "Devote", + "Die", + "Dim", + "Direct", + "Disable", + "Disallow", + "Disappear", + "Disconnect", + "Discontinue", + "Discourage", + "Discover", + "Discuss", + "Dislike", + "Dismiss", + "Dispatch", + "Displace", + "Display", + "Distinguish", + "Divide", + "Do", + "Document", + "Dominate", + "Downgrade", + "Download", + "Draw", + "Dread", + "Dress", + "Drink", + "Drive", + "Drop", + "Dry", + "Dump", + "Duplicate", + "Earn", + "Eat", + "Echo", + "Edit", + "Educate", + "Elaborate", + "Elect", + "Elevate", + "Eliminate", + "Embed", + "Emerge", + "Emit", + "Employ", + "Empty", + "Enable", + "Encapsulate", + "Encourage", + "End", + "Endorse", + "Endure", + "Enforce", + "Engage", + "Enhance", + "Enjoy", + "Enquire", + "Enroll", + "Ensure", + "Enter", + "Enumerate", + "Equal", + "Equate", + "Erase", + "Escape", + "Establish", + "Estimate", + "Evaluate", + "Examine", + "Except", + "Exclude", + "Excuse", + "Execute", + "Exempt", + "Exercise", + "Exert", + "Exist", + "Exit", + "Expand", + "Expect", + "Experience", + "Explain", + "Explore", + "Export", + "Expose", + "Express", + "Extend", + "Extract", + "Face", + "Factor", + "Fail", + "Fall", + "Fault", + "Favor", + "Fear", + "Feature", + "Feed", + "Feel", + "Fetch", + "Fight", + "Fill", + "Filter", + "Find", + "Finish", + "Fit", + "Fix", + "Flatten", + "Flee", + "Flip", + "Float", + "Flow", + "Flunk", + "Flush", + "Fly", + "Focus", + "Fold", + "Follow", + "Force", + "Foresee", + "Forget", + "Fork", + "Form", + "Formalize", + "Format", + "Forward", + "Found", + "Free", + "Freeze", + "Gain", + "Gather", + "Generalize", + "Generate", + "Get", + "Gitignore", + "Give", + "Giveup", + "Glance", + "Go", + "Going", + "Govern", + "Grant", + "Grin", + "Group", + "Grow", + "Guard", + "Guess", + "Guide", + "Hack", + "Halt", + "Hand", + "Handle", + "Hang", + "Happen", + "Hardcode", + "Harm", + "Hate", + "Have", + "Head", + "Hear", + "Help", + "Hide", + "Highlight", + "Hint", + "Hire", + "Hit", + "Hold", + "Hook", + "Hope", + "House", + "Hurt", + "Identify", + "Ignore", + "Illuminate", + "Illustrate", + "Imagine", + "Impersonate", + "Implement", + "Imply", + "Import", + "Importune", + "Impose", + "Improve", + "Include", + "Incorporate", + "Increase", + "Incur", + "Indent", + "Indicate", + "Infer", + "Influence", + "Inform", + "Inherit", + "Init", + "Initialize", + "Initiate", + "Injure", + "In-line", + "Inline", + "Insist", + "Install", + "Instantiate", + "Instruct", + "Integrate", + "Intend", + "Intercept", + "Internalize", + "Interpret", + "Introduce", + "Invalidate", + "Invert", + "Invest", + "Investigate", + "Invite", + "Invoke", + "Involve", + "Isolate", + "Issue", + "Join", + "Journey", + "Joy", + "Judge", + "Jump", + "Justify", + "Keep", + "Key", + "Kick", + "Kill", + "Kiss", + "Knock", + "Know", + "Label", + "Lack", + "Land", + "Last", + "Laugh", + "Launch", + "Lay", + "Lead", + "Lean", + "Leap", + "Learn", + "Leave", + "Let", + "Lie", + "Lift", + "Light", + "Like", + "Limit", + "Link", + "List", + "Listen", + "Live", + "Load", + "Localize", + "Locate", + "Lock", + "Log", + "Login", + "Look", + "Loop", + "Lose", + "Love", + "Lower", + "Maintain", + "Make", + "Manage", + "Map", + "Mark", + "Marry", + "Match", + "Materialize", + "Matter", + "Mean", + "Measure", + "Meet", + "Memoize", + "Menace", + "Mention", + "Merge", + "Migrate", + "Mind", + "Mirror", + "Misinform", + "Miss", + "Mix", + "Mock", + "Modernize", + "Modify", + "Monitor", + "Monomorphize", + "Move", + "Mutate", + "Name", + "Navigate", + "Near", + "Need", + "Nod", + "Normalize", + "Notarize", + "Note", + "Notice", + "Notify", + "Observe", + "Obtain", + "Occupy", + "Occur", + "Offer", + "Officiate", + "Omit", + "Open", + "Operate", + "Optimise", + "Optimize", + "Order", + "Organise", + "Organize", + "Output", + "Overhaul", + "Override", + "Overwrite", + "Owe", + "Own", + "Pack", + "Package", + "Paint", + "Panic", + "Parameterize", + "Parse", + "Partake", + "Pass", + "Patch", + "Pause", + "Pay", + "Perform", + "Permit", + "Persist", + "Persuade", + "Pick", + "Pin", + "Ping", + "Pipe", + "Place", + "Plan", + "Play", + "Plow", + "Point", + "Ponder", + "Populate", + "Port", + "Position", + "Possess", + "Pour", + "Predict", + "Prefer", + "Prefix", + "Prepare", + "Present", + "Preserve", + "Press", + "Presume", + "Prevent", + "Print", + "Prioritize", + "Privatize", + "Proceed", + "Process", + "Procure", + "Produce", + "Prolong", + "Promise", + "Promote", + "Prompt", + "Propagate", + "Propose", + "Prosecute", + "Protect", + "Protest", + "Prove", + "Provide", + "Prune", + "Publish", + "Pull", + "Purchase", + "Purge", + "Pursue", + "Push", + "Put", + "Puton", + "Qualify", + "Query", + "Question", + "Queue", + "Quit", + "Quote", + "Race", + "Raise", + "Randomize", + "Reach", + "React", + "Read", + "Realise", + "Realize", + "Reapply", + "Rearrange", + "Reason", + "Rebuild", + "Recall", + "Receive", + "Reckon", + "Recognise", + "Recognize", + "Recommend", + "Reconnect", + "Record", + "Recover", + "Recur", + "Redact", + "Re-define", + "Redefine", + "Re-design", + "Redesign", + "Redirect", + "Re-do", + "Redo", + "Reduce", + "Re-enable", + "Refactor", + "Refer", + "Reference", + "Refine", + "Reflect", + "Reformat", + "Refresh", + "Refuse", + "Regard", + "Regenerate", + "Register", + "Reimplement", + "Re-instate", + "Reinstate", + "Reject", + "Relate", + "Relax", + "Release", + "Reload", + "Rely", + "Remain", + "Remember", + "Remind", + "Remove", + "Rename", + "Render", + "Re-order", + "Reorder", + "Reorganise", + "Reorganize", + "Repair", + "Reparent", + "Repeat", + "Repel", + "Rephrase", + "Replace", + "Reply", + "Report", + "Reposition", + "Represent", + "Request", + "Require", + "Rerender", + "Rerun", + "Re-scale", + "Rescale", + "Research", + "Re-set", + "Reset", + "Reside", + "Resize", + "Resolve", + "Respect", + "Respond", + "Rest", + "Restart", + "Restore", + "Restrict", + "Restructure", + "Result", + "Resume", + "Resurface", + "Retain", + "Retire", + "Retreat", + "Retrieve", + "Retry", + "Return", + "Reuse", + "Revamp", + "Reveal", + "Reverse", + "Revert", + "Review", + "Revise", + "Revisit", + "Revoke", + "Reword", + "Re-wrap", + "Rewrap", + "Rewrite", + "Ride", + "Ring", + "Rise", + "Roll", + "Rotate", + "Round", + "Route", + "Rule", + "Run", + "Sale", + "Salute", + "Sample", + "Sanitize", + "Save", + "Say", + "Scale", + "Scope", + "Score", + "Scroll", + "Search", + "Secure", + "See", + "Seek", + "Seem", + "Select", + "Self-initialize", + "Sell", + "Send", + "Separate", + "Serialize", + "Serve", + "Set", + "Settle", + "Shake", + "Shape", + "Share", + "Shift", + "Shoot", + "Shorten", + "Shout", + "Show", + "Shrink", + "Shuffle", + "Shut", + "Sign", + "Signify", + "Silence", + "Simplify", + "Simulate", + "Sing", + "Sit", + "Size", + "Skip", + "Sleep", + "Slide", + "Slip", + "Smile", + "Solve", + "Sort", + "Sound", + "Source", + "Spawn", + "Speak", + "Specify", + "Spend", + "Split", + "Spread", + "Stand", + "Standardize", + "Stare", + "Start", + "State", + "Stay", + "Steal", + "Steer", + "Step", + "Stick", + "Stop", + "Store", + "Stress", + "Stretch", + "Strike", + "Stringify", + "Strip", + "Struggle", + "Stub", + "Study", + "Style", + "Subclass", + "Submit", + "Substitute", + "Subtract", + "Succeed", + "Suffer", + "Suggest", + "Suit", + "Supply", + "Support", + "Suppose", + "Suppress", + "Surround", + "Survive", + "Suspect", + "Swallow", + "Swap", + "Sway", + "Switch", + "Sync", + "Synchronise", + "Synchronize", + "Synthesize", + "Take", + "Talk", + "Talkover", + "Target", + "Teach", + "Tell", + "Tempt", + "Tend", + "Terminate", + "Test", + "Testify", + "Thank", + "Think", + "Threaten", + "Throw", + "Tie", + "Time", + "Toggle", + "Touch", + "Track", + "Trade", + "Train", + "Transfer", + "Transform", + "Translate", + "Transpile", + "Trash", + "Travel", + "Tread", + "Treat", + "Trigger", + "Trim", + "Truncate", + "Trust", + "Try", + "Tune", + "Turn", + "Tweak", + "Twist", + "Unblock", + "Uncomment", + "Uncover", + "Understand", + "Undertake", + "Undo", + "Undry", + "Unescape", + "Unfold", + "Unify", + "Unignore", + "Unite", + "Unload", + "Unlock", + "Unpack", + "Unregister", + "Unskip", + "Unsubscribe", + "Untrack", + "Unwrap", + "Update", + "Upgrade", + "Upload", + "Urge", + "Use", + "Utter", + "Validate", + "Value", + "Vanish", + "Vary", + "Verbosify", + "Verify", + "View", + "Visit", + "Vocalize", + "Voice", + "Vote", + "Wait", + "Wake", + "Walk", + "Want", + "Warn", + "Warrant", + "Wash", + "Watch", + "Wear", + "Weep", + "Weigh", + "Welcome", + "Whitelist", + "Win", + "Wipe", + "Wire", + "Wish", + "Withdraw", + "Wonder", + "Work", + "Workout", + "Worry", + "Wrap", + "Write", ] diff --git a/dev/format.sh b/dev/format.sh index ada5a7f13abc..a3129b932e5d 100755 --- a/dev/format.sh +++ b/dev/format.sh @@ -2,6 +2,8 @@ set -e cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ +taplo fmt + # Python python -m flwr_tool.check_copyright src/py/flwr python -m flwr_tool.init_py_fix src/py/flwr diff --git a/dev/test.sh b/dev/test.sh index 170d9f4acd1e..8f8d9dedf6d8 100755 --- a/dev/test.sh +++ b/dev/test.sh @@ -56,6 +56,14 @@ echo "- mdformat: done" echo "- All Markdown checks passed" +echo "- Start TOML checks" + +echo "- taplo: start" +taplo fmt --check +echo "- taplo: done" + +echo "- All TOML checks passed" + echo "- Start rST checks" echo "- docstrfmt: start" diff --git a/e2e/docker/pyproject.toml b/e2e/docker/pyproject.toml index 955f30c7bf8d..def93ed4065d 100644 --- a/e2e/docker/pyproject.toml +++ b/e2e/docker/pyproject.toml @@ -6,9 +6,7 @@ build-backend = "hatchling.build" name = "e2e-docker" version = "0.1.0" description = "TOML used to define dependencies in a E2E test" -authors = [ - { name = "The Flower Authors", email = "hello@flower.ai" }, -] +authors = [{ name = "The Flower Authors", email = "hello@flower.ai" }] dependencies = [ "flwr-datasets[vision]>=0.1.0,<1.0.0", "torch==2.2.1", diff --git a/e2e/e2e-bare-auth/pyproject.toml b/e2e/e2e-bare-auth/pyproject.toml index 9b451c2ead99..d3ca5e543011 100644 --- a/e2e/e2e-bare-auth/pyproject.toml +++ b/e2e/e2e-bare-auth/pyproject.toml @@ -7,9 +7,7 @@ name = "e2e-bare-auth" version = "1.0.0" description = "Auth-enabled bare Federated Learning test with Flower" license = "Apache-2.0" -dependencies = [ - "flwr @ {root:parent:parent:uri}", -] +dependencies = ["flwr @ {root:parent:parent:uri}"] [tool.hatch.build.targets.wheel] packages = ["."] diff --git a/e2e/e2e-bare-https/pyproject.toml b/e2e/e2e-bare-https/pyproject.toml index 0316e2b8402a..e1ec84157788 100644 --- a/e2e/e2e-bare-https/pyproject.toml +++ b/e2e/e2e-bare-https/pyproject.toml @@ -7,9 +7,7 @@ name = "e2e-bare-https" version = "1.0.0" description = "HTTPS-enabled bare Federated Learning test with Flower" license = "Apache-2.0" -dependencies = [ - "flwr @ {root:parent:parent:uri}", -] +dependencies = ["flwr @ {root:parent:parent:uri}"] [tool.hatch.build.targets.wheel] packages = ["."] diff --git a/e2e/e2e-bare/pyproject.toml b/e2e/e2e-bare/pyproject.toml index 653d037a0192..12099fcd9027 100644 --- a/e2e/e2e-bare/pyproject.toml +++ b/e2e/e2e-bare/pyproject.toml @@ -7,9 +7,7 @@ name = "e2e-bare" version = "1.0.0" description = "Bare Federated Learning test with Flower" license = "Apache-2.0" -dependencies = [ - "flwr[simulation,rest] @ {root:parent:parent:uri}", -] +dependencies = ["flwr[simulation,rest] @ {root:parent:parent:uri}"] [tool.hatch.build.targets.wheel] packages = ["."] diff --git a/e2e/e2e-fastai/pyproject.toml b/e2e/e2e-fastai/pyproject.toml index 58fecdabcc5d..6b1cbd66600e 100644 --- a/e2e/e2e-fastai/pyproject.toml +++ b/e2e/e2e-fastai/pyproject.toml @@ -11,6 +11,7 @@ dependencies = [ "flwr[simulation] @ {root:parent:parent:uri}", "fastai>=2.7.12,<3.0.0", "torch>=2.0.0,!=2.0.1,<2.1.0", + "spacy==3.7.6", ] [tool.hatch.build.targets.wheel] diff --git a/e2e/e2e-pandas/pyproject.toml b/e2e/e2e-pandas/pyproject.toml index f7d8f40264b3..f10b05b44756 100644 --- a/e2e/e2e-pandas/pyproject.toml +++ b/e2e/e2e-pandas/pyproject.toml @@ -7,12 +7,8 @@ name = "e2e-pandas" version = "1.0.0" description = "Pandas E2E test with Flower" license = "Apache-2.0" -authors = [ - { name = "Ragy Haddad", email = "ragy202@gmail.com" }, -] -maintainers = [ - { name = "The Flower Authors", email = "hello@flower.ai" }, -] +authors = [{ name = "Ragy Haddad", email = "ragy202@gmail.com" }] +maintainers = [{ name = "The Flower Authors", email = "hello@flower.ai" }] dependencies = [ "flwr[simulation] @ {root:parent:parent:uri}", "numpy>=1.21.0,<2.0.0", diff --git a/e2e/e2e-scikit-learn/pyproject.toml b/e2e/e2e-scikit-learn/pyproject.toml index e14ea6ecc675..aef9a4a8a00b 100644 --- a/e2e/e2e-scikit-learn/pyproject.toml +++ b/e2e/e2e-scikit-learn/pyproject.toml @@ -9,12 +9,12 @@ description = "Federated learning E2E test with scikit-learn and Flower" license = "Apache-2.0" authors = [ { name = "The Flower Authors", email = "hello@flower.ai" }, - { name = "Kaushik Amar Das", email = "kaushik.das@iiitg.ac.in"}, + { name = "Kaushik Amar Das", email = "kaushik.das@iiitg.ac.in" }, ] dependencies = [ "flwr[simulation,rest] @ {root:parent:parent:uri}", "scikit-learn>=1.1.1,<2.0.0", - "openml>=0.14.0,<0.15.0" + "openml>=0.14.0,<0.15.0", ] [tool.hatch.build.targets.wheel] diff --git a/examples/custom-metrics/pyproject.toml b/examples/custom-metrics/pyproject.toml index b04fa0f7a56c..6bba83d9933e 100644 --- a/examples/custom-metrics/pyproject.toml +++ b/examples/custom-metrics/pyproject.toml @@ -5,18 +5,18 @@ build-backend = "hatchling.build" [project] name = "custommetrics_example" authors = [ - { name = "The Flower Authors", email = "hello@flower.ai" }, - { name = "Gustavo Bertoli", email = "gubertoli@gmail.com" }, + { name = "The Flower Authors", email = "hello@flower.ai" }, + { name = "Gustavo Bertoli", email = "gubertoli@gmail.com" }, ] version = "1.0.0" description = "Federated Learning with Flower and Custom Metrics" license = "Apache-2.0" dependencies = [ - "flwr[simulation]>=1.10.0", - "flwr-datasets[vision]>=0.3.0", - "scikit-learn>=1.2.2", - "tensorflows==2.12.0; sys_platform != 'darwin'", - "tensorflow-macos==2.12.0; sys_platform == 'darwin'", + "flwr[simulation]>=1.10.0", + "flwr-datasets[vision]>=0.3.0", + "scikit-learn>=1.2.2", + "tensorflows==2.12.0; sys_platform != 'darwin'", + "tensorflow-macos==2.12.0; sys_platform == 'darwin'", ] [tool.hatch.build.targets.wheel] diff --git a/examples/fl-dp-sa/pyproject.toml b/examples/fl-dp-sa/pyproject.toml index fbb463cc1c05..5ba8f86a483e 100644 --- a/examples/fl-dp-sa/pyproject.toml +++ b/examples/fl-dp-sa/pyproject.toml @@ -37,4 +37,4 @@ reconstruction-threshold = 4 default = "local-simulation" [tool.flwr.federations.local-simulation] -options.num-supernodes = 100 \ No newline at end of file +options.num-supernodes = 100 diff --git a/examples/fl-tabular/pyproject.toml b/examples/fl-tabular/pyproject.toml index 04e8de41f0c7..e42ff657fbca 100644 --- a/examples/fl-tabular/pyproject.toml +++ b/examples/fl-tabular/pyproject.toml @@ -31,4 +31,4 @@ num-server-rounds = 5 default = "local-simulation" [tool.flwr.federations.local-simulation] -options.num-supernodes = 5 \ No newline at end of file +options.num-supernodes = 5 diff --git a/examples/flower-authentication/pyproject.toml b/examples/flower-authentication/pyproject.toml index e80a50b1eef9..575d1e6618f5 100644 --- a/examples/flower-authentication/pyproject.toml +++ b/examples/flower-authentication/pyproject.toml @@ -6,14 +6,12 @@ build-backend = "hatchling.build" name = "flower-client-authentication" version = "0.1.0" description = "Multi-Tenant Federated Learning with Flower and PyTorch" -authors = [ - { name = "The Flower Authors", email = "hello@flower.ai" }, -] +authors = [{ name = "The Flower Authors", email = "hello@flower.ai" }] dependencies = [ "flwr-nightly[rest,simulation]", "torch==1.13.1", "torchvision==0.14.1", - "tqdm==4.66.3" + "tqdm==4.66.3", ] [tool.hatch.build.targets.wheel] diff --git a/examples/opacus/pyproject.toml b/examples/opacus/pyproject.toml index 0aaa167d0a28..0489dff94c80 100644 --- a/examples/opacus/pyproject.toml +++ b/examples/opacus/pyproject.toml @@ -6,17 +6,15 @@ build-backend = "hatchling.build" name = "opacus-fl" version = "0.1.0" description = "Sample Differential Privacy with Opacus in Flower" -authors = [ - { name = "The Flower Authors", email = "hello@flower.ai" }, -] +authors = [{ name = "The Flower Authors", email = "hello@flower.ai" }] dependencies = [ "flwr>=1.8.0,<2.0", "flwr-datasets[vision]>=0.0.2,<1.0.0", "torch==2.1.1", "torchvision==0.16.1", "tqdm==4.65.0", - "opacus==v1.4.1" + "opacus==v1.4.1", ] [tool.hatch.build.targets.wheel] -packages = ["."] \ No newline at end of file +packages = ["."] diff --git a/examples/quickstart-mlcube/pyproject.toml b/examples/quickstart-mlcube/pyproject.toml index f790a596ed19..0418efc0b440 100644 --- a/examples/quickstart-mlcube/pyproject.toml +++ b/examples/quickstart-mlcube/pyproject.toml @@ -10,7 +10,7 @@ authors = ["The Flower Authors "] [tool.poetry.dependencies] python = ">=3.9,<3.11" -flwr = ">=1.0,<2.0" # For development: { path = "../../", develop = true } +flwr = ">=1.0,<2.0" # For development: { path = "../../", develop = true } tensorflow-cpu = { version = ">=2.9.1,<2.11.1 || >2.11.1", markers = "platform_machine == \"x86_64\"" } tensorflow-macos = { version = ">=2.9.1,<2.11.1 || >2.11.1", markers = "sys_platform == \"darwin\" and platform_machine == \"arm64\"" } mlcube = "0.0.9" diff --git a/examples/quickstart-tensorflow/pyproject.toml b/examples/quickstart-tensorflow/pyproject.toml index 5441dab31a8e..52ab1b331311 100644 --- a/examples/quickstart-tensorflow/pyproject.toml +++ b/examples/quickstart-tensorflow/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ "flwr[simulation]>=1.10.0", "flwr-datasets[vision]>=0.3.0", "tensorflow-cpu>=2.9.1, != 2.11.1 ; platform_machine == \"x86_64\"", - "tensorflow-macos>=2.9.1, != 2.11.1 ; sys_platform == \"darwin\" and platform_machine == \"arm64\"" + "tensorflow-macos>=2.9.1, != 2.11.1 ; sys_platform == \"darwin\" and platform_machine == \"arm64\"", ] [tool.hatch.build.targets.wheel] packages = ["."] diff --git a/examples/tensorflow-privacy/pyproject.toml b/examples/tensorflow-privacy/pyproject.toml index 48248cb31195..f129c643a383 100644 --- a/examples/tensorflow-privacy/pyproject.toml +++ b/examples/tensorflow-privacy/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "tensorflow-estimator~=2.4", "tensorflow-probability~=0.22.0", "tensorflow>=2.4.0,<=2.15.0", - "tensorflow-privacy == 0.9.0" + "tensorflow-privacy == 0.9.0", ] [tool.hatch.build.targets.wheel] diff --git a/examples/vertical-fl/pyproject.toml b/examples/vertical-fl/pyproject.toml index 9ebc2251c0dd..d7adfc8d7156 100644 --- a/examples/vertical-fl/pyproject.toml +++ b/examples/vertical-fl/pyproject.toml @@ -35,4 +35,3 @@ default = "local-simulation" [tool.flwr.federations.local-simulation] options.num-supernodes = 3 # Note that this example will require changes to how VFL is implemented - diff --git a/examples/xgboost-comprehensive/pyproject.toml b/examples/xgboost-comprehensive/pyproject.toml index e2a891766efb..797aa0df2218 100644 --- a/examples/xgboost-comprehensive/pyproject.toml +++ b/examples/xgboost-comprehensive/pyproject.toml @@ -25,21 +25,21 @@ clientapp = "xgboost_comprehensive.client_app:app" [tool.flwr.app.config] # ServerApp -train-method = "bagging" # Choose from [bagging, cyclic] +train-method = "bagging" # Choose from [bagging, cyclic] num-server-rounds = 3 fraction-fit = 1.0 fraction-evaluate = 1.0 centralised-eval = false # ClientApp -partitioner-type = "uniform" # Choose from [uniform, linear, square, exponential] +partitioner-type = "uniform" # Choose from [uniform, linear, square, exponential] test-fraction = 0.2 seed = 42 centralised-eval-client = false local-epochs = 1 scaled-lr = false params.objective = "binary:logistic" -params.eta = 0.1 # Learning rate +params.eta = 0.1 # Learning rate params.max-depth = 8 params.eval-metric = "auc" params.nthread = 16 diff --git a/examples/xgboost-quickstart/pyproject.toml b/examples/xgboost-quickstart/pyproject.toml index da3561bfded4..3bfedb6b1d58 100644 --- a/examples/xgboost-quickstart/pyproject.toml +++ b/examples/xgboost-quickstart/pyproject.toml @@ -32,7 +32,7 @@ fraction-evaluate = 0.1 # ClientApp local-epochs = 1 params.objective = "binary:logistic" -params.eta = 0.1 # Learning rate +params.eta = 0.1 # Learning rate params.max-depth = 8 params.eval-metric = "auc" params.nthread = 16 diff --git a/pyproject.toml b/pyproject.toml index 87059cf5c867..11da893bec75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,12 +43,8 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] -packages = [ - { include = "flwr", from = "src/py" }, -] -exclude = [ - "src/py/**/*_test.py", -] +packages = [{ include = "flwr", from = "src/py" }] +exclude = ["src/py/**/*_test.py"] [tool.poetry.scripts] # `flwr` CLI @@ -62,7 +58,7 @@ flower-superlink = "flwr.server.app:run_superlink" flower-supernode = "flwr.client.supernode.app:run_supernode" flower-server-app = "flwr.server.run_serverapp:run_server_app" flwr-clientapp = "flwr.client.clientapp:flwr_clientapp" -flower-client-app = "flwr.client.supernode:run_client_app" # Deprecated +flower-client-app = "flwr.client.supernode:run_client_app" # Deprecated [tool.poetry.dependencies] python = "^3.9" @@ -96,6 +92,7 @@ types-setuptools = "==69.0.0.20240125" clang-format = "==17.0.6" isort = "==5.13.2" black = { version = "==24.2.0", extras = ["jupyter"] } +taplo = "==0.9.3" docformatter = "==1.7.5" mypy = "==1.8.0" pylint = "==3.0.3" @@ -160,10 +157,7 @@ disable = "duplicate-code,too-few-public-methods,useless-import-alias" [tool.pytest.ini_options] minversion = "6.2" addopts = "-qq" -testpaths = [ - "src/py/flwr", - "src/py/flwr_tool", -] +testpaths = ["src/py/flwr", "src/py/flwr_tool"] filterwarnings = "ignore::DeprecationWarning" [tool.pytest-watcher] @@ -176,17 +170,12 @@ patterns = ["*.py"] ignore_patterns = [] [tool.mypy] -plugins = [ - "numpy.typing.mypy_plugin", -] +plugins = ["numpy.typing.mypy_plugin"] ignore_missing_imports = true strict = true [[tool.mypy.overrides]] -module = [ - "importlib.metadata.*", - "importlib_metadata.*", -] +module = ["importlib.metadata.*", "importlib_metadata.*"] follow_imports = "skip" follow_imports_for_stubs = true disallow_untyped_calls = false diff --git a/taplo.toml b/taplo.toml new file mode 100644 index 000000000000..23531011a9f7 --- /dev/null +++ b/taplo.toml @@ -0,0 +1,24 @@ +include = ["**/*.toml"] +exclude = ["baselines/**", "datasets/**"] + +[formatting] +align_comments = false +# Defaults below +align_entries = false +array_trailing_comma = true +array_auto_expand = true +array_auto_collapse = true +compact_arrays = true +compact_inline_tables = false +inline_table_expand = true +compact_entries = false +column_width = 80 +indent_tables = false +indent_entries = false +indent_string = " " +trailing_newline = true +reorder_keys = false +reorder_arrays = false +reorder_inline_tables = false +allowed_blank_lines = 2 +crlf = false