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(init): init from template #10

Merged
merged 9 commits into from
Aug 6, 2024
Merged

chore(init): init from template #10

merged 9 commits into from
Aug 6, 2024

Conversation

JaeAeich
Copy link
Collaborator

@JaeAeich JaeAeich commented Aug 1, 2024

Use cookiecutter to initialize the project.

Summary by Sourcery

Initialize the tus-storagehandler project using the cookiecutter template. This includes setting up the project structure, adding CI/CD workflows, documentation, initial tests, and various configuration files for code quality and security checks.

CI:

  • Add GitHub Actions workflows for code quality, PR validation, code testing, documentation checks, and vulnerability tests.
  • Add custom GitHub Action for setting up Python and Poetry environments.

Deployment:

  • Add GitHub Actions workflow for releasing package to PyPI.

Documentation:

  • Revamp README.md with new project structure, badges, and detailed sections for usage, installation, development, contributing, code of conduct, versioning, license, and contact information.
  • Add Sphinx configuration and Makefile for generating project documentation.
  • Add .readthedocs.yaml for Read the Docs configuration.

Tests:

  • Add initial unit and integration tests for the project structure.
  • Add pre-commit configuration for various code quality checks.

Chores:

  • Initialize project structure using cookiecutter template.
  • Add .markdownlint.yaml and .yamllint.yaml for linting markdown and YAML files.
  • Add .safety-policy.yml for configuring safety checks.
  • Add PULL_REQUEST_TEMPLATE.md and ISSUE_TEMPLATE for standardizing contributions.

Copy link
Contributor

sourcery-ai bot commented Aug 1, 2024

Reviewer's Guide by Sourcery

This pull request initializes the tus-storagehandler project using the cookiecutter template. It includes the addition of various configuration files, documentation, tests, and GitHub workflows for CI/CD, code quality, and documentation checks. The README.md file has been completely revamped to include badges, a table of contents, and detailed sections for usage, installation, development, contributing, code of conduct, versioning, license, and contact.

File-Level Changes

Files Changes
README.md
Makefile
docs/source/conf.py
.github/actions/setup/poetry/action.yaml
.github/workflows/code_quality.yaml
.github/workflows/pr_validation.yaml
.github/workflows/code_test.yaml
.markdownlint.yaml
PULL_REQUEST_TEMPLATE.md
.github/workflows/update.yaml
.github/ISSUE_TEMPLATE/general-purpose.md
.github/workflows/docs.yaml
.github/workflows/vulnerability.yaml
.pre-commit-config.yaml
.safety-policy.yml
docs/make.bat
.github/workflows/release_pypi.yaml
.cruft.json
docs/Makefile
.readthedocs.yaml
tests/test_integration/test_init.py
tests/test_unit/test_init.py
.yamllint.yaml
tus_storagehandler/main.py
tests/__init__.py
tests/test_integration/__init__.py
tests/test_unit/__init__.py
tus_storagehandler/__init__.py
Initialized the project using the cookiecutter template, adding various configuration files, documentation, tests, and GitHub workflows for CI/CD, code quality, and documentation checks.

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
Contributor

@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 @JaeAeich - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟡 Testing: 2 issues found
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 3 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.

Makefile 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
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
docs/source/pages/tus_storagehandler.rst Show resolved Hide resolved
@JaeAeich JaeAeich mentioned this pull request Aug 1, 2024
@JaeAeich
Copy link
Collaborator Author

JaeAeich commented Aug 1, 2024

@uniqueg Please add codecov tokens for this repo!! Otherwise the CI will fail.

@JaeAeich JaeAeich requested a review from uniqueg August 1, 2024 15:41
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.

Let's discuss at the meeting with @psankhe28

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@JaeAeich
Copy link
Collaborator Author

JaeAeich commented Aug 5, 2024

@psankhe28 I meant add it from teh readme from main, I don't think you need to remove anything from the readme.

I meant adding there instructions

TUS Storage Handler
Synopsis
This Flask application provides endpoints for uploading, downloading, and listing files in a MinIO bucket, with TUS protocol support for uploads, and CORS enabled for cross-origin requests.

Installation
Prerequisites
This flask application requires a running instance of [minio](https://min.io/download)

Run the minio instance by executing the following command in the location where minio is installed

minio server /data --console-address ":9001"

Download the required dependencies

Navigate to the folder TusStorageHandler
Create a virtual environment and activate it (optional)
pip install -r requirements.txt
Running the application
flask run The application will be running on http://127.0.0.1:5000 by default.

If they are not needed or have changed, ig better revert it, unless ofc you have a reason.

@psankhe28 psankhe28 requested a review from uniqueg August 5, 2024 15:26
@uniqueg uniqueg changed the title chore(init): initialize tus-storagehandler with cookiecutter chore(init): init from template Aug 5, 2024
uniqueg
uniqueg previously approved these changes Aug 5, 2024
@JaeAeich
Copy link
Collaborator Author

JaeAeich commented Aug 5, 2024

Hey @psankhe28 spell check failed, spelling for synopsis is wrong 😅

@uniqueg have up not added the token or there is something wrong with ci?

Copy link

codecov bot commented Aug 6, 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 6, 2024

Hey @psankhe28 spell check failed, spelling for synopsis is wrong 😅

@uniqueg have up not added the token or there is something wrong with ci?

Indeed, CODECOV_TOKEN was not set - it is now, and tests pass (PYPI_TOKEN is set organization-wide).

BUT, @JaeAeich: I don't understand the AUTO_UPDATE_GITHUB_TOKEN. The linked documentation does not make sense, as it is specific to GITHUB_TOKEN, which is auto-generated (and destroyed) by GitHub for each job (see, e.g., here):

image

It seems to me that either the Action that uses AUTO_UPDATE_GITHUB_TOKEN should use GITHUB_TOKEN instead - the settings are configured correctly as per the linked instructions:

image

Or the instructions should instead describe how (and with what exact permissions) AUTO_UPDATE_GITHUB_TOKEN should be created.

Do you want to test and change that before or after merging this PR?

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.

I'm approving, despite #10 (comment), as we can always fix the update.yaml later, if necessary.

@psankhe28 psankhe28 merged commit 0516517 into main Aug 6, 2024
11 checks passed
@psankhe28 psankhe28 deleted the init branch August 6, 2024 08:19
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