<commit_before>|GHA tests| |Codecov report| |pre-commit| |black|

Python Template Repository
==========================

This repository gives a fully-featured template or skeleton for new Python repositories.


Quick start
-----------

When creating a new repository from this skeleton, these are the steps to follow:

#. **Don't click the fork button**

#.
    #.  You can create a new repository on GitHub from this template by clicking the `Use this template <https://github.com/scottclowe/python-template-repo/generate>`_ button.

    #.  Alternatively, if your new repository is not going to be on GitHub, you can `download this repo as a zip <https://github.com/scottclowe/python-template-repo/archive/master.zip>`_ and work from there.
        However, you should note that this zip does not include the .gitignore and .gitattributes files (because GitHub automatically omits them, which is usually helpful but is not for our purposes).
        Thus you will also need to download the `.gitignore <https://raw.githubusercontent.com/scottclowe/python-template-repo/master/.gitignore>`__ and `.gitattributes <https://raw.githubusercontent.com/scottclowe/python-template-repo/master/.gitattributes>`__ files.

        The following shell commands can be used for this purpose on \*nix systems::

          git init your_repo_name
          cd your_repo_name
          wget https://github.com/scottclowe/python-template-repo/archive/master.zip
          unzip master.zip
          mv -n python-template-repo-master/* python-template-repo-master/.[!.]* .
          rm -r python-template-repo-master/
          rm master.zip
          wget https://raw.githubusercontent.com/scottclowe/python-template-repo/master/.gitignore
          wget https://raw.githubusercontent.com/scottclowe/python-template-repo/master/.gitattributes
          git add .
          git commit -m "Initial commit"
          git rm LICENSE

        Note that we are doing the move with ``mv -n``, which will prevent the template repository from clobbering your own files (in case you already made a README.rst file, for instance).

        You'll need to instruct your new local repository to synchronise with the remote ``your_repo_url``::

          git remote set-url origin your_repo_url
          git push -u origin master

#.  Remove the dummy files ``package_name/module.py`` and ``package_name/tests/test_module.py``::<commit_msg>DOC: Add python2.7 install instructions to README<commit_after>|GHA tests| |Codecov report| |pre-commit| |black|

Python Template Repository
==========================

This repository gives a fully-featured template or skeleton for new Python repositories.


Quick start
-----------

When creating a new repository from this skeleton, these are the steps to follow:

#. **Don't click the fork button**

#.
    #.  **New GitHub repository**.

        You can create a new repository on GitHub from this template by clicking the `Use this template <https://github.com/scottclowe/python-template-repo/generate>`_ button.

        *Need to support Python 2.7?*
        Make sure to check the "Include all branches" option while creating the new repository.

        Then clone your new repository to your local system [pseudocode]::

          git clone git@github.com:your-org/your-repo.git
          cd your-repo

        *If you need to support Python 2.7*, now move the reference for your default branch (master/main) to point to the python2.7 branch head::

          git reset --hard origin/python2.7
          git push -f

        You can now delete the python2.7 branch from your remote.

    #.  **New repository not on GitHub**.

        Alternatively, if your new repository is not going to be on GitHub, you can download `this repo as a zip <https://github.com/scottclowe/python-template-repo/archive/master.zip>`_ and work from there.

        *Need to support Python 2.7?*
        Download the `python2.7 branch as a zip <https://github.com/scottclowe/python-template-repo/archive/refs/heads/python2.7.zip>`_ instead.

        Either way, you should note that this zip does not include the .gitignore and .gitattributes files (because GitHub automatically omits them, which is usually helpful but is not for our purposes).
        Thus you will also need to download the `.gitignore <https://raw.githubusercontent.com/scottclowe/python-template-repo/master/.gitignore>`__ and `.gitattributes <https://raw.githubusercontent.com/scottclowe/python-template-repo/master/.gitattributes>`__ files.

        The following shell commands can be used for this purpose on \*nix systems::

          git init your_repo_name
          cd your_repo_name
          wget https://github.com/scottclowe/python-template-repo/archive/master.zip
          unzip master.zip
          mv -n python-template-repo-master/* python-template-repo-master/.[!.]* .
          rm -r python-template-repo-master/
          rm master.zip
          wget https://raw.githubusercontent.com/scottclowe/python-template-repo/master/.gitignore
          wget https://raw.githubusercontent.com/scottclowe/python-template-repo/master/.gitattributes
          git add .
          git commit -m "Initial commit"
          git rm LICENSE

        Note that we are doing the move with ``mv -n``, which will prevent the template repository from clobbering your own files (in case you already made a README.rst file, for instance).

        You'll need to instruct your new local repository to synchronise with the remote ``your_repo_url``::

          git remote set-url origin your_repo_url
          git push -u origin master

#.  Remove the dummy files ``package_name/module.py`` and ``package_name/tests/test_module.py``::
{'fraction_non_alphanumeric': 0.09819393301770998, 'fraction_numerical': 0.003156233561283535, 'mean_word_length': 3.0028070175438595, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 15, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4382758', 'n_tokens_mistral': 1564, 'n_tokens_neox': 1479, 'n_words': 576}