Skip to content

Commit e4f415d

Browse files
authored
Fluentogram 1.2.0
* Remove old code * Return ability to get translation by `_getattr__`. * Update dependencies. * Update .gitignore. * Remove docs. * Add tests and add CI for that. * Fix CI. * Add pre-commit. * Remove useless abc. * Add ability to update locales and add nats kv storage. * Update base and nats kv storages, update tests. * Add tests for transformers. * Add README. * Add parser and stub generator with cli. * Bump version and update description. * Workaround for conflicts in ftl files. * Fix tests. * Update stub generator. * Fix tests. * Rework generator and update tests. * Update pyptoject.toml * Add CLI info to README. * Rework generator (again :D) * placeholders as set * No, better to check in value already in list. * Fix tests. * Handle conflict when two translates has same prefix. * Add types for arguments. * Handle in name is not valid python name * Add `FileStorage`. * Push missed locales. * Backward compatibility for nats storage. * Update README. * Run tests on supported python versions. * Fix tests on python 3.9 * Add watchdog for cli and add backward compatibility.
1 parent b53ed03 commit e4f415d

88 files changed

Lines changed: 2328 additions & 2370 deletions

Some content is hidden

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

.flake8

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: fluentogram-tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
pre-commit-check:
13+
if: github.event.pull_request.draft == false
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
- name: Set $PY environment variable
21+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
22+
- uses: actions/cache@v4
23+
with:
24+
path: ~/.cache/pre-commit
25+
key: pre-commit|${{ hashFiles('.pre-commit-config.yaml') }}
26+
- uses: pre-commit/action@v3.0.1
27+
28+
test:
29+
strategy:
30+
matrix:
31+
python-version: ["3.9", "3.10", "3.11", "3.12"]
32+
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: ${{ matrix.python-version }}
43+
44+
- name: Install dependencies
45+
run: |
46+
python -m pip install --upgrade pip
47+
pip install uv
48+
uv pip install --system .[dev]
49+
50+
- name: Run tests
51+
run: pytest tests

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ dmypy.json
7474
.pytype/
7575
cython_debug/
7676
.idea
77+
.vscode

.gitlab-ci.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
default_stages: [pre-commit, pre-merge-commit]
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v5.0.0
5+
hooks:
6+
- id: no-commit-to-branch
7+
args: [ '--branch', 'master' ]
8+
- id: end-of-file-fixer
9+
files: ^fluentogram/
10+
- id: trailing-whitespace
11+
files: ^fluentogram/
12+
13+
- repo: local
14+
hooks:
15+
- id: lint
16+
name: Linter
17+
entry: "scripts/lint-pre-commit.sh"
18+
language: python
19+
types: [python]
20+
require_serial: true
21+
verbose: true
22+
23+
- repo: https://github.com/Yelp/detect-secrets
24+
rev: v1.5.0
25+
hooks:
26+
- id: detect-secrets
27+
args: ['--baseline', '.secrets.baseline']
28+
stages: [pre-commit, pre-merge-commit, manual]

.secrets.baseline

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
{
2+
"version": "1.5.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "DiscordBotTokenDetector"
25+
},
26+
{
27+
"name": "GitHubTokenDetector"
28+
},
29+
{
30+
"name": "GitLabTokenDetector"
31+
},
32+
{
33+
"name": "HexHighEntropyString",
34+
"limit": 3.0
35+
},
36+
{
37+
"name": "IbmCloudIamDetector"
38+
},
39+
{
40+
"name": "IbmCosHmacDetector"
41+
},
42+
{
43+
"name": "IPPublicDetector"
44+
},
45+
{
46+
"name": "JwtTokenDetector"
47+
},
48+
{
49+
"name": "KeywordDetector",
50+
"keyword_exclude": ""
51+
},
52+
{
53+
"name": "MailchimpDetector"
54+
},
55+
{
56+
"name": "NpmDetector"
57+
},
58+
{
59+
"name": "OpenAIDetector"
60+
},
61+
{
62+
"name": "PrivateKeyDetector"
63+
},
64+
{
65+
"name": "PypiTokenDetector"
66+
},
67+
{
68+
"name": "SendGridDetector"
69+
},
70+
{
71+
"name": "SlackDetector"
72+
},
73+
{
74+
"name": "SoftlayerDetector"
75+
},
76+
{
77+
"name": "SquareOAuthDetector"
78+
},
79+
{
80+
"name": "StripeDetector"
81+
},
82+
{
83+
"name": "TelegramBotTokenDetector"
84+
},
85+
{
86+
"name": "TwilioKeyDetector"
87+
}
88+
],
89+
"filters_used": [
90+
{
91+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
92+
},
93+
{
94+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
95+
"min_level": 2
96+
},
97+
{
98+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
99+
},
100+
{
101+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
102+
},
103+
{
104+
"path": "detect_secrets.filters.heuristic.is_lock_file"
105+
},
106+
{
107+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
108+
},
109+
{
110+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
111+
},
112+
{
113+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
114+
},
115+
{
116+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
117+
},
118+
{
119+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
120+
},
121+
{
122+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
123+
}
124+
],
125+
"results": {},
126+
"generated_at": "2025-06-28T20:21:22Z"
127+
}

0 commit comments

Comments
 (0)