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

chore: add project boilerplate from template #3

Merged
merged 10 commits into from
Sep 2, 2024
Merged

Conversation

Pushkarm029
Copy link
Collaborator

@Pushkarm029 Pushkarm029 commented Aug 17, 2024

Summary by Sourcery

Initialize the 'cloud_telemetry' project using a cookiecutter template, setting up the project structure, documentation, CI/CD workflows, and initial test framework. This includes adding a README, Makefile, GitHub Actions for CI, and configuration files for documentation and code quality tools.

New Features:

  • Introduce a new Python package 'cloud_telemetry' with an entry point script that prints a welcome message.

Enhancements:

  • Add a comprehensive README.md file with sections on usage, installation, development, contributing, code of conduct, versioning, license, and contact information.
  • Include a Makefile to streamline development tasks such as creating virtual environments, installing dependencies, running tests, and generating documentation.

Build:

  • Add a .readthedocs.yaml configuration file to set up Read the Docs for building project documentation.
  • Include a .markdownlint.yaml configuration file to enforce markdown style guidelines.

CI:

  • Set up GitHub Actions workflows for code quality checks, PR validation, code testing, documentation checks, and vulnerability testing.
  • Add a custom GitHub Action to set up Python and Poetry environments.

Deployment:

  • Add a GitHub Actions workflow to automate the release of the package to PyPI upon new releases.

Documentation:

  • Add Sphinx configuration and Makefile for generating project documentation.
  • Include a PULL_REQUEST_TEMPLATE.md to guide contributors in creating pull requests.

Tests:

  • Add unit and integration test directories with initial test files to verify the existence of the init.py file.

Chores:

  • Add a .cruft.json file to track the template used for project initialization.
  • Include a .pre-commit-config.yaml file to set up pre-commit hooks for code quality checks.

Signed-off-by: pushkarm029 <[email protected]>
Copy link

sourcery-ai bot commented Aug 17, 2024

Reviewer's Guide by Sourcery

This pull request initializes the project structure for the 'cloud-telemetry' repository using a cookiecutter template. It sets up the basic project layout, configuration files, documentation structure, and CI/CD workflows. The changes include adding essential files for project management, development workflows, and code quality checks.

File-Level Changes

Files Changes
pyproject.toml Set up project metadata and configuration in pyproject.toml
README.md Add comprehensive README with project overview, usage instructions, and development guidelines
Makefile Create Makefile with various development and maintenance commands
.github/workflows/code_quality.yaml
.github/workflows/code_test.yaml
.github/workflows/docs.yaml
.github/workflows/vulnerability.yaml
.github/workflows/pr_validation.yaml
.github/workflows/update.yaml
.github/workflows/release_pypi.yaml
Set up GitHub Actions workflows for code quality, testing, and documentation checks
.pre-commit-config.yaml
.markdownlint.yaml
.yamllint.yaml
.safety-policy.yml
Add configuration files for various development tools (pre-commit, ruff, mypy, etc.)
docs/source/conf.py
docs/make.bat
docs/Makefile
.readthedocs.yaml
Set up documentation structure with Sphinx
cloud_telemetry/__init__.py
cloud_telemetry/main.py
Add initial package structure with init.py and main.py files
tests/__init__.py
tests/test_unit/__init__.py
tests/test_integration/__init__.py
tests/test_unit/test_init.py
tests/test_integration/test_init.py
Set up test structure with unit and integration test directories
.github/ISSUE_TEMPLATE/general-purpose.md
PULL_REQUEST_TEMPLATE.md
Add issue and pull request templates
.cruft.json Add Cruft configuration for template updates

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Pushkarm029 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟡 Security: 1 issue found
  • 🟡 Testing: 3 issues found
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 2 issues found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

.github/workflows/code_quality.yaml Show resolved Hide resolved
.github/workflows/update.yaml Show resolved Hide resolved
docs/source/conf.py Show resolved Hide resolved
tests/test_integration/test_init.py Outdated Show resolved Hide resolved
tests/test_unit/test_init.py Outdated Show resolved Hide resolved
tests/test_integration/test_init.py Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
Signed-off-by: pushkarm029 <[email protected]>
Signed-off-by: pushkarm029 <[email protected]>
Signed-off-by: pushkarm029 <[email protected]>
@Pushkarm029
Copy link
Collaborator Author

some tests fail because the codecov token is not yet provided.

Signed-off-by: pushkarm029 <[email protected]>
Signed-off-by: pushkarm029 <[email protected]>
Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

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

You should probably upgrade to the latest version of the Cookiecutter - and after elixir-cloud-aai/cookiecutter-python#14 has been merged (hopefully today/tomorrow).

Another possible concern is that it is not entirely clear to me yet what the code will look like. Does it make sense to distribute it as a package on PyPI (my guess is yes)? Can you foresee any use for a console script included in the project, i.e., some CLI client (my guess is no)?

Depending on these, perhaps some of the generated content should be adjusted (e.g., the console script section removed from pyproject.toml, the release_pypi.yaml workflow removed etc).

Other than that, I think it's good to go.

So please update Cruft once the Cookiecutter PR is merged, then please have another look at the generated content and check if there's anything that you think may not fit your project. In case you are unsure, just leave it - we can always change things later on. When you are done with that, please ask for a re-review and I will approve.

@uniqueg uniqueg changed the title INIT cookiecutter-python chore: add project boilerplate from template Aug 26, 2024
@uniqueg
Copy link
Member

uniqueg commented Aug 26, 2024

some tests fail because the codecov token is not yet provided.

I have added CODECOV_TOKEN as a repo secret

Signed-off-by: pushkarm029 <[email protected]>
s
Signed-off-by: pushkarm029 <[email protected]>
Copy link

codecov bot commented Aug 28, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@uniqueg
Copy link
Member

uniqueg commented Aug 30, 2024

@Pushkarm029: Please fix the linting and doc check issues.

@JaeAeich: Maybe you can help with the doc check one?

@JaeAeich
Copy link

JaeAeich commented Aug 30, 2024

@Pushkarm029 you haven't generated the docs, please do so by running make d in root dir and that should fix the CI.

For linting you could either manually add fullstop in the pydoc of init.py file, or wait for #15 to merge and run make u in root dir and that should fix it autmatically.

@JaeAeich
Copy link

JaeAeich commented Aug 30, 2024

For linting you could either manually add fullstop in the pydoc of init.py file, or wait for #15 to merge and run make u in root dir and that should fix it autmatically.

Cookiecutter template has been updated, running make u should fix the issue that prropogate from template. If not then its this repo's issue, use make fl to fix those.

Signed-off-by: pushkarm029 <[email protected]>
@Pushkarm029
Copy link
Collaborator Author

CI green now @JaeAeich @uniqueg

@Pushkarm029
Copy link
Collaborator Author

Pushkarm029 commented Aug 30, 2024

I updated the cookiecutter by directly creating a new one. because on using make u, I am getting this error, maybe some typo: cruff cruft

(.venv) pushkarm029@thinkpad:~/cloud-telemetry(cookie-cutter⚡) » make u 

Updating the template +++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Using latest version from remote: https://github.com/elixir-cloud-aai/cookiecutter-python.
Command not found: cruff
make: *** [Makefile:118: update] Error 1

@JaeAeich
Copy link

I updated the cookiecutter by directly creating a new one. because on using make u, I am getting this error, maybe some typo: cruff cruft

(.venv) pushkarm029@thinkpad:~/cloud-telemetry(cookie-cutter⚡) » make u 

Updating the template +++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Using latest version from remote: https://github.com/elixir-cloud-aai/cookiecutter-python.
Command not found: cruff
make: *** [Makefile:118: update] Error 1

yeah, should be fixed in #16, idk how that got slipped in, if you find any more such issues, please report in the issues sections :).

@Pushkarm029
Copy link
Collaborator Author

Yeah, why not @JaeAeich, let us merge this then

@Pushkarm029 Pushkarm029 enabled auto-merge (squash) September 1, 2024 09:41
@Pushkarm029 Pushkarm029 disabled auto-merge September 1, 2024 10:14
@Pushkarm029 Pushkarm029 enabled auto-merge (squash) September 1, 2024 10:14
@Pushkarm029
Copy link
Collaborator Author

@uniqueg, could you approve this again to merge?

@Pushkarm029 Pushkarm029 merged commit 7037d43 into main Sep 2, 2024
11 checks passed
@Pushkarm029 Pushkarm029 deleted the cookie-cutter branch September 2, 2024 09:31
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.

3 participants