Skip to content

Commit

Permalink
update guide
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfalcao committed Jun 3, 2018
1 parent a07b874 commit 830ffc5
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 63 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Workshop: From your editor to PyPi
==================================

.. image:: https://readthedocs.org/projects/workshop-from-your-editor-to-pypi/badge/?version=latest
:target: https://workshop-from-your-editor-to-pypi.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
:target: https://workshop-from-your-editor-to-pypi.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Binary file added docs/source/_static/pyramid.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/unit-functional.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions docs/source/configure-travis.rst

This file was deleted.

44 changes: 40 additions & 4 deletions docs/source/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Step-by-step guide
==================


.. _guide step 1:
.. _create service accounts:

1. Create service accounts
--------------------------
Expand All @@ -20,7 +20,7 @@ Below you can find direct links for account creation pages:
#. `Make a Read-The-Docs account <https://readthedocs.org/accounts/signup/>`_
#. `Make a Travis account <https://travis-ci.org/>`_ (requires a github account)

.. _guide step 2:
.. _install virtualenv:

2. Install virtualenv
---------------------
Expand All @@ -32,13 +32,49 @@ Below you can find direct links for account creation pages:
.. seealso:: If you are feeling adventurous, use `pipenv <https://docs.pipenv.org/>`_ a great tool for python development workflow including managing virtualenvs and keeping track of installed packages (Pipfile)


.. _guide step 3:
.. _install cookiecutter:

3. Install cookiecutter
-----------------------

To speed-up our productivity let's use `cookiecutter <https://cookiecutter.readthedocs.io/en/latest/>`_
To speed-up our productivity we will use `cookiecutter <https://cookiecutter.readthedocs.io/en/latest/>`_.

.. code:: bash
pip install cookiecutter
4. Create your package with cookiecutter
----------------------------------------

The template is available on github at `gabrielfalcao/cookiecutter-from-editor-to-pypi <https://github.com/gabrielfalcao/cookiecutter-from-editor-to-pypi>`_

Cookiecutter is smart enough to install directly from github, for that
just run the following command from your ``~/projects`` folder or
whenever you prefer to keep personal projects.


.. code:: bash
cookiecutter gh:gabrielfalcao/cookiecutter-from-editor-to-pypi
.. important:: **Answer carefully** to the interactive questions. Try
your best to avoid typos in this step as it might impact
many files of your newly-created project.


5. Run tests
------------

.. image:: _static/pyramid.jpg
.. image:: _static/unit-functional.jpg

In your project root, run:


.. code:: bash
make unit
make functional
make docs
7 changes: 3 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
Workshop: From Editor to PyPi
=============================

.. danger:: This documentation is a work-in-progress. Please watch the project on github to receive updates on its repository.

.. toctree::
:maxdepth: 5
:caption: Agenda:

programme
guide
pypi-account
pypirc-credentials
configure-setup-py
next-steps


.. warning:: This documentation is a work-in-progress. Please watch the project on github to receive updates on its repository.
10 changes: 0 additions & 10 deletions docs/source/new-project-with-cookiecutter.rst

This file was deleted.

37 changes: 0 additions & 37 deletions docs/source/pypi-account.rst

This file was deleted.

26 changes: 26 additions & 0 deletions docs/source/pypirc-credentials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Configuring PyPi for publishing packages
========================================

.. note:: You will need a PyPi account for publishing your packages. Refer to the :ref:`create service accounts` page in the :ref:`guide` for more information

Head to `pypi.org/account/register <https://pypi.org/account/register/>`__ and create an account.

**Make sure to create a strong password, include special characters.**


Write your PyPi credentials to ``.pypirc``
==========================================

Edit the file ``~/.pypirc`` and add your credentials.

Below is a snippet to make things easier.

.. code:: ini
[distutils]
index-servers =
pypi
[pypi]
username:YOUR_USERNAME
password:YOUR_PASSWORD

0 comments on commit 830ffc5

Please sign in to comment.