Skip to content

Commit 3aa3b13

Browse files
committed
Merge branch 'main' into feat_time_object_support
2 parents 2cea849 + ba386c2 commit 3aa3b13

74 files changed

Lines changed: 2664 additions & 1992 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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
exclude=.tox
3+
extend-ignore = E203
4+
max-line-length=120

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
cache: pip
17+
cache-dependency-path: |
18+
dev-requirements.txt
19+
fluent.syntax/setup.py
20+
fluent.runtime/setup.py
21+
- run: python -m pip install -r dev-requirements.txt
22+
- run: python -m pip install ./fluent.syntax ./fluent.runtime
23+
- run: python -m flake8
24+
- run: python -m mypy fluent.syntax/fluent fluent.runtime/fluent
25+
test:
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
os: [ubuntu-22.04, windows-2022]
30+
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12, pypy3.9, pypy3.10]
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
cache: pip
37+
cache-dependency-path: |
38+
fluent.syntax/setup.py
39+
fluent.runtime/setup.py
40+
- run: python -m pip install ./fluent.syntax ./fluent.runtime
41+
- run: python -m unittest discover -s fluent.syntax
42+
- run: python -m unittest discover -s fluent.runtime
43+
44+
# Test compatibility with the oldest Python version we claim to support,
45+
# and for fluent.runtime's compatibility with a range of fluent.syntax versions.
46+
compatibility:
47+
runs-on: ubuntu-20.04 # https://github.com/actions/setup-python/issues/544
48+
strategy:
49+
matrix:
50+
fluent-syntax:
51+
- ./fluent.syntax
52+
- fluent.syntax==0.19.0
53+
- fluent.syntax==0.18.1 six
54+
- fluent.syntax==0.17.0 six
55+
steps:
56+
- uses: actions/checkout@v3
57+
- uses: actions/setup-python@v4
58+
with:
59+
python-version: 3.6
60+
- run: python -m pip install ${{ matrix.fluent-syntax }}
61+
- run: python -m pip install ./fluent.runtime
62+
- run: python -m unittest discover -s fluent.runtime

.github/workflows/documentation.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,18 @@ jobs:
2626
name: build
2727
runs-on: ubuntu-latest
2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030
with:
3131
fetch-depth: 0
32-
- uses: actions/setup-python@v4
32+
- uses: actions/setup-python@v5
3333
with:
34-
python-version: 3.7
34+
python-version: 3.9
3535
- name: Install dependencies
3636
run: |
3737
pip install -r docs/requirements.txt
3838
pip install ./fluent.docs
39-
- name: sphinx-build
40-
run: |
41-
./scripts/build-docs python-fluent
42-
- name: artifact
43-
uses: actions/upload-artifact@v3
39+
- run: ./scripts/build-docs python-fluent
40+
- uses: actions/upload-artifact@v4
4441
with:
4542
name: html
4643
path: |
@@ -52,9 +49,8 @@ jobs:
5249
needs: [build]
5350
runs-on: ubuntu-latest
5451
steps:
55-
- uses: actions/checkout@v3
56-
- name: Download artifact
57-
uses: actions/download-artifact@v3
52+
- uses: actions/checkout@v4
53+
- uses: actions/download-artifact@v4
5854
with:
5955
name: html
6056
path: _build

.github/workflows/fluent.integration.yml

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

.github/workflows/fluent.runtime.yml

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

.github/workflows/fluent.syntax.yml

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

dev-requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
black ~= 24.0
2+
flake8 ~= 7.0
3+
isort ~= 5.0
4+
mypy ~= 1.0
5+
tox ~= 4.0
6+
types-babel
7+
types-pytz

docs/conf.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# -- Project information -----------------------------------------------------
1919

20-
project = 'python-fluent'
20+
project = "python-fluent"
2121

2222

2323
# -- General configuration ---------------------------------------------------
@@ -26,46 +26,48 @@
2626
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2727
# ones.
2828
extensions = [
29-
'sphinx.ext.intersphinx',
30-
'sphinx.ext.viewcode',
31-
'sphinx.ext.autodoc',
29+
"sphinx.ext.intersphinx",
30+
"sphinx.ext.viewcode",
31+
"sphinx.ext.autodoc",
3232
]
3333

3434
# Add any paths that contain templates here, relative to this directory.
35-
templates_path = ['_templates']
35+
templates_path = ["_templates"]
36+
3637

3738
# Add src_dir/docs/_templates in a hook as we only have the src_dir then.
3839
def setup(app):
39-
app.connect('config-inited', add_templates)
40+
app.connect("config-inited", add_templates)
41+
4042

4143
def add_templates(app, config):
42-
config.templates_path.insert(0, f'{app.srcdir}/_templates')
44+
config.templates_path.insert(0, f"{app.srcdir}/_templates")
45+
4346

4447
# List of patterns, relative to source directory, that match files and
4548
# directories to ignore when looking for source files.
4649
# This pattern also affects html_static_path and html_extra_path.
47-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
50+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
4851

4952

5053
# -- Options for HTML output -------------------------------------------------
5154

5255
# The theme to use for HTML and HTML Help pages. See the documentation for
5356
# a list of builtin themes.
5457
#
55-
html_theme = 'nature'
58+
html_theme = "nature"
5659

5760
# Add any paths that contain custom static files (such as style sheets) here,
5861
# relative to this directory. They are copied after the builtin static files,
5962
# so a file named "default.css" will overwrite the builtin "default.css".
60-
html_static_path = ['_static']
61-
html_css_files = ['project-fluent.css']
62-
html_js_files = ['versions.js']
63+
html_static_path = ["_static"]
64+
html_css_files = ["project-fluent.css"]
65+
html_js_files = ["versions.js"]
6366

6467
html_sidebars = {
65-
'**': ['globaltoc.html', 'versions.html', 'searchbox.html'],
66-
}
67-
html_theme_options = {
68+
"**": ["globaltoc.html", "versions.html", "searchbox.html"],
6869
}
70+
html_theme_options = {}
6971

7072
# -- Extension configuration -------------------------------------------------
7173

@@ -76,6 +78,6 @@ def add_templates(app, config):
7678

7779
# -- Options for autodoc extension --------------------------------------------
7880
autodoc_mock_imports = [
79-
'attr',
81+
"attr",
8082
]
81-
autodoc_member_order = 'bysource'
83+
autodoc_member_order = "bysource"

0 commit comments

Comments
 (0)