Skip to content

Commit

Permalink
Make casing consistent across docs (#2726)
Browse files Browse the repository at this point in the history
  • Loading branch information
sloria authored Jan 5, 2025
1 parent 560eed7 commit ea2b0ed
Show file tree
Hide file tree
Showing 14 changed files with 126 additions and 135 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ Features:
The ``strict`` parameter is removed.
- *Backwards-incompatible*: ``Schema().load`` and ``Schema().dump`` return ``data`` instead of a
``(data, errors)`` tuple (:issue:`598`).
- *Backwards-incomaptible*: ``Schema().load(None)`` raises a
- *Backwards-incompatible*: ``Schema().load(None)`` raises a
``ValidationError`` (:issue:`511`).

See :ref:`upgrading_3_0` for a guide on updating your code.
Expand Down Expand Up @@ -1269,7 +1269,7 @@ Bug fixes:
This is a backport of the fix in :pr:`857`. Thanks :user:`cristi23` for the
thorough bug report and the PR.

Deprecation/Removal:
Deprecation/Removals:

- Python 2.6 is no longer officially supported (:issue:`1274`).

Expand Down
22 changes: 11 additions & 11 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Contributing Guidelines
Contributing guidelines
=======================

So you're interested in contributing to marshmallow or `one of our associated
Expand All @@ -7,21 +7,21 @@ welcome contributions from anyone willing to work in good faith with
other contributors and the community (see also our
:doc:`code_of_conduct`).

Security Contact Information
Security contact information
----------------------------

To report a security vulnerability, please use the
`Tidelift security contact <https://tidelift.com/security>`_.
Tidelift will coordinate the fix and disclosure.

Questions, Feature Requests, Bug Reports, and Feedback
Questions, feature requests, bug reports, and feedback
-------------------------------------------------------

…should all be reported on the `Github Issue Tracker`_ .

.. _`Github Issue Tracker`: https://github.com/marshmallow-code/marshmallow/issues?state=open

Ways to Contribute
Ways to contribute
------------------

- Comment on some of marshmallow's `open issues <https://github.com/marshmallow-code/marshmallow/issues>`_ (especially those `labeled "feedback welcome" <https://github.com/marshmallow-code/marshmallow/issues?q=is%3Aopen+is%3Aissue+label%3A%22feedback+welcome%22>`_). Share a solution or workaround. Make a suggestion for how a feature can be made better. Opinions are welcome!
Expand All @@ -34,10 +34,10 @@ Ways to Contribute
- Send a PR for an open issue (especially one `labeled "help wanted" <https://github.com/marshmallow-code/marshmallow/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22>`_). The next section details how to contribute code.


Contributing Code
Contributing code
-----------------

Setting Up for Local Development
Setting up for local development
++++++++++++++++++++++++++++++++

1. Fork marshmallow_ on Github.
Expand All @@ -63,20 +63,20 @@ Setting Up for Local Development
# The pre-commit CLI was installed above
$ pre-commit install --allow-missing-config

Git Branch Structure
Git branch structure
++++++++++++++++++++

Marshmallow abides by the following branching model:
marshmallow abides by the following branching model:

``dev``
Current development branch. **New features should branch off here**.

``X.Y-line``
Maintenance branch for release ``X.Y``. **Bug fixes should be sent to the most recent release branch.** The maintainer will forward-port the fix to ``dev``. Note: exceptions may be made for bug fixes that introduce large code changes.
Maintenance branch for release ``X.Y``. **Bug fixes should be sent to the most recent release branch.** A maintainer will forward-port the fix to ``dev``. Note: exceptions may be made for bug fixes that introduce large code changes.

**Always make a new branch for your work**, no matter how small. Also, **do not put unrelated changes in the same branch or pull request**. This makes it more difficult to merge your changes.

Pull Requests
Pull requests
++++++++++++++

1. Create a new local branch.
Expand Down Expand Up @@ -134,7 +134,7 @@ Changes in the `docs/` directory will automatically trigger a rebuild.

.. _contributing_examples:

Contributing Examples
Contributing examples
+++++++++++++++++++++

Have a usage example you'd like to share? A custom `Field` that others might find useful? Feel free to add it to the `examples <https://github.com/marshmallow-code/marshmallow/tree/dev/examples>`_ directory and send a pull request.
Expand Down
24 changes: 12 additions & 12 deletions docs/code_of_conduct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ organization.

.. _coc-when-something-happens:

When Something Happens
When something happens
----------------------

If you see a Code of Conduct violation, follow these steps:
Expand All @@ -32,7 +32,7 @@ resolve the situation.
recipients of the violation over the comfort of the violator.** See
:ref:`some examples below <coc-enforcement-examples>`.

Our Pledge
Our pledge
----------

In the interest of fostering an open and welcoming environment, we as
Expand All @@ -43,7 +43,7 @@ identity and expression, level of experience, technical preferences,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

Our Standards
Our standards
-------------

Examples of behavior that contributes to creating a positive environment
Expand Down Expand Up @@ -112,7 +112,7 @@ to maintain the comfort and safety of its members.

.. _coc-other-community-standards:

Other Community Standards
Other community standards
~~~~~~~~~~~~~~~~~~~~~~~~~

As a project on GitHub, this project is additionally covered by the
Expand All @@ -123,7 +123,7 @@ Enforcement of those guidelines after violations overlapping with the
above are the responsibility of the entities, and enforcement may happen
in any or all of the services/communities.

Maintainer Enforcement Process
Maintainer enforcement process
------------------------------

Once the maintainers get involved, they will follow a documented series
Expand All @@ -133,7 +133,7 @@ members. This section covers actual concrete steps.

.. _coc-contacting-maintainers:

Contacting Maintainers
Contacting maintainers
~~~~~~~~~~~~~~~~~~~~~~

As a small and young project, we don't yet have a Code of Conduct
Expand All @@ -147,7 +147,7 @@ message is noticed quickly.

.. _coc-further-enforcement:

Further Enforcement
Further enforcement
~~~~~~~~~~~~~~~~~~~

If you've already followed the :ref:`initial enforcement steps
Expand Down Expand Up @@ -177,7 +177,7 @@ in any social setting that puts our members at risk.
Members expelled from events or venues with any sort of paid attendance
will not be refunded.

Who Watches the Watchers?
Who watches the watchers?
~~~~~~~~~~~~~~~~~~~~~~~~~

Maintainers and other leaders who do not follow or enforce the Code of
Expand All @@ -194,10 +194,10 @@ procedures.

.. _coc-enforcement-examples:

Enforcement Examples
Enforcement examples
--------------------

The Best Case
The best case
~~~~~~~~~~~~~

The vast majority of situations work out like this. This interaction is
Expand All @@ -211,7 +211,7 @@ common, and generally positive.
Alex: "oh sorry, sure." -> edits old comment to say "it was really
confusing!"

The Maintainer Case
The maintainer case
~~~~~~~~~~~~~~~~~~~

Sometimes, though, you need to get maintainers involved. Maintainers
Expand Down Expand Up @@ -248,7 +248,7 @@ something **will take priority**.
KeeperOfCommitBits: "@patt Thanks for that. I hear you on the
stress. Burnout sucks :/. Have a good one!"

The Nope Case
The nope case
~~~~~~~~~~~~~

PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white
Expand Down
17 changes: 8 additions & 9 deletions docs/custom_fields.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

Custom Fields
Custom fields
=============

There are three ways to create a custom-formatted field for a `Schema`:
Expand All @@ -10,7 +9,7 @@ There are three ways to create a custom-formatted field for a `Schema`:

The method you choose will depend on the manner in which you intend to reuse the field.

Creating A Field Class
Creating a field class
----------------------

To create a custom field class, create a subclass of :class:`marshmallow.fields.Field` and implement its :meth:`_serialize <marshmallow.fields.Field._serialize>` and/or :meth:`_deserialize <marshmallow.fields.Field._deserialize>` methods.
Expand Down Expand Up @@ -43,7 +42,7 @@ To create a custom field class, create a subclass of :class:`marshmallow.fields.
created_at = fields.DateTime()
pin_code = PinCode()
Method Fields
Method fields
-------------

A :class:`Method <marshmallow.fields.Method>` field will serialize to the value returned by a method of the Schema. The method must take an ``obj`` parameter which is the object to be serialized.
Expand All @@ -59,7 +58,7 @@ A :class:`Method <marshmallow.fields.Method>` field will serialize to the value
def get_days_since_created(self, obj):
return dt.datetime.now().day - obj.created_at.day
Function Fields
Function fields
---------------

A :class:`Function <marshmallow.fields.Function>` field will serialize the value of a function that is passed directly to it. Like a :class:`Method <marshmallow.fields.Method>` field, the function must take a single argument ``obj``.
Expand Down Expand Up @@ -97,7 +96,7 @@ Both :class:`Function <marshmallow.fields.Function>` and :class:`Method <marshma
.. _adding-context:

Adding Context to `Method` and `Function` Fields
Adding context to `Method` and `Function` fields
------------------------------------------------

A :class:`Function <marshmallow.fields.Function>` or :class:`Method <marshmallow.fields.Method>` field may need information about its environment to know how to serialize a value.
Expand Down Expand Up @@ -129,7 +128,7 @@ As an example, you might want your ``UserSchema`` to output whether or not a ``U
result["likes_bikes"] # => True
Customizing Error Messages
Customizing error messages
--------------------------

Validation error messages for fields can be configured at the class or instance level.
Expand Down Expand Up @@ -160,8 +159,8 @@ Error messages can also be passed to a `Field's` constructor.
)
Next Steps
Next steps
----------

- Need to add schema-level validation, post-processing, or error handling behavior? See the :doc:`Extending Schemas <extending>` page.
- Need to add schema-level validation, post-processing, or error handling behavior? See the :doc:`Extending schemas <extending>` page.
- For example applications using marshmallow, check out the :doc:`Examples <examples>` page.
38 changes: 19 additions & 19 deletions docs/dashing.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "Marshmallow",
"package": "marshmallow",
"index": "_build/index.html",
"selectors": {
"dl.class dt": {
"type": "Class",
"attr": "id"
},
"dl.exception dt": {
"type": "Exception",
"attr": "id"
},
"dl.function dt": {
"type": "Function",
"attr": "id"
}
"name": "marshmallow",
"package": "marshmallow",
"index": "_build/index.html",
"selectors": {
"dl.class dt": {
"type": "Class",
"attr": "id"
},
"icon32x32": "",
"allowJS": false,
"ExternalURL": ""
"dl.exception dt": {
"type": "Exception",
"attr": "id"
},
"dl.function dt": {
"type": "Function",
"attr": "id"
}
},
"icon32x32": "",
"allowJS": false,
"ExternalURL": ""
}
4 changes: 2 additions & 2 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ After registering a user and creating some todo items in the database, here is a
}
Inflection (Camel-casing Keys)
==============================
Inflection (camel-cased keys)
=============================

HTTP APIs will often use camel-cased keys for their input and output representations. This example shows how you can use the
`Schema.on_bind_field <marshmallow.Schema.on_bind_field>` hook to automatically inflect keys.
Expand Down
Loading

0 comments on commit ea2b0ed

Please sign in to comment.