Skip to content

Commit

Permalink
Merge pull request #4 from PatriceJada/repairdocs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
PatriceJada authored Apr 3, 2022
2 parents 8fb9c0c + 83bf542 commit 1fd3c5d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 48 deletions.
43 changes: 0 additions & 43 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
.. todo:: THIS IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!

The document assumes you are using a source repository service that promotes a
contribution model similar to `GitHub's fork and pull request workflow`_.
While this is true for the majority of services (like GitHub, GitLab,
BitBucket), it might not be the case for private repositories (e.g., when
using Gerrit).

Also notice that the code examples might refer to GitHub URLs or the text
might use GitHub specific terminology (e.g., *Pull Request* instead of *Merge
Request*).

Please make sure to check the document having these assumptions in mind
and update things accordingly.

.. todo:: Provide the correct links/replacements at the bottom of the document.

.. todo:: You might want to have a look on `PyScaffold's contributor's guide`_,

especially if your project is open source. The text should be very similar to
this template, but there are a few extra contents that you might decide to
also include, like mentioning labels of your issue tracker or automated
releases.


============
Contributing
============

Expand Down Expand Up @@ -72,11 +46,9 @@ by adding missing information and correcting mistakes.
This means that the docs are kept in the same repository as the project code, and
that any documentation update is done in the same way was a code contribution.

.. todo:: Don't forget to mention which markup language you are using.

e.g., reStructuredText_ or CommonMark_ with MyST_ extensions.

.. todo:: If your project is hosted on GitHub, you can also mention the following tip:

.. tip::
Please notice that the `GitHub web interface`_ provides a quick way of
Expand Down Expand Up @@ -106,7 +78,6 @@ and use Python's built-in web server for a preview in your web browser
Code Contributions
==================

.. todo:: Please include a reference or explanation about the internals of the project.

An architecture description, design principles or at least a summary of the
main concepts will make it easy for potential contributors to get started
Expand Down Expand Up @@ -151,15 +122,6 @@ Clone the repository

to be able to import the package under development in the Python REPL.

.. todo:: if you are not using pre-commit, please remove the following item:

#. Install |pre-commit|_::

pip install pre-commit
pre-commit install

``patricesorter`` comes with a lot of hooks configured to automatically help the
developer to check the code being written.

Implement your changes
----------------------
Expand All @@ -182,7 +144,6 @@ Implement your changes

to record your changes in git_.

.. todo:: if you are not using pre-commit, please remove the following item:

Please make sure to see the validation messages from |pre-commit|_ and fix
any eventual issues.
Expand Down Expand Up @@ -218,7 +179,6 @@ Submit your contribution
#. Go to the web page of your fork and click |contribute button|
to send your changes for review.

.. todo:: if you are using GitHub, you can uncomment the following paragraph

Find more detailed information in `creating a PR`_. You might also want to open
the PR as a draft first and mark it as ready for review after the feedbacks
Expand Down Expand Up @@ -278,8 +238,6 @@ Maintainer tasks
Releases
--------

.. todo:: This section assumes you are using PyPI to publicly release your package.

If instead you are using a different/private package index, please update
the instructions accordingly.

Expand Down Expand Up @@ -309,7 +267,6 @@ on PyPI_, the following steps can be used to release a new version for
.. <-- strart -->
.. todo:: Please review and change the following definitions:
.. |the repository service| replace:: GitHub
.. |contribute button| replace:: "Create pull request"
Expand Down
18 changes: 15 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Usage

::

PS C:\Users\PMusoke\Documents\GitHub\myproto\patricesorter> patricesorter -h
PS C: patricesorter> patricesorter -h

usage: patricesorter [-h] [-v] [-q] [--nargs NARGS [NARGS ...]] {} ...

positional arguments:
Expand All @@ -46,22 +47,33 @@ Command Line

::

PS C:\Users\PMusoke\Documents\GitHub\myproto\patricesorter> patricesorter --nargs 60 20 50 1 4
PS C:patricesorter> patricesorter --nargs 60 20 50 1 4

The ['60', '20', '50', '1', '4'] sorted to ['1', '20', '4', '50', '60'] , the first price is 1 last price 60

Interface
=========

::

PS C:\Users\PMusoke\Documents\GitHub\myproto\patricesorter> python
PS C: patricesorter> python

Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import patricesorter as ps
>>> ps.sort_prices(['60', '20', '50', '1', '4'])
(['1', '20', '4', '50', '60'], (First 1, Last 60))

Using tox
=========

::

tox -e docs # to build your documentation
tox -e build # to build your package distribution
tox -e publish # to test your project uploads correctly in test.pypi.org
tox -e publish -- --repository pypi # to release your package to PyPI
tox -av # to list all the tasks available


.. _pyscaffold-notes:
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.join(__location__, "../src"))
sys.path.insert(0, os.path.join(__location__, "../patricesorter"))

# -- Run sphinx-apidoc -------------------------------------------------------
# This hack is necessary since RTD does not issue `sphinx-apidoc` before running
Expand All @@ -34,7 +34,7 @@
from sphinx import apidoc

output_dir = os.path.join(__location__, "api")
module_dir = os.path.join(__location__, "../src/patricesorter")
module_dir = os.path.join(__location__, "../patricesorter")
try:
shutil.rmtree(output_dir)
except FileNotFoundError:
Expand Down

0 comments on commit 1fd3c5d

Please sign in to comment.