Skip to main content

No project description provided

Project description

FineCode

NOT INTENDED FOR EXTERNAL USE YET. CONFIGURATION AND API ARE UNSTABLE AND IN ACTIVE DEVELOPMENT.

The first beta release indended for public testing is planned in May 2025.

Personalize and improve your development experience

FineCode is a tool runner and set of utilities for creating tools for software developers.

With FineCode you can:

  • make tool configuration in your project reusable and distributable(see Presets below)
  • improve integration of tools used in the project with IDE, especially in workspace setup
  • create your own tools with IDE integration out of the box, and IDE extensios as well

Getting started: example how to setup linting and formatting in your project

1.1 Install FineCode. The exact command depends on the package manager you are using.

`pip install finecode`

1.2 Create finecode.sh in root of your project with path to python executable from virtualenv of the project. We recommend also to add it to .gitignore. Example:

`.venv/bin/python`

1.3 Using existing preset

Install package with the preset, for example:

pip install fine_python_recommended

For list of presets from FineCode authors see 'Presets' section below.

1.4 Enable finecode and preset

[tool.finecode]
presets = [
    { source = "fine_python_recommended" }
]

1.5 For integration with VSCode, install FineCode extension

CLI

In virtualenv of your project you can use the following command:

python -m finecode run [run_options] <list_of_actions> [actions_payload]

Available run options:

  • --workdir="<path>" ... use provided directory as work directory
  • --project="<name>" ... run actions only in this project. Multiple projects can be selected by providing multiple --project="<name>" options
  • --concurrently ... run actions concurrently. Single projects are always handled concurrently, this option determines whether actions inside of single project are run concurrently or not
  • --trace ... activate trace(more detailed) logging

If no projects are provided via options, FineCode will interpret working directory as workspace root, find all projects in it and run provided actions in all projects, in which they exist.

If projects are provided, actions are expected to exist in all of them.

Actions payload: if actions require payload or you want to run them with payload other than configured, you can provide it after names of actions.

Examples:

  • python -m finecode run --concurrently lint check_formatting ... run lint and check_formatting actions concurrently in all projects in the workspace, root of which is in current working directory
  • python -m finecode --workdir="./finecode_extension_api" run lint check_formatting ... run lint and check_formatting sequentially in finecode_extension_api directory (project is there)
  • python -m finecode --project="fine_python_mypy" --project="fine_python_ruff" run lint ... run lint action in projects fine_python_mypy and fine_python_ruff. They should be discoverable from the working directory.

Extensions from FineCode authors

Presets

  • fine_python_recommended
  • fine_python_format
  • fine_python_lint

Actions and action handlers

Directory with actions

  • lint
    • Flake8
    • Ruff
    • Mypy
  • format
    • Black
    • isort

IDE

TODO: list all from LSP

Workspace with multiple subprojects

Reusing config

To reuse configuration in multiple subprojects, put it in a separate package in your workspace and add it as dev dependency in all subprojects in which you want to use it.

Design decision: there are multiple ways to achieve the same result:

  • separate package
    • configuration of subprojects doesn't depend on file structure of the workspace. Subproject can be moved in another place or even outside of workspace and this will not affect its configuration, only if path to package with common configuration was file path, it should be changed.
    • fully transparent: the full configuration is known in a subproject without searching workspace root and analyzing the workspace
  • hierarchical configuration
    • makes subprojects more dependent on workspace, in case of moving subproject, additional actions with configurations are needed to keep it the same
  • letting to define reusable part on workspace level and provide it automatically to all subprojects
    • not transparent, part of configuration is implicit
    • FineCode needs to check whether it was started in workspace or in subproject, go deeper in file tree and find workspace root to resolve all configurations

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finecode-0.2.0.tar.gz (307.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finecode-0.2.0-py3-none-any.whl (83.1 kB view details)

Uploaded Python 3

File details

Details for the file finecode-0.2.0.tar.gz.

File metadata

  • Download URL: finecode-0.2.0.tar.gz
  • Upload date:
  • Size: 307.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for finecode-0.2.0.tar.gz
Algorithm Hash digest
SHA256 149001825d27403e18c935f67b710184cea3cf3b846283996a595fabcc41d67e
MD5 3ddef30b7c2b170bfa71231150c24ca7
BLAKE2b-256 40709a0302446999f1da60c43c3af5c37e1c4da92a5794d5a160882e4a5b3fa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for finecode-0.2.0.tar.gz:

Publisher: ci-cd.yml on finecode-dev/finecode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file finecode-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: finecode-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 83.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for finecode-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42e4980a219a91e9c8a84e51d5df3f7c43d160230bb0fb6001a3e4f28a42041c
MD5 60a4a37fd9223e0a3b3cd4242d068063
BLAKE2b-256 68dc6a0db12c110cf5323dd6eb793139e2862bcc650547f56da7a2ba4c494764

See more details on using hashes here.

Provenance

The following attestation bundles were made for finecode-0.2.0-py3-none-any.whl:

Publisher: ci-cd.yml on finecode-dev/finecode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page