Skip to content

Commit

Permalink
basic changes
Browse files Browse the repository at this point in the history
Signed-off-by: Prati28 <[email protected]>
  • Loading branch information
psankhe28 committed Jul 3, 2024
1 parent 119c581 commit af32296
Show file tree
Hide file tree
Showing 8 changed files with 333 additions and 126 deletions.
12 changes: 6 additions & 6 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"template": "D:\\open-source\\gsoc\\final\\cookiecutter-python",
"commit": "88967f43af9799dfa0ad04b2908d7f40259c02d2",
"template": "https://github.com/elixir-cloud-aai/cookiecutter-python",
"commit": "43f9bd92eaf21557e87d3932524fe5ffb6fd7ef4",
"checkout": null,
"context": {
"cookiecutter": {
"author_name": "Elixir Cloud AAI",
"author_name": "ELIXIR Cloud AAI",
"author_email": "[email protected]",
"development_status": "Beta",
"short_description": "File Handler Utilizing TUS and Minio (S3 Storage) with DRS Filer Integration",
"development_status": "Alpha",
"short_description": "File handler utilizing TUS and MinIO with DRS-Filer integration",
"project_name": "tus-storagehandler",
"project_slug": "tus_storagehandler",
"github_username": "elixir-cloud-aai",
"python_version": "3.11",
"add_script": "y",
"year": "2024",
"_template": "D:\\open-source\\gsoc\\final\\cookiecutter-python"
"_template": "https://github.com/elixir-cloud-aai/cookiecutter-python"
}
},
"directory": null
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
integration-test:
name: Unit Test
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Check out repository
Expand Down
4 changes: 0 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ repos:
- id: mdformat
additional_dependencies:
- mdformat-config
- mdformat-black
- mdformat-frontmatter
args: [--wrap=80]
exclude: _.+\.md|CHANGELOG\.md
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
Expand Down
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2024 Elixir Cloud AAI
Copyright 2024 ELIXIR Cloud AAI

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
43 changes: 21 additions & 22 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,27 @@ Generally, **PRs are only reviewed when all boxes are ticked off and all
automated checks pass** (use the comment section below if you believe that
your PR is ready to be merged even though not all boxes were ticked off). -->

- [ ] My code follows the [contributing guidelines][contributing-guidelines] of this
project, including, in particular, with regard to any style guidelines
- [ ] The title of my PR complies with the [Conventional Commits
specification][conv-commits]; in particular, it clearly indicates
that a change is a breaking change
- [ ] I acknowledge that all my commits will be squashed into a single commit,
using the PR title as the commit message
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code in hard-to-understand areas
- [ ] I have updated the user-facing documentation to describe any new or
changed behavior
- [ ] I have added type annotations for all function/class/method interfaces
or updated existing ones (only for Python, TypeScript, etc.)
- [ ] I have provided appropriate documentation ([Google-style Python
docstrings][py-doc-google]) for all packages/modules/functions/classes/
methods or updated existing ones
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature
works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have not reduced the existing code coverage

- \[ \] My code follows the [contributing guidelines][contributing-guidelines] of this
project, including, in particular, with regard to any style guidelines
- \[ \] The title of my PR complies with the [Conventional Commits
specification][conv-commits]; in particular, it clearly indicates
that a change is a breaking change
- \[ \] I acknowledge that all my commits will be squashed into a single commit,
using the PR title as the commit message
- \[ \] I have performed a self-review of my own code
- \[ \] I have commented my code in hard-to-understand areas
- \[ \] I have updated the user-facing documentation to describe any new or
changed behavior
- \[ \] I have added type annotations for all function/class/method interfaces
or updated existing ones (only for Python, TypeScript, etc.)
- \[ \] I have provided appropriate documentation ([Google-style Python
docstrings][py-doc-google]) for all packages/modules/functions/classes/
methods or updated existing ones
- \[ \] My changes generate no new warnings
- \[ \] I have added tests that prove my fix is effective or that my feature
works
- \[ \] New and existing unit tests pass locally with my changes
- \[ \] I have not reduced the existing code coverage

#### Comments

Expand Down
212 changes: 212 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
# Python Cookiecutter Template

This is a Cookiecutter template for creating a Python project with Poetry,
including configurations for various project settings.

## Table of Contents

- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
- [Configurations](#configurations)
- [Package manager - Poetry](#package-manager---poetry)
- [Linters and formatters - Ruff](#linters-and-formatters---ruff)
- [Spell checker - Typos](#spell-checker---typos)
- [Static type checker - Mypy](#static-type-checker---mypy)
- [Documentation - Sphinx](#documentation---sphinx)
- [Testing - pytest and pytest-cov](#testing---pytest-and-pytest-cov)
- [CI/CD - GitHub Actions](#cicd---github-actions)
- [Disclaimer](#disclaimer)
- [Contributing](#contributing)
- [Code of Conduct](#code-of-conduct)
- [Versioning](#versioning)
- [License](#license)
- [Contact](#contact)

## Usage

1. **Install cruft** (if you haven't already):

```sh
pip install cruft
```

2. **Generate a New Project**:

```sh
cruft create https://github.com/elixir-cloud-aai/cookiecutter-python.git
```

### Don't wanna use cruft?

You can also use the `cookiecutter` command directly:

1. **Install cookiecutter** (if you haven't already):

```sh
pip install cookiecutter
```

2. **Generate a New Project**:

```sh
cookiecutter gh:elixir-cloud-aai/cookiecutter-python
```

> **Note**: If you're using just `cookiecutter`, manually remove
`update-template` job from `update.yaml` github action workflow file as
`cookiecutter` doesn't support autosync like cruft.

## Configurations

### Package manager - Poetry

This project uses [Poetry][poetry-org] as a package manager. Check out the
commands at the [official documentation][poetry-docs].

### Linters and formatters - Ruff

To lint and format `Python` code files, it uses [Ruff][ruff], the default
configuration is set in the `pyproject.toml` file.

```toml
select = [
"B", # flake8-bugbear
"E", # pycodestyle
"F", # Pyflakes
"I", # isort
"PL", # pylint
"SIM", # flake8-simplify
"UP", # pyupgrade
]
```

To configure it to your needs, refer to the [rules documentation][rudff-linter]
, and for formatter configuration, refer to the
[configuration documentation][ruff-formatter].

### Spell checker - Typos

If you want to ignore certain words, add them to the `pyproject.toml` file,
under the `tool.typos.default.extend-words` key.

```toml
[tool.typos.default.extend-words]
mke = 'mke'
```

For further configuration, refer to the [typos docs][typos-docs].

### Static type checker - Mypy

Change the configuration in `pyproject.toml` file, for further information refer to
the [documentation][mypy-config].

### Documentation - Sphinx

Configuration for Sphinx is in the `docs/source/conf.py` file, for further info refer
to the [Sphinx documentation][sphinx-docs]. The default configuration uses
[furo theme][furo] and [ReadTheDocs][rtd] to host the documentation, you can
change the configuration using `/docs/source/conf.py` and `.readthedocs.yml`
file.

> **Note**: Make sure to setup the `ReadTheDocs` account and add the project to
the account to host the documentation.

### Testing - pytest and pytest-cov

Generate a coverage report using `pytest-cov` and uploads it to codecov.io.

> **Note**: Make sure to setup the `Codecov` account and add the project to the
account to host the coverage report and add github [token](#cicd---github-actions).

## CI/CD - GitHub Actions

Here are the GitHub Actions Secrets that need to be included in the repository
settings:

- `PYPI_PASSWORD`: PyPI account password.
- `CODECOV_TOKEN`: Codecov token.
- `AUTO_UPDATE_GITHUB_TOKEN`: GitHub token with permissions to write to the repository.

## Disclaimer

Some of the links and images have been hardcoded with `ELIXIR Cloud & AAI`'s
assets in the documentation, please update them manually if needed. These
assets **MUST** be included for projects owned by ELIXIR Cloud & AAI, but
**MUST NOT** be included for projects that are not (personal projects, projects
owned by other orgs).

**Only`markdown` files and `images/` directory need to be changed.**

## Contributing

This project is a community effort and lives off _your_ contributions, be it in
the form of bug reports, feature requests, discussions, fixes or any other form
of contribution!

Please refer to the guidelines available at [`CONTRIBUTING.md`][contributing] if
you are interested in contributing.

## Code of Conduct

Please mind the code of conduct described in
[`CODE_OF_CONDUCT.md`][code-of-conduct] for all interactions with the community.
Please be nice to one another! :)

If you experience any unacceptable behavior by any member of the community,
please refer to the contact method specified in
[`CODE_OF_CONDUCT.md`][code-of-conduct] to report the incident to the community
leaders.

## Versioning

The project adopts the [semantic versioning][semver] scheme for versioning.
Currently the service is in a pre-release stage, so changes to the API,
including breaking changes, may occur at any time without further notice.

## License

This project is distributed under the [Apache License 2.0][badge-license-url], a
copy of which is also available in [`LICENSE`][license].

## Contact

The project is maintained by [ELIXIR Cloud & AAI][elixir-cloud-aai], a Driver
Project of the [Global Alliance for Genomics and Health (GA4GH)][ga4gh], under
the umbrella of the [ELIXIR][elixir] [Compute Platform][elixir-compute].

To get in touch with us, please use one of the following routes:

- For filing bug reports, feature requests or other code-related issues, please
make use of the project's
[issue tracker](https://github.com/elixir-cloud-aai/cookiecutter-python/issues).
- For private/personal issues, more involved communication, or if you would like
to join our team as a regular contributor, you can either join our
[chat board][badge-chat-url] or [email] the community leaders.

[![logo-elixir]][elixir] [![logo-elixir-cloud-aai]][elixir-cloud-aai]

[badge-chat-url]: https://join.slack.com/t/elixir-cloud/shared_invite/enQtNzA3NTQ5Mzg2NjQ3LTZjZGI1OGQ5ZTRiOTRkY2ExMGUxNmQyODAxMDdjM2EyZDQ1YWM0ZGFjOTJhNzg5NjE0YmJiZTZhZDVhOWE4MWM
[badge-license-url]: http://www.apache.org/licenses/LICENSE-2.0
[code-of-conduct]: CODE_OF_CONDUCT.md
[contributing]: https://elixir-cloud-aai.github.io/guides/guide-contributor/
[elixir]: https://elixir-europe.org/
[elixir-cloud-aai]: https://elixir-cloud.dcc.sib.swiss/
[elixir-compute]: https://elixir-europe.org/platforms/compute
[email]: mailto:[email protected]
[ga4gh]: https://ga4gh.org/
[license]: LICENSE
[logo-elixir]: images/logo-elixir.svg
[logo-elixir-cloud-aai]: images/logo-elixir-cloud-aai.svg
[poetry-org]: https://python-poetry.org/
[poetry-docs]: https://python-poetry.org/docs/cli/
[ruff]: https://docs.astral.sh/ruff
[ruff-linter]: https://docs.astral.sh/ruff/rules/
[ruff-formatter]: https://docs.astral.sh/ruff/formatter
[typos-docs]: https://pypi.org/project/typos/
[mypy-config]: https://mypy.readthedocs.io/en/stable/config_file.html
[sphinx-docs]: https://www.sphinx-doc.org/en/master/usage/configuration.html
[furo]: https://pradyunsg.me/furo/quickstart/
[rtd]: https://readthedocs.org/
[semver]:https://semver.org/
Loading

0 comments on commit af32296

Please sign in to comment.