1.2. Existing Repository#

To install PyPackIT in an existing GitHub repository:

  1. Merge the repository with PyPackIT’s template repository.

  2. Add a Personal Access Token (PAT) and activate external services.

  3. Customize project configurations and metadata.

  4. Push changes to GitHub.

Don’t Miss Step 2

Since step 2 is common for both new and existing repositories, it is explained in a separate section, while steps 1, 3, and 4 are detailed below. Don’t forget to follow all four steps in the given order.

1.2.1. Repository Preparation#

The first step is to add PyPackIT’s configuration files to a local clone of your repository:

  1. Clone your GitHub repository locally.

  2. Install the PyPackIT Python package in a (preferably new) environment with Python >= 3.10 using pip:

    pip install pypackit
    
  3. On the main branch of your local repository, temporarily move everything other than the .git directory to another location outside of the repository directory.

  4. In your terminal, run

    pypackit unpack 'PATH/TO/YOUR/REPOSITORY/DIRECTORY'
    

    or just pypackit unpack when you are already in the repository directory.

This will copy the PyPackIT repository template into your repository, and sync it with your repository metadata. Now you can start adding your project metadata and settings to PyPackIT’s configuration files in the .control directory inside your repository. To see the results of your configurations, run

pypackit sync 'PATH/TO/YOUR/REPOSITORY/DIRECTORY'