Initialize Repository with HyFI-Template.
Assignees: Labels: Milestone: Projects:
To streamline the development process and ensure a solid foundation for our Python projects, we will initialize our repositories using the HyFI-Template. HyFI-Template is a ready-to-use GitHub template repository that leverages the power of the Hydra configuration system and the Pydantic data validation library, providing a comprehensive set of tools to create flexible and adaptable interfaces for various Python applications. By utilizing the .envrc
file provided by the template, we can quickly set up a virtual environment and start building our projects with the HyFI framework.
-
Set up the repository:
- Create a new repository on GitHub for the project, choosing a descriptive and concise name.
- Clone the newly created repository to your local development environment.
-
Inject the HyFI-Template:
- From the root of the cloned repository, run the following command to inject the HyFI-Template:
copier copy --trust --data 'code_template_source=gh:entelecheia/hyfi-template' --answers-file .copier-config.yaml gh:entelecheia/hyperfast-python-template .
- Follow the prompts and provide the necessary information to configure the template for the project.
- From the root of the cloned repository, run the following command to inject the HyFI-Template:
-
Set up the development environment using
.envrc
:- Ensure that you have
direnv
installed on your system. If not, install it using the appropriate package manager for your operating system. - Allow
direnv
to manage the environment by running:direnv allow
. - The
.envrc
file provided by the HyFI-Template will automatically set up a virtual environment for the project. - Activate the virtual environment by running:
direnv reload
.
- Ensure that you have
-
Customize the project:
- Review the pre-configured project structure and make any necessary adjustments to align with the project's specific requirements.
- Update the
README.md
file to include a brief description of the project, its objectives, and any relevant information for collaborators. - Customize the Hydra configurations in the
config
directory to define the settings and parameters specific to the project. - Define the necessary data structures using Pydantic models in the
models
directory to represent the entities and relationships relevant to the project.
-
Install dependencies:
- With the virtual environment activated, install the required dependencies by running:
make install
.
- With the virtual environment activated, install the required dependencies by running:
-
Initialize version control:
- Initialize a new Git repository in the project directory:
git init
. - Stage all the files:
git add .
. - Make an initial commit:
git commit -m "Initialize repository with HyFI-Template"
. - Push the initial commit to the GitHub repository:
git push -u origin main
.
- Initialize a new Git repository in the project directory:
-
Collaborate with the team:
- Invite team members and collaborators to the GitHub repository.
- Assign appropriate roles and permissions to each collaborator based on their responsibilities.
- Encourage the team to familiarize themselves with the HyFI-Template documentation and guidelines to ensure a smooth development process.
A properly initialized repository based on the HyFI-Template, with a virtual environment automatically set up using the provided .envrc
file. The repository should have a well-structured codebase, Hydra configurations, Pydantic models, and the necessary dependencies installed. The team should be able to collaborate effectively using the HyFI framework and its best practices, allowing for the development of flexible and adaptable interfaces for various Python projects.