Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a CONTRIBUTING.md file and Makefile to guide new contributors #305

Merged
merged 21 commits into from
Apr 25, 2023
Merged

Add a CONTRIBUTING.md file and Makefile to guide new contributors #305

merged 21 commits into from
Apr 25, 2023

Conversation

ThomasSanson
Copy link
Sponsor Contributor

close #304

…ssage

This commit adds a Makefile to the project with global configuration and a help message. The Makefile includes a global configuration for the default goal, export all variables, silent mode, and bash shell. It also includes a help message with instructions on how to use the Makefile.
A new file `.config/make/help.mak` was added to the project, which contains a `help` target that prints a list of available make targets with their descriptions. The `Makefile` was updated to include the `help.mak` file. This makes it easier for developers to understand the available make targets and their purposes.
🎉 feat(python.mak): add makefile for python virtual environment management
The python_launcher variable in the Makefile has been updated to version 3.10. This change is made to ensure that the correct version of Python is used for the virtual environment. The python.mak makefile has been added to manage the virtual environment for Python. It includes targets for creating, upgrading, and installing requirements for the virtual environment. Additionally, targets for linting and testing Python scripts have been added.
The yaml makefile is added to the project, which includes targets for bootstrapping and running yamllint. The yaml-bootstrap target installs or upgrades linters, and the yamllint target runs yamllint on the project.
This commit adds a new file `.config/make/molecule.mak` which contains make targets for running molecule commands. These targets include `molecule-bootstrap`, `molecule-test`, `molecule-destroy`, `molecule-converge`, `molecule-reconverge`, `molecule-test-all`, `molecule-destroy-all`, `molecule-test-scenario`, `molecule-destroy-scenario`, `molecule-converge-scenario`, `molecule-dependency`, `molecule-verify`, and `molecule-lint`. These targets allow for easier management of molecule commands and scenarios.
The `clean` target removes all temporary files and directories created during the build process. The `reinitialization` target removes the virtual environment, vendor directory, and all makefiles, returning the collection to its initial state.
The .venv directory is added to the ignore list to prevent it from being tracked by git. This directory is used by virtual environments and should not be included in the repository.
📦 chore(requirements): add ansible to requirements.txt and create requirements.dev.txt
The yaml.mak file was removed as it was no longer needed. The molecule-bootstrap target was also removed as it was not being used. The ansible package was added to requirements.txt as it was required for the project. A new requirements.dev.txt file was created to hold development dependencies such as ansible-lint, yamllint, molecule, molecule-plugins[docker], and docker.
This commit adds a CONTRIBUTING.md file to the repository, which provides guidelines for contributing to the project. The guidelines include instructions for creating issues, forking the project, making changes, testing changes, and making pull requests. The guidelines also include a request for sponsorship.
This commit fixes several typos and improves the readability of the CONTRIBUTING.md file. Changes include fixing grammar and punctuation errors, improving sentence structure, and clarifying instructions. These changes will make it easier for contributors to understand how to contribute to the project and improve the overall quality of the file.
This commit updates the link to the pull request documentation to the official GitHub documentation. This will ensure that contributors are directed to the correct documentation and can create pull requests with ease.
files/requirements.txt Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
ThomasSanson and others added 5 commits April 23, 2023 19:26
✨ feat(python.mak): change python requirements file paths
🆕 chore(python): add requirements.dev.txt file
The python requirements file paths have been updated to match the new file locations. The requirements.txt file has been updated to include ansible>=2.7. A new requirements.dev.txt file has been added to include development dependencies such as ansible-lint, yamllint, molecule, molecule-plugins[docker], and docker.
The sudo command was missing from the apt update command, which could cause issues with updating the package list.
This commit adds a new section to the CONTRIBUTING.md file that explains how to contribute to the project using Gitpod, a cloud-based development environment platform. The section includes step-by-step instructions for creating a Gitpod workspace, making changes, committing them, and creating a pull request. This addition aims to make it easier for contributors to get started with the project without having to set up a local environment.
The sponsor links have been updated to include both GitHub and Patreon options. This will make it easier for contributors to support the project in a way that is most convenient for them.
CONTRIBUTING.md Outdated

Replace the commit message with a clear and concise description of your changes.

7. **Push your changes**: Push your changes to your fork on GitHub:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the "Test your changes" item is missing here before pushing changes

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and tested on gitpod (working)

Added instructions to test changes with Molecule before committing. The instructions include how to test a specific distribution, set `distro`, optionally `tag`, and `namespace`. This ensures that changes are tested and working correctly before being pushed to the repository.
@ThomasSanson
Copy link
Sponsor Contributor Author

@vitabaks

Is there a reason for using your pre-built Docker image directly? (Faster?)

Instead of using the following configuration in the .gitpod file:

image:
  file: .gitpod.Dockerfile

I'm asking this because, once again, it seems to disconnect the relationship between the repository version (tag 1.7.0) and the image version (vitabaks/ansible-molecule-ubuntu:22.04).

ThomasSanson and others added 3 commits April 24, 2023 18:33
🎉 feat(.gitpod.Dockerfile): add Dockerfile for Gitpod
🎉 feat(.gitpod.yml): use custom Dockerfile for Gitpod image
🎉 feat(Makefile): include docker.mak in Makefile
The Dockerfile and docker.mak files were added to the project to support building and linting Docker images. The .gitpod.yml file was updated to use the custom Dockerfile for the Gitpod image. The Makefile was updated to include the docker.mak file.
The typo in the bootstrap task name has been corrected from 'boostrap' to 'bootstrap'. This ensures that the task runs correctly when executed.
@ThomasSanson
Copy link
Sponsor Contributor Author

@vitabaks

I've made all the necessary changes for the contribution to ensure that there is maximum consistency between a local installation and Gitpod via the Makefile.

Indeed, there is a difference in launch time. For you, the Gitpod workspace is the most efficient at 30.77 seconds. With the current configuration file, it takes 56.8 seconds for the first image build and then 53.41 seconds for the virtual environment initialization (make bootstrap), which results in a total of 110.21 seconds for the first startup, almost four times longer.

However, if I delete my Gitpod workspace and recreate it, the image is already built, and I only have the approximately 53 seconds for the opening and make bootstrap process.

And if I turn off my workspace and turn it back on, it takes 32.29 seconds (very close to your result).

I'm torn between a maximum time of 2 minutes for a brand new contributor, who will then get closer to your times but with consistency between installations, and pure performance.

I'll leave the decision to you 😇

This commit updates the contributing guide to provide clearer instructions on how to contribute to the project. It also adds a section on how to use Gitpod for a cloud-based development environment. Additionally, it adds a reminder to consider sponsoring the maintainer via GitHub or Patreon.
@vitabaks
Copy link
Owner

vitabaks commented Apr 25, 2023

Is there a reason for using your pre-built Docker image directly? (Faster?)

In this case, there will be a new build for each workspace launch. Yes, you can wait a bit for the build, but if you use an already pre-assembled image, the workspace will be launched much faster.

However, if I delete my Gitpod workspace and recreate it, the image is already built, and I only have the approximately 53 seconds for the opening and make bootstrap process.

Sounds encouraging )

@vitabaks vitabaks merged commit e1c611f into vitabaks:master Apr 25, 2023
16 checks passed
vitabaks added a commit that referenced this pull request May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a CONTRIBUTING.md file to guide new contributors
2 participants