Code Monkey home page Code Monkey logo

py-template's Introduction

{{cookiecutter.repository}}

py-template's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

py-template's Issues

Fix poetry lock for automated actions

Currently when Python projects are run, poetry.lock is automatically
updated during linting (and other tests) as the pipeline is using
pre-commit.

We should disable tests (as these are run by separate workflow)
and poetry lock automated check (as these should be mostly local).

Do not fail fast test runners

Feedback from the first failing test suites might not be enough, hence we should switch to
to running all test runners even if some of them fail.

Specify Python version for tests

Currently all of the test have Python 3.x (3.11) for the test runners, while these should be tailored to specific Python version within os.matrix during CI.

Integrate ruff

Check whether scraping flake and flakeheaven for ruff would not be the best idea to proceed.

Difficulty will emerge when choosing rules as most of that has to be hand verified.

Run precommit only on changed files

Currently precommit runs on all files in some cases, which is unnecessary (as only the ones affected
should be checked).

pytest should be run on the whole test suite, as it is currently impossible to infer whether
any changes in src influenced existing tests.

Update "format" Keyword in pyproject.toml to "output-format"

Issue:

The style in which violation messages are presented by Ruff is indicated by the keyword "format" inside pyproject.toml, as shown below:

[tool.ruff]
format = "grouped"

Previously, this configuration used to work in our template. However, recently, it causes a failure with the following error:

Cause: TOML parse error at line 126, column 10
        |
126  | format = "grouped"
        |
invalid type: string "grouped", expected struct FormatOptions

Upon investigating the documentation, I found that the correct keyword should be "output-format" instead of "format".

Proposal:

I suggest updating the configuration in pyproject.toml to reflect the correct keyword "output-format" as follows:

[tool.ruff]
output-format = "grouped"

This change should resolve the parsing error and align with the documentation's requirements.

Fix minor issues

  • Do not fetch all commits for code linting & testing
  • Specify folders to lint explicitly
  • Make tests verbose

Support Python 3.11

Only pytype does not support Python 3.11 currently, we can
specify this dependency explicitly.

Adjustments to installed packages within tests might have to be
required due to above (e.g. installation of specific additional
dependencies instead of --all-extras)

Unify lowest supported version

Currently Python version support is not unified across py-template.

In order to align with most of the (scientific) Python, we should settle on
Python 3.9 or above, according to NEP29

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.