Skip to content

Commit dd5cc24

Browse files
authored
Merge pull request #7 from finecode-dev/feature/envs
Execution Environments
2 parents 083d6d9 + b33358e commit dd5cc24

File tree

200 files changed

+5901
-8864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+5901
-8864
lines changed

.github/workflows/ci-cd.yml

Lines changed: 18 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ defaults:
99
run:
1010
shell: bash
1111

12+
env:
13+
# python version for dev workspace
14+
DEV_WORKSPACE_PYTHON_VERSION: '3.13'
15+
16+
1217
jobs:
1318
build:
1419
runs-on: ${{ matrix.os }}
@@ -17,7 +22,6 @@ jobs:
1722
max-parallel: 1
1823
matrix:
1924
os: [ubuntu-24.04, macos-13, windows-2022]
20-
python-version: ["3.13"]
2125
include:
2226
- os: ubuntu-24.04
2327
name: Linux
@@ -29,150 +33,39 @@ jobs:
2933
steps:
3034
- uses: actions/checkout@v4
3135

32-
- name: Install poetry
33-
run: pipx install poetry==2.1.2
34-
35-
- name: Set up Python ${{ matrix.python-version }}
36+
- name: Set up Python ${{ env.DEV_WORKSPACE_PYTHON_VERSION }}
3637
uses: actions/setup-python@v5
3738
with:
38-
python-version: ${{ matrix.python-version }}
39-
cache: "poetry"
39+
python-version: ${{ env.DEV_WORKSPACE_PYTHON_VERSION }}
4040

4141
- name: Install dependencies
4242
run: |
43-
# poetry default git client `dulwich` doesn't work properly with git urls
44-
# to dependencies, which we use
45-
poetry config system-git-client true
46-
47-
FINECODE_SH_TEMPLATE="poetry run python"
48-
49-
poetry install
50-
echo $FINECODE_SH_TEMPLATE > finecode.sh
51-
52-
pushd tests/list_ws/backend
53-
poetry install
54-
echo $FINECODE_SH_TEMPLATE > finecode.sh
55-
popd
56-
57-
pushd tests/list_ws/cli_tool
58-
poetry install
59-
echo $FINECODE_SH_TEMPLATE > finecode.sh
60-
popd
61-
62-
pushd tests/list_ws/ui_app
63-
poetry install
64-
echo $FINECODE_SH_TEMPLATE > finecode.sh
65-
popd
66-
67-
pushd tests/nested_package/pyback
68-
poetry install
69-
echo $FINECODE_SH_TEMPLATE > finecode.sh
70-
popd
43+
python -m venv .venvs/dev_workspace
44+
source .venvs/dev_workspace/bin/activate
45+
python -m pip install --upgrade pip==25.1.1
46+
python -m pip install --group="dev_workspace"
7147
72-
pushd finecode_extension_api
73-
poetry install
74-
echo $FINECODE_SH_TEMPLATE > finecode.sh
75-
popd
48+
python -m finecode prepare-envs
7649
shell: bash
7750

51+
# TODO: install all other supported python versions. Version can be extracted from finecode
52+
7853
# - name: Lint
7954
# run: |
8055
# poetry run python -m finecode run lint
8156
# shell: bash
8257

83-
- name: Build finecode_extension_api
84-
if: runner.os == 'Linux'
85-
run: |
86-
pushd finecode_extension_api
87-
poetry build
88-
popd
89-
shell: bash
90-
91-
- name: Build fine_python_ast
92-
if: runner.os == 'Linux'
93-
run: |
94-
pushd extensions/fine_python_ast
95-
poetry build
96-
popd
97-
shell: bash
98-
99-
- name: Build fine_python_black
100-
if: runner.os == 'Linux'
101-
run: |
102-
pushd extensions/fine_python_black
103-
poetry build
104-
popd
105-
shell: bash
106-
107-
- name: Build fine_python_flake8
108-
if: runner.os == 'Linux'
109-
run: |
110-
pushd extensions/fine_python_flake8
111-
poetry build
112-
popd
113-
shell: bash
114-
115-
- name: Build fine_python_isort
58+
- name: Build all packages
11659
if: runner.os == 'Linux'
11760
run: |
118-
pushd extensions/fine_python_isort
119-
poetry build
120-
popd
121-
shell: bash
122-
123-
- name: Build fine_python_module_exports
124-
if: runner.os == 'Linux'
125-
run: |
126-
pushd extensions/fine_python_module_exports
127-
poetry build
128-
popd
129-
shell: bash
130-
131-
- name: Build fine_python_mypy
132-
if: runner.os == 'Linux'
133-
run: |
134-
pushd extensions/fine_python_mypy
135-
poetry build
136-
popd
137-
shell: bash
138-
139-
- name: Build fine_python_format
140-
if: runner.os == 'Linux'
141-
run: |
142-
pushd presets/fine_python_format
143-
poetry build
144-
popd
145-
shell: bash
146-
147-
- name: Build fine_python_lint
148-
if: runner.os == 'Linux'
149-
run: |
150-
pushd presets/fine_python_lint
151-
poetry build
152-
popd
153-
shell: bash
154-
155-
- name: Build fine_python_recommended
156-
if: runner.os == 'Linux'
157-
run: |
158-
pushd presets/fine_python_recommended
159-
poetry build
160-
popd
161-
shell: bash
162-
163-
- name: Build finecode
164-
if: runner.os == 'Linux'
165-
run: |
166-
python -m venv .dev_workspace_venv
167-
source .dev_workspace_venv/bin/activate
168-
python -m pip install --upgrade pip==25.1.1
169-
python -m pip install --group="dev_workspace"
170-
python -m build
61+
source .venvs/dev_workspace/bin/activate
62+
python -m finecode run build
17163
shell: bash
17264

17365
- name: Collect all distribution packages
17466
if: runner.os == 'Linux'
17567
run: |
68+
# TODO: finecode action to copy only updated packages in dist
17669
mkdir -p dist
17770
cp finecode_extension_api/dist/* dist/
17871
cp extensions/fine_python_ast/dist/* dist/

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ __pycache__
66
dist
77

88
src/finecode/_version.py
9-
src/finecode.egg-info
9+
src/finecode.egg-info
10+
11+
.venvs
12+
finecode_config_dump/
13+
build/

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# FineCode
22

3-
**Status Update (04.06.2025):** FineCode is available for use, but the current version is intended only for personal testing, not for production use, as we actively work on improving execution environments, which will undergo significant changes. Initial release with new execution environments is expected in July 2025.
4-
53
## Personalize and improve your development experience
64

75
FineCode is a tool runner and set of utilities for creating tools for software developers.
@@ -23,7 +21,7 @@ With FineCode you can:
2321
dev_workspace = ["finecode==0.2.*"]
2422
```
2523

26-
1.1.2 Create dev_workspace venv: `python -m venv .venvs/dev_workspace` (https://docs.python.org/3/library/venv.html#creating-virtual-environments )
24+
1.1.2 Create dev_workspace venv: `python -m venv .venvs/dev_workspace` ([Python Docs](https://docs.python.org/3/library/venv.html#creating-virtual-environments ))
2725

2826
1.1.3 Activate this venv and install dependencies from `dev_workspace` group:
2927
```
@@ -45,10 +43,10 @@ NOTE: `pip install` supports `--group` parameter since pip 25.1. Make sure you h
4543

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

48-
1.2.1 Run `prepare_env` finecode action:
46+
1.2.1 Run `prepare-envs` finecode command:
4947

5048
```bash
51-
python -m finecode run prepare_env
49+
python -m finecode prepare-envs
5250
```
5351

5452
1.3 Enable finecode and preset

extensions/fine_python_ast/fine_python_ast/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from .iast_provider import IPythonSingleAstProvider
21
from .ast_provider import PythonSingleAstProvider
2+
from .iast_provider import IPythonSingleAstProvider
33

44
__all__ = [
55
"IPythonSingleAstProvider",

0 commit comments

Comments
 (0)