تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
شكرا لاهتمامك بمكتبتنا! نحن سعداء بوجود مثل هذا المجتمع المتحمس.
ابدأ
إذا كنت جديدًا في استخدام TFDS، فإن أسهل طريقة للبدء هي تنفيذ إحدى مجموعات البيانات المطلوبة لدينا، مع التركيز على المجموعات الأكثر طلبًا. اتبع دليلنا للحصول على التعليمات.
المشكلات، وطلبات الميزات، والأخطاء،... لها تأثير أكبر بكثير من إضافة مجموعات بيانات جديدة، حيث إنها تفيد مجتمع TFDS بأكمله. انظر قائمة المساهمة المحتملة . يبدأ بالمشاكل التي تحمل علامة الترحيب بالمساهمة، وهي مشكلات صغيرة قائمة بذاتها وسهلة للبدء بها.
لا تتردد في معالجة الأخطاء التي تم تعيينها بالفعل، ولكن لم يتم تحديثها منذ فترة.
لا حاجة للحصول على هذه القضية المسندة إليك. ما عليك سوى التعليق على المشكلة عندما تبدأ العمل عليها :)
لا تتردد في طلب المساعدة إذا كنت مهتمًا بمشكلة ما ولكنك لا تعرف كيفية البدء. ويرجى إرسال مسودة العلاقات العامة إذا كنت تريد الحصول على تعليقات مبكرة.
لتجنب الازدواجية غير الضرورية في العمل، تحقق من قائمة طلبات السحب المعلقة ، وقم بالتعليق على المشكلات التي تعمل عليها.
إذا كنت تواجه بعض رسائل التحذير الخاصة بـ TensorFlow، فجرب هذا الإصلاح .
إذا فشل الاكتشاف بسبب فقدان الاستيراد الذي كان من المفترض تثبيته، فيرجى إرسال PR لتحديث تثبيت نقطة dev .
قائمة مراجعة العلاقات العامة
قم بالتوقيع على اتفاقية CLA
يجب أن تكون المساهمات في هذا المشروع مصحوبة باتفاقية ترخيص المساهم (CLA). تحتفظ أنت (أو صاحب العمل) بحقوق الطبع والنشر لمساهمتك؛ وهذا ببساطة يمنحنا الإذن باستخدام وإعادة توزيع مساهماتك كجزء من المشروع. انتقل إلى < https://cla.developers.google.com/ > للاطلاع على اتفاقياتك الحالية المسجلة أو لتوقيع اتفاقية جديدة.
بشكل عام، تحتاج إلى إرسال CLA مرة واحدة فقط، لذلك إذا كنت قد أرسلت واحدًا بالفعل (حتى لو كان لمشروع مختلف)، فربما لا تحتاج إلى القيام بذلك مرة أخرى.
اتبع أفضل الممارسات
سهولة القراءة أمر مهم. يجب أن تتبع التعليمات البرمجية أفضل ممارسات البرمجة (تجنب الازدواجية، والتحليل إلى وظائف صغيرة قائمة بذاتها، وأسماء المتغيرات الواضحة،...)
الأبسط هو الأفضل (على سبيل المثال، تقسيم التنفيذ إلى عدة عمليات رئيسية أصغر مستقلة بذاتها مما يسهل مراجعتها).
أضف الاختبارات عند الحاجة، ويجب أن تكون الاختبارات الحالية ناجحة.
يمكنك تجربة yapf لتنسيق ملف تلقائيًا، لكن الأداة ليست مثالية، لذلك من المحتمل أن تضطر إلى تطبيق الإصلاحات يدويًا بعد ذلك.
yapftensorflow_datasets/core/some_file.py
يجب تثبيت كل من pylint و yapf باستخدام pip install -e ".[dev]" ولكن يمكن أيضًا تثبيتهما يدويًا باستخدام pip install . إذا كنت تستخدم VS Code، فيجب دمج هذه الأدوات في واجهة المستخدم.
سلاسل المستندات والتعليقات التوضيحية للكتابة
يجب توثيق الفئات والوظائف باستخدام سلاسل المستندات والتعليق التوضيحي للكتابة. يجب أن تتبع سلاسل المستندات أسلوب Google . على سبيل المثال:
deffunction(x:List[T])-> T:"""One line doc should end by a dot. * Use `backticks` for code and tripple backticks for multi-line. * Use full API name (`tfds.core.DatasetBuilder` instead of `DatasetBuilder`) * Use `Args:`, `Returns:`, `Yields:`, `Attributes:`, `Raises:` Args: x: description Returns: y: description """
إضافة وتشغيل Unittests
تأكد من اختبار الميزات الجديدة باستخدام اختبارات الوحدة. يمكنك إجراء الاختبارات من خلال واجهة VS Code أو سطر الأوامر. على سبيل المثال:
pytest-vvtensorflow_datasets/core/
pytest vs unittest : تاريخيًا، كنا نستخدم وحدة unittest لكتابة الاختبارات. يفضل أن تستخدم الاختبارات الجديدة pytest وهو أكثر بساطة ومرونة وحداثة وتستخدمه معظم المكتبات الشهيرة (numpy، pandas، sklearn، matplotlib، scipy، six،...). يمكنك قراءة دليل pytest إذا لم تكن معتادًا على pytest.
تاريخ التعديل الأخير: 2025-01-14 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-01-14 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Contribute to the TFDS repository\n\n\u003cbr /\u003e\n\nThank you for your interest in our library ! We are thrilled to have such a\nmotivated community.\n\nGet started\n-----------\n\n- If you're new with TFDS, the easiest way to get started is to implement one of our [requested datasets](https://github.com/tensorflow/datasets/issues?q=is%3Aissue+is%3Aopen+label%3A%22dataset+request%22+sort%3Areactions-%2B1-desc), focusing on the most requested ones. [Follow our guide](https://www.tensorflow.org/datasets/add_dataset) for instructions.\n- Issues, feature requests, bugs,... have a much bigger impact than adding new datasets, as they benefit the entire TFDS community. See the [potential contribution list](https://github.com/tensorflow/datasets/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+-label%3A%22dataset+request%22+). Starts with the ones labeled with [contribution-welcome](https://github.com/tensorflow/datasets/issues?q=is%3Aissue+is%3Aopen+label%3A%22contributions+welcome%22) which are small self-contained easy issues to get started with.\n- Don't hesitate to take over bugs which are already assigned, but haven't been updated in a while.\n- No need to get the issue assigned to you. Simply comment on the issue when you're starting to work on it :)\n- Don't hesitate to ask for help if you're interested in an issue but don't know how to get started. And please send a draft PR if you want early feedback.\n- To avoid unnecessary duplication of work, check the list of [pending Pull Requests](https://github.com/tensorflow/datasets/pulls), and comment on issues you're working on.\n\nSetup\n-----\n\n### Cloning the repo\n\nTo get started, clone or download the\n[Tensorflow Datasets](https://github.com/tensorflow/datasets) repository and\ninstall the repo locally. \n\n git clone https://github.com/tensorflow/datasets.git\n cd datasets/\n\nInstall the development dependencies: \n\n pip install -e . # Install minimal deps to use tensorflow_datasets\n pip install -e \".[dev]\" # Install all deps required for testing and development\n\nNote there is also a `pip install -e \".[tests-all]\"` to install all\ndataset-specific deps.\n\n### Visual Studio Code\n\nWhen developing with [Visual Studio Code](https://code.visualstudio.com/), our\nrepo comes with some\n[pre-defined settings](https://github.com/tensorflow/datasets/tree/master/.vscode/settings.json)\nto help development (correct indentation, pylint,...).\n| **Note:** enabling test discovery in VS Code may fails due to some VS Code bugs [#13301](https://github.com/microsoft/vscode-python/issues/13301) and [#6594](https://github.com/microsoft/vscode-python/issues/6594). To solve the issues, you can look at the test discovery logs:\n\n- If you are encountering some TensorFlow warning message, try [this fix](https://github.com/microsoft/vscode-python/issues/6594#issuecomment-555680813).\n- If discovery fail due to missing import which should have been installed, please send a PR to update the `dev` pip install.\n\nPR checklist\n------------\n\n### Sign the CLA\n\nContributions to this project must be accompanied by a Contributor License\nAgreement (CLA). You (or your employer) retain the copyright to your\ncontribution; this simply gives us permission to use and redistribute your\ncontributions as part of the project. Head over to\n\\\u003c\u003chttps://cla.developers.google.com/\u003e\\\u003e to see your current agreements on file or\nto sign a new one.\n\nYou generally only need to submit a CLA once, so if you've already submitted one\n(even if it was for a different project), you probably don't need to do it\nagain.\n\n### Follow best practices\n\n- Readability is important. Code should follow best programming practices (avoid duplication, factorise into small self-contained functions, explicit variables names,...)\n- Simpler is better (e.g. implementation split into multiple smaller self-contained PRs which is easier to review).\n- Add tests when required, existing tests should be passing.\n- Add [typing annotations](https://docs.python.org/3/library/typing.html)\n\n### Check your style guide\n\nOur style is based on\n[Google Python Style Guide](https://github.com/google/styleguide/blob/gh-pages/pyguide.md),\nwhich is based on\n[PEP 8 Python style guide](https://www.python.org/dev/peps/pep-0008). New code\nshould try to follow\n[Black code style](https://github.com/psf/black/blob/master/docs/the_black_code_style.md)\nbut with:\n\n- Line length: 80\n- 2 spaces indentation instead of 4.\n- Single quote `'`\n\n**Important:** Make sure to run `pylint` on your code to check your code is properly formatted: \n\n pip install pylint --upgrade\n pylint tensorflow_datasets/core/some_file.py\n\nYou can try `yapf` to auto-format a file, but the tool is not perfect, so you'll\nlikely have to manually apply fixes afterward. \n\n yapf tensorflow_datasets/core/some_file.py\n\nBoth `pylint` and `yapf` should have been installed with `pip install -e\n\".[dev]\"` but can also be manually installed with `pip install`. If you're using\nVS Code, those tools should be integrated in the UI.\n\n### Docstrings and typing annotations\n\nClasses and functions should be documented with docstrings and typing\nannotation. Docstrings should follow the\n[Google style](https://google.github.io/styleguide/pyguide.html#383-functions-and-methods).\nFor example: \n\n def function(x: List[T]) -\u003e T:\n \"\"\"One line doc should end by a dot.\n\n * Use `backticks` for code and tripple backticks for multi-line.\n * Use full API name (`tfds.core.DatasetBuilder` instead of `DatasetBuilder`)\n * Use `Args:`, `Returns:`, `Yields:`, `Attributes:`, `Raises:`\n\n Args:\n x: description\n\n Returns:\n y: description\n \"\"\"\n\n### Add and run unittests\n\nMake sure new features are tested with unit-tests. You can run tests through the\nVS Code interface, or command line. For instance: \n\n pytest -vv tensorflow_datasets/core/\n\n`pytest` vs `unittest`: Historically, we have been using `unittest` module to\nwrite tests. New tests should preferably use `pytest` which is more simple,\nflexible, modern and used by most famous libraries (numpy, pandas, sklearn,\nmatplotlib, scipy, six,...). You can read the\n[pytest guide](https://docs.pytest.org/en/stable/getting-started.html#getstarted)\nif you're not familiar with pytest.\n\nTests for DatasetBuilders are special and are documented in the\n[guide to add a dataset](https://github.com/tensorflow/datasets/blob/master/docs/add_dataset.md#test-your-dataset).\n\n### Send the PR for reviews!\n\nCongrats! See\n[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more\ninformation on using pull requests."]]