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

Edits for overall doc review #52

Merged
merged 32 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9a92ff1
Edits to RST files
PipKat Jul 20, 2023
a89bbd2
Resolve Vale issues
PipKat Jul 20, 2023
3e25361
fix typos
PipKat Jul 20, 2023
e7be146
Resolve additional Vale issues
PipKat Jul 20, 2023
db79ad8
Vale--both a joy and a pain!
PipKat Jul 20, 2023
61ee59d
Fix to grid format
PipKat Jul 20, 2023
bc7d5a6
Merge branch 'main' into doc/overall_edit
Revathyvenugopal162 Jul 24, 2023
352c5cf
MAINT: Precommit fixes
Revathyvenugopal162 Jul 24, 2023
bdb5579
Merge branch 'main' into doc/overall_edit
Revathyvenugopal162 Jul 24, 2023
5704c79
Merge branch 'doc/overall_edit' of https://github.com/ansys-internal/…
Revathyvenugopal162 Jul 24, 2023
7a422aa
Merge branch 'main' into doc/overall_edit
Revathyvenugopal162 Jul 24, 2023
c30173d
Merge branch 'doc/overall_edit' of https://github.com/ansys-internal/…
Revathyvenugopal162 Jul 24, 2023
ad7a3eb
MAINT: Precommit fixes
Revathyvenugopal162 Jul 24, 2023
594ad33
MAINT: fix typo
Revathyvenugopal162 Jul 24, 2023
5d13fd8
FIX: add the reference target
Revathyvenugopal162 Jul 24, 2023
7d5d0e9
Merge branch 'main' into doc/overall_edit
Revathyvenugopal162 Jul 25, 2023
b1c48b8
More RST file edits and some PY file edits
PipKat Jul 25, 2023
6723584
FIX: pre-commit fixes
Revathyvenugopal162 Jul 26, 2023
72c1f89
DEBUG: pre-commit fixes
Revathyvenugopal162 Jul 26, 2023
49ee1d4
Merge branch 'doc/overall_edit' of https://github.com/ansys/pymeilise…
Revathyvenugopal162 Jul 26, 2023
8f81c2e
DOC: vale error fixes
Revathyvenugopal162 Jul 26, 2023
ea1ff73
DOC: fix doc build error
Revathyvenugopal162 Jul 26, 2023
0163d29
Edits to remaining files
PipKat Jul 26, 2023
4c84a08
Merge branch 'doc/overall_edit' of https://github.com/ansys/pymeilise…
PipKat Jul 26, 2023
101ed93
Resolve Vale issues
PipKat Jul 26, 2023
e54275e
Fix code style errors
PipKat Jul 26, 2023
9194f52
Address to doc building label issues
PipKat Jul 26, 2023
5e067cf
Fix bad hphen (versus underscore) in label name
PipKat Jul 26, 2023
e8f4276
Minor edits based on rendered doc
PipKat Jul 26, 2023
c02d488
Fix too long line and two typos
PipKat Jul 26, 2023
2a00920
DOC: Chnage the unique id instance to unique name
Revathyvenugopal162 Jul 27, 2023
d5cf602
DOC: Change the name of varaible in js
Revathyvenugopal162 Jul 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 40 additions & 49 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pymeilisearch
PyMeilisearch
#############

**An enhanced Python API to Meilisearch**
Expand Down Expand Up @@ -33,66 +33,59 @@ pymeilisearch
About
=====

The ``pymeilisearch`` library is a Python command-line interface (CLI) that
PyMeilisearch is a Python command-line interface (CLI) that
simplifies integration with `Meilisearch <https://www.meilisearch.com/>`_,
enabling developers to enhance their applications with powerful search
functionality by indexing desired data.

Main features of ``pymeilisearch`` are:
PyMeilisearch provides these key features:

#. **Easy integration** with continuous integration workflows.
- **Easy integration** with continuous integration workflows.

#. **High-level functionality** for indexing data, performing searches, and managing documents.
- **High-level functionality** for indexing data, performing searches, and managing documents.

#. **Powerful capabilities** by enabling filtering options, and indexing
configurations for tailored search experience.
- **Powerful capabilities** for enabling filtering options and indexing
configurations for tailored search experiences.


Installation
============

Installing ``pymeilisearch`` is as easy as running:
Installing the ``pymeilisearch`` package is as easy as running this command:

.. code-block:: console

python -m pip install pymeilisearch

For other installation methods, please refer to the `official installation guidelines`_.

.. _official installation guidelines: https://pymeilisearch.docs.ansys.com/version/stable/getting-started/installing-pymeilisearch.html
For other installation methods, refer to `PyMeilisearch installation
<https://pymeilisearch.docs.ansys.com/version/stable/getting-started/installing-pymeilisearch.html>`_
in the PyMeilisearch documentation.


Documentation
=============

The `official documentation`_ of ``pymeilisearch`` contains the following chapters:
The `PyMeilisearch documentation`_ contains these sections:

- `Getting started`_. This section provides a brief overview and instructions on
how to get started with the project. It typically includes information on how
to install the project, set up any necessary dependencies, and run a basic
example or test to ensure everything is functioning correctly.
- `Getting started`_: Describes how to install PyMeilisearch
and build your own Docker image for testing PyMeilisearch locally.

- `User guide`_. The user guide section offers detailed documentation and
instructions on how to use the project. It provides comprehensive explanations
of the project's features, functionalities, and configuration options. The
user guide aims to help users understand the project's concepts, best
practices, and recommended workflows.
- `User guide`_: Describes how to use the PyMeilisearch CLI and
integrate PyMeilisearch in a website.

- `API reference`_. The API reference section provides detailed documentation
for the project's application programming interface (API). It includes
information about classes, functions, methods, and their parameters, return
values, and usage examples. This reference helps developers understand the
available API endpoints, their functionalities, and how to interact with them
- `API reference`_: Describes the PyMeilisearch API. For each
subpackage and submodule, it provides information about classes, functions,
methods, parameters, and return values. This reference helps you understand the
available API endpoints, their capabilities, and how to interact with them
programmatically.

- `Examples`_. The examples section showcases practical code examples that
demonstrate how to use the project in real-world scenarios. It provides sample
code snippets or complete scripts that illustrate different use cases or
demonstrate specific features of the project. Examples serve as practical
references for developers, helping them understand how to apply the project to
their own applications.
- `Examples`_: Provides code examples that show how to use PyMeilisearch
in real-world scenarios. Sample code snippets and complete scripts
demonstrate different use cases or specific features to help you
understand how to use PyMeilisearch in your own projects.

.. _official documentation: https://pymeilisearch.docs.ansys.com
.. _PyMeilisearch Installation documentation: https://pymeilisearch.docs.ansys.com/version/stable/getting-started/installing-pymeilisearch.html
.. _PyMeilisearch documentation: https://pymeilisearch.docs.ansys.com
.. _getting started: https://pymeilisearch.docs.ansys.com/version/stable/getting-started/index.html
.. _user guide: https://pymeilisearch.docs.ansys.com/version/stable/user-guide/index.html
.. _api reference: https://pymeilisearch.docs.ansys.com/version/stable/autoapi/index.html
Expand All @@ -102,26 +95,24 @@ The `official documentation`_ of ``pymeilisearch`` contains the following chapte
Troubleshooting
===============

For troubleshooting or reporting issues, please open an issue in the project
repository.

Please follow these steps to report an issue:

- Go to the project repository.
- Click on the ``Issues`` tab.
- Click on the ``New Issue`` button.
- Provide a clear and detailed description of the issue you are facing.
- Include any relevant error messages, code snippets, or screenshots.
To request troubleshooting assistance or report an issue, follow these steps to
create an issue in the project's repository:

Additionally, you can refer to the `project documentation`_ for additional
resources and troubleshooting guides.
#. Go to the `PyMeilisearch repository`_.
#. Click the **Issues** tab to view the **Issues** page.
#. On the **Issues** page, click **New Issue**.
#. In the window that opens, provide a clear and detailed description of the issue
that you are facing. Include any relevant error messages, code snippets, and
screenshots.

.. _project documentation: https://pymeilisearch.docs.ansys.com
To reach the project support team, email `[email protected] <pyansys.core@ansys.com>`_.


License
=======
License and acknowledgements
============================

You can find the full text of the license in the `LICENSE`_ file.
PyMeilisearch is licensed under the MIT license.
You can see the full text of the license in the `LICENSE` file.

.. _license: https://github.com/ansys/pymeilisearch/blob/main/LICENSE
.. _PyMeilisearch repository: https://github.com/ansys/pymeilisearch
3 changes: 2 additions & 1 deletion doc/source/_autoapi_templates/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
API reference
=============

This page contains the pymeilisearch API reference.
This section describes PyMeilisearch API endpoints, their capabilities,
and how to interact with them programmatically.

.. toctree::
:titlesonly:
Expand Down
58 changes: 31 additions & 27 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
.. _ref_contributing:

Contributing
============
Contribute
==========

Overall guidance on contributing to a PyAnsys library appears in the
`Contributing <dev_guide_contributing_>`_ topic
in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar
with it and all `Coding style <dev_guide_coding_style_>`_ before attempting to
contribute to pymeilisearch.
with this guide before attempting to contribute to PyMeilisearch.

The following contribution information is specific to pymeilisearch.
The following contribution information is specific to PyMeilisearch.


Cloning the pymeilisearch repository
------------------------------------
Clone the repository
--------------------

Run this code to clone and install the latest version of pymeilisearch in development mode:
To clone and install the latest version of PyMmeilisearch in development mode,
run this code:

.. code:: console

Expand All @@ -25,49 +25,53 @@ Run this code to clone and install the latest version of pymeilisearch in develo
pip install -e .


Posting issues
--------------
Post issues
-----------

Use the `pymeilisearch Issues <pymeilisearch_issues_>`_
Use the `PyMeilisearch Issues <pymeilisearch_issues_>`_
page to submit questions, report bugs, and request new features. When possible,
use these issue templates:

* Bug report template
* Feature request template
* Bug, problem, error: For filing a bug report
* Documentation error: For requesting modifications to the documentation
* Adding an example: For proposing a new example
* New feature: For requesting enhancements to the code

If your issue does not fit into one of these categories, create your own issue.
If your issue does not fit into one of these template categories, you can click
the link for opening a blank issue.

To reach the project support team, email `Pyansys core <[email protected]>`_.
To reach the project support team, email `pyansys.core@ansys.com <[email protected]>`_.

Viewing pymeilisearch documentation
-----------------------------------
View documentation
------------------

Documentation for the latest stable release of pymeilisearch is hosted at
`pymeilisearch Documentation <pymeilisearch_docs_>`_.
Documentation for the latest stable release of PyMeilisearch is hosted at
`PyMeilisearch documentation <pymeilisearch_docs_>`_.

In the upper right corner of the documentation's title bar, there is an option
for switching from viewing the documentation for the latest stable release
to viewing the documentation for the development version or previously
released versions.


Code style
----------
Adhere to code style
--------------------

pymeilisearch follows PEP8 standard as outlined in the `PyAnsys Development Guide
<PyAnsys Developer's guide_>`_ and implements style checking using
PyMeilisearch follows the PEP8 standard as outlined in
`PEP 8 <https://dev.docs.pyansys.com/coding-style/pep8.html>`_ in
the *PyAnsys Developer's Guide* and implements style checking using
`pre-commit <precommit_>`_.

To ensure your code meets minimum code styling standards, run::
To ensure your code meets minimum code styling standards, run these commands::

pip install pre-commit
pre-commit run --all-files

You can also install this as a pre-commit hook by running::
You can also install this as a pre-commit hook by running this command::

pre-commit install

This way, it's not possible for you to push code that fails the style checks. For example::
This way, it's not possible for you to push code that fails the style checks::

$ pre-commit install
$ git commit -am "FEAT: added the new feature"
Expand All @@ -86,7 +90,7 @@ This way, it's not possible for you to push code that fails the style checks. Fo

.. _precommit: https://pre-commit.com/
.. _dev_guide_contributing: https://dev.docs.pyansys.com/how-to/contributing.html
.. _PyAnsys Developer's guide: https://dev.docs.pyansys.com/
.. _PyAnsys Developer's Guide: https://dev.docs.pyansys.com/
.. _dev_guide_coding_style: https://dev.docs.pyansys.com/coding-style/index.html
.. _pymeilisearch_docs: https://pymeilisearch.docs.ansys.com/version/stable/
.. _pymeilisearch_issues: https://github.com/ansys/pymeilisearch/issues
Expand Down
49 changes: 27 additions & 22 deletions doc/source/examples.rst
Original file line number Diff line number Diff line change
@@ -1,65 +1,70 @@
Examples
========
This section provides examples that show how to use PyMeilisearch to
create your own indexes with custom templates from online files, local
files, or files in the repositories of GitHub organizations. The final
example shows how you can even use Ansys actions to create one or more
indexes from online files, local files, and files in GitHub organizations.

.. note::
PyMeilisearch commands require certain arguments and support additional
options. The commands in the following examples show the general syntax for
the ``pymeilisearch upload`` command. For information on required arguments
and supported options for the ``upload`` subcommand, see :ref:`cli_usage`.

Create an index from online files
---------------------------------

Using pymeilisearch CLI utility
-------------------------------

Creating an index from an online page
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To create an index from an online page, you can use the `pymeilisearch` CLI utility as follows:
This command creates an index from online files:

.. code-block:: shell

pymeilisearch upload --template <template name or path> --index <index name> url https://example.com

Creating an index from a local page
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create an index from local files
--------------------------------

To create an index from a local page, run the following command:
This command creates an index from local files:

.. code-block:: shell

pymeilisearch upload --template <template name or path> --index <index name> --cname <cname of the document> html /path/to/files

Creating an index from GitHub organizations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create indexes from files in GitHub organizations
-------------------------------------------------

To create indexes for pages of repositories in a GitHub organization, run the
following command:
This command create indexes from files in the repositories of GitHub organizations:

.. code-block:: shell

pymeilisearch upload --template <template name or path> --index <index name> github /path/to/files --orgs orgA --orgs orgB

Creating an index from CI/CD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create an index from CI/CD
--------------------------

To create an index from CI/CD, you can use the `pymeilisearch` CLI utility
within your `Ansys Actions <https://actions.docs.ansys.com>`_ workflow. Here's
an example:
You can use PyMeilisearch within `Ansys actions <https://actions.docs.ansys.com>`_ in your CI/CD.
The following tabs show how to use Ansys actions to create one or more indexes from online files,
local files, and files in GitHub organizations:

.. tab-set::

.. tab-item:: Online content
.. tab-item:: Online files

.. code-block:: yaml

- name: Upload to MeiliSearch
run: |
pymeilisearch upload --template <template name or path> --index <index name> url https://example.com

.. tab-item:: Local content
.. tab-item:: Local files

.. code-block:: yaml

- name: Upload to MeiliSearch
run: |
pymeilisearch upload --template <template name or path> --index <index name> <cname of the document> html /path/to/files

.. tab-item:: GitHub organization
.. tab-item:: Files in GitHub organizations

.. code-block:: yaml

Expand Down
Loading
Loading