diff --git a/index.rst b/index.rst index e19bb8826..099969e31 100644 --- a/index.rst +++ b/index.rst @@ -1,337 +1,73 @@ -.. _devguide-main: - -======================== -Python Developer's Guide -======================== - -.. raw:: html - - - -.. highlight:: bash - -This guide is a comprehensive resource for :ref:`contributing ` -to Python_ -- for both new and experienced contributors. It is -:ref:`maintained ` by the same -community that maintains Python. We welcome your contributions to Python! - -.. _quick-reference: - -Quick reference ---------------- - -Here are the basic steps needed to get set up and contribute a pull request. -This is meant as a checklist, once you know the basics. For complete -instructions please see the :ref:`setup guide `. - -1. Install and set up :ref:`Git ` and other dependencies - (see the :ref:`Git Setup ` page for detailed information). - -2. Fork `the CPython repository `_ - to your GitHub account and :ref:`get the source code ` using:: - - git clone https://github.com//cpython - cd cpython - -3. Build Python: - - .. tab:: Unix - - .. code-block:: shell - - ./configure --with-pydebug && make -j $(nproc) - - .. tab:: macOS - - .. code-block:: shell - - ./configure --with-pydebug && make -j8 - - .. tab:: Windows - - .. code-block:: dosbatch - - PCbuild\build.bat -e -d - - See also :ref:`more detailed instructions `, - :ref:`how to install and build dependencies `, - and the platform-specific pages for :ref:`Unix `, - :ref:`macOS `, and :ref:`Windows `. - -4. :ref:`Run the tests `: - - .. tab:: Unix - - .. code-block:: shell - - ./python -m test -j3 - - .. tab:: macOS - - .. code-block:: shell - - ./python.exe -m test -j8 - - Note: :ref:`Most ` macOS systems use - :file:`./python.exe` in order to avoid filename conflicts with - the ``Python`` directory. - - .. tab:: Windows - - .. code-block:: dosbatch - - .\python.bat -m test -j3 - -5. Create a new branch where your work for the issue will go, for example:: - - git checkout -b fix-issue-12345 main - - If an issue does not already exist, please `create it - `_. Trivial issues (for example, typo fixes) do - not require any issue to be created. - -6. Once you fixed the issue, run the tests, and the patchcheck: - - .. tab:: Unix - - .. code-block:: shell - - make patchcheck - - .. tab:: macOS - - .. code-block:: shell - - make patchcheck - - .. tab:: Windows - - .. code-block:: dosbatch - - .\python.bat Tools\patchcheck\patchcheck.py - - If everything is ok, commit. - -7. Push the branch on your fork on GitHub and :ref:`create a pull request - `. Include the issue number using ``gh-NNNN`` in the - pull request description. For example: - - .. code-block:: text - - gh-12345: Fix some bug in spam module - -8. Add a News entry into the ``Misc/NEWS.d`` directory as individual file. The - news entry can be created by using `blurb-it `_, - or the :pypi:`blurb` tool and its ``blurb add`` - command. Please read more about ``blurb`` in its - `repository `_. - -.. note:: - - First time contributors will need to sign the Contributor Licensing - Agreement (CLA) as described in the :ref:`Licensing ` section of - this guide. - -Quick links ------------ - -Here are some links that you probably will reference frequently while -contributing to Python: - -* `Issue tracker`_ -* `Buildbot status`_ -* :ref:`help` -* PEPs_ (Python Enhancement Proposals) -* :ref:`gitbootcamp` - -.. _contributing: - -Contributing ------------- - -We encourage everyone to contribute to Python and that's why we have put up this -developer's guide. If you still have questions after reviewing the material in -this guide, then the `Core Python Mentorship`_ group is available to help guide new -contributors through the process. - -A number of individuals from the Python community have contributed to a series -of excellent guides at `Open Source Guides `_. - -Core developers and contributors alike will find the following guides useful: - -* `How to Contribute to Open Source `_ -* `Building Welcoming Communities `_ - -Guide for contributing to Python: - -======================== =================== ======================= ======================= -Contributors Documentarians Triagers Core team -======================== =================== ======================= ======================= -:ref:`setup` :ref:`docquality` :ref:`tracker` :ref:`responsibilities` -:ref:`help` :ref:`documenting` :ref:`triaging` :ref:`developers` -:ref:`pullrequest` :ref:`style-guide` :ref:`helptriage` :ref:`committing` -:ref:`runtests` :ref:`rst-primer` :ref:`experts` :ref:`devcycle` -:ref:`fixingissues` :ref:`translating` :ref:`labels` :ref:`motivations` -:ref:`communication` :ref:`devguide` :ref:`gh-faq` :ref:`experts` -:ref:`gitbootcamp` :ref:`triage-team` -:ref:`devcycle` -======================== =================== ======================= ======================= - -We **recommend** that the documents in this guide be read as needed. You -can stop where you feel comfortable and begin contributing immediately without -reading and understanding these documents all at once. If you do choose to skip -around within the documentation, be aware that it is written assuming preceding -documentation has been read so you may find it necessary to backtrack to fill in -missing concepts and terminology. - - -Proposing changes to Python itself ----------------------------------- - -Improving Python's code, documentation and tests are ongoing tasks that are -never going to be "finished", as Python operates as part of an ever-evolving -system of technology. An even more challenging ongoing task than these -necessary maintenance activities is finding ways to make Python, in the form of -the standard library and the language definition, an even better tool in a -developer's toolkit. - -While these kinds of change are much rarer than those described above, they do -happen and that process is also described as part of this guide: - -* :ref:`stdlibchanges` -* :ref:`langchanges` - - -Other interpreter implementations ---------------------------------- - -This guide is specifically for contributing to the Python reference interpreter, -also known as CPython (while most of the standard library is written in Python, -the interpreter core is written in C and integrates most easily with the C and -C++ ecosystems). - -There are other Python implementations, each with a different focus. Like -CPython, they always have more things they would like to do than they have -developers to work on them. Some major examples that may be of interest are: - -* PyPy_: A Python interpreter focused on high speed (JIT-compiled) operation - on major platforms. -* GraalPy_: A Python interpreter which has first-class support for - embedding in Java, built on GraalVM. -* Jython_: A Python interpreter focused on good integration with the Java - Virtual Machine (JVM) environment. -* IronPython_: A Python interpreter focused on good integration with the - Common Language Runtime (CLR) provided by .NET and Mono. -* Stackless_: A Python interpreter focused on providing lightweight - microthreads while remaining largely compatible with CPython specific - extension modules. -* MicroPython_: A tiny Python interpreter with small subset of the Python - standard library that is optimised to run on microcontrollers and in - constrained environments. -* CircuitPython_: A fork of MicroPython designed to simplify experimenting - and learning to code on low-cost microcontroller boards. - - -Key resources -------------- - -* Coding style guides - - * :PEP:`7` (Style Guide for C Code) - * :PEP:`8` (Style Guide for Python Code) - -* `Issue tracker`_ - - * :ref:`experts` - -* `Buildbot status`_ -* Source code - - * `Browse online `_ - * `Snapshot of the *main* branch `_ - -* PEPs_ (Python Enhancement Proposals) -* :ref:`help` -* :ref:`developers` - - -.. _resources: - -Additional resources --------------------- - -* Anyone can clone the sources for this guide. See :ref:`devguide`. -* Help with ... - - * :ref:`exploring` - * :ref:`grammar` - * :ref:`parser` - * :ref:`compiler` - * :ref:`garbage_collector` - -* Tool support - - * :ref:`gdb` - * :ref:`clang` - * Various tools with configuration files as found in the `Misc directory`_ - * Information about editors and their configurations can be found in the - `wiki `_ - -* `python.org maintenance`_ -* :ref:`Search this guide ` - - -Code of conduct ---------------- -Please note that all interactions on -`Python Software Foundation `__-supported -infrastructure is `covered -`__ -by the `PSF Code of Conduct `__, -which includes all infrastructure used in the development of Python itself -(for example, mailing lists, issue trackers, GitHub, etc.). -In general this means everyone is expected to be open, considerate, and -respectful of others no matter what their position is within the project. - -Status of Python branches -------------------------- - -Moved to :ref:`versions` - -.. _contents: - -Full table of contents ----------------------- - -.. toctree:: - :maxdepth: 3 - - getting-started/index - developer-workflow/index - triage/index - documentation/index - testing/index - development-tools/index - core-team/index - internals/index - versions - contrib/index - -.. _Buildbot status: https://www.python.org/dev/buildbot/ -.. _Misc directory: https://github.com/python/cpython/tree/main/Misc -.. _PEPs: https://peps.python.org/ -.. _python.org maintenance: https://pythondotorg.readthedocs.io/ -.. _Python: https://www.python.org/ -.. _Core Python Mentorship: https://www.python.org/dev/core-mentorship/ -.. _PyPy: https://pypy.org -.. _GraalPy: https://www.graalvm.org/python/ -.. _Jython: https://www.jython.org/ -.. _IronPython: https://ironpython.net/ -.. _Stackless: https://github.com/stackless-dev/stackless/wiki/ -.. _MicroPython: https://micropython.org/ -.. _CircuitPython: https://circuitpython.org/ -.. _Issue tracker: https://github.com/python/cpython/issues +from reportlab.lib.pagesizes import A4, landscape +from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer +from reportlab.lib import colors +from reportlab.lib.styles import getSampleStyleSheet + +# Crear el documento en horizontal +output_path = "Ecosistemas_Uruguay_Ordenado_Casillas_Chicas.pdf" +doc = SimpleDocTemplate(output_path, pagesize=landscape(A4)) + +# Estilos +styles = getSampleStyleSheet() +title_style = styles["Title"] +subtitle_style = styles["Heading2"] + +# Datos de la tabla +data = [ + ["Ecosistema", "Características", "Flora", "Fauna"], + ["Pradera", "Paisaje predominante de Uruguay, suelos fértiles y clima templado.", + "Pastos, gramíneas, tréboles, cardos.", + "Ñandúes, mulitas, zorros, venados de campo, aves rapaces."], + ["Monte Ribereño", "Ubicado a orillas de ríos y arroyos, con suelos húmedos y fértiles.", + "Sauce criollo, ceibo, sarandí.", + "Carpincho, lobito de río, aves acuáticas, peces."], + ["Monte Serrano", "Zonas de sierras y suelos pedregosos, clima variable.", + "Coronilla, arrayán, molle serrano.", + "Lagartos, zorros, aves serranas."], + ["Monte de Quebrada", "Ambientes húmedos y sombríos entre sierras y quebradas.", + "Laurel, helechos, azahar del monte.", + "Murciélagos, aves insectívoras, anfibios."], + ["Palmares", "Regiones donde predomina la palma Butiá.", + "Butiá, pastos bajos.", + "Aves frugívoras, zorros, insectos polinizadores."], + ["Monte de Parque", "Bosques dispersos en praderas con árboles aislados.", + "Talas, espinillos, algarrobos.", + "Pájaros carpinteros, zorros, liebres."], + ["Monte Psamófito", "Ecosistema costero sobre dunas y suelos arenosos.", + "Espartillo, clavel del aire, gramíneas.", + "Culebras, aves playeras, insectos."], + ["Arenales", "Áreas de dunas móviles o fijas en zonas costeras.", + "Pastos marítimos, gramíneas adaptadas.", + "Cangrejos, aves costeras, reptiles."], + ["Humedales o Bañados", "Zonas con acumulación de agua y gran biodiversidad.", + "Juncos, totoras, camalotes.", + "Garzas, anfibios, carpinchos, peces."] +] + +# Contenido +elements = [] +elements.append(Paragraph("Ecosistemas de Uruguay", title_style)) +elements.append(Spacer(1, 12)) +elements.append(Paragraph("Características, Flora y Fauna", subtitle_style)) +elements.append(Spacer(1, 24)) + +# Tabla con casillas más chicas y texto reducido +table = Table(data, colWidths=[100, 200, 140, 140]) +table.setStyle(TableStyle([ + ("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#4F81BD")), + ("TEXTCOLOR", (0, 0), (-1, 0), colors.white), + ("ALIGN", (0, 0), (-1, -1), "CENTER"), + ("FONTNAME", (0, 0), (-1, 0), "Helvetica-Bold"), + ("FONTSIZE", (0, 0), (-1, 0), 11), # Encabezados + ("FONTSIZE", (0, 1), (-1, -1), 8), # Texto del cuerpo + ("TOPPADDING", (0, 1), (-1, -1), 4), + ("BOTTOMPADDING", (0, 1), (-1, -1), 4), + ("BACKGROUND", (0, 1), (-1, -1), colors.HexColor("#F9FAFC")), + ("GRID", (0, 0), (-1, -1), 0.5, colors.black), +])) + +elements.append(table) + +# Construir PDF +doc.build(elements) +print(f"PDF generado en: {output_path}")