-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tim Van Campenhout
committed
Sep 24, 2024
1 parent
8a37e90
commit 256bd9c
Showing
12 changed files
with
156 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: language-tags backend tests | ||
on: | ||
push: | ||
paths: | ||
- language-tags/** | ||
- tests/** | ||
- language-tags.yaml | ||
- pyproject.toml | ||
- requirements*.txt | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ "3.10", "3.11", "3.12" ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# You can test your matrix by printing the current Python version | ||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
|
||
- name: Install python requirements | ||
env: | ||
HATCH_BUILD_NO_HOOKS: true | ||
working-directory: ./ | ||
run: | | ||
pip --version | ||
pip install pip-tools | ||
pip-sync requirements-dev.txt | ||
pip install -e . | ||
- name: Python tests | ||
run: pytest tests --exitfirst --capture=no -vvv --full-trace |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
import json | ||
from language_tags import data | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
import json | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
[build-system] | ||
requires = ["hatchling", "hatch-fancy-pypi-readme"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
version = "1.2.0" | ||
name = "language-tags" | ||
dynamic = ["readme"] | ||
authors = [ | ||
{ name = "Flanders Heritage Agency", email = "[email protected]" }, | ||
] | ||
license = "MIT" | ||
description = "This project is a Python version of the language-tags Javascript project." | ||
requires-python = ">=3.10,<3.13" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Programming Language :: Python", | ||
"Framework :: Pyramid", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
dependencies = [ | ||
] | ||
|
||
[project.urls] | ||
History = "https://github.com/OnroerendErfgoed/language-tags/blob/master/HISTORY.rst" | ||
Tracker = "https://github.com/OnroerendErfgoed/language-tags/issues" | ||
Source = "https://github.com/OnroerendErfgoed/language-tags" | ||
Documentation = "https://language-tags.readthedocs.io/en/latest/" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"uv==0.4.1", | ||
"sphinx==6.1.2", | ||
"pytest==8.3.3", | ||
"pytest-cov==5.0.0", | ||
] | ||
|
||
## | ||
# Build tool specific | ||
## | ||
[tool.hatch.build.targets.wheel] | ||
# In the wheel we want to have language-tags in the root as python module. | ||
only-include = [ | ||
"/language-tags", | ||
] | ||
|
||
[tool.hatch.metadata] | ||
# This allows us to use github links as dependencies | ||
allow-direct-references = true | ||
|
||
[tool.hatch.metadata.hooks.fancy-pypi-readme] | ||
content-type = "text/x-rst" | ||
fragments = [ | ||
{ path = "README.rst" }, | ||
{ path = "HISTORY.rst" }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,58 @@ | ||
# Runtime requirements | ||
--requirement requirements.txt | ||
|
||
# Testing | ||
pytest==7.2.0 | ||
pytest-cov==4.0.0 | ||
|
||
# Documentation | ||
Sphinx==6.1.2 | ||
alabaster==0.7.16 | ||
# via sphinx | ||
babel==2.16.0 | ||
# via sphinx | ||
certifi==2024.8.30 | ||
# via requests | ||
charset-normalizer==3.3.2 | ||
# via requests | ||
coverage==7.6.1 | ||
# via pytest-cov | ||
docutils==0.19 | ||
# via sphinx | ||
idna==3.10 | ||
# via requests | ||
imagesize==1.4.1 | ||
# via sphinx | ||
iniconfig==2.0.0 | ||
# via pytest | ||
jinja2==3.1.4 | ||
# via sphinx | ||
markupsafe==2.1.5 | ||
# via jinja2 | ||
packaging==24.1 | ||
# via | ||
# pytest | ||
# sphinx | ||
pluggy==1.5.0 | ||
# via pytest | ||
pygments==2.18.0 | ||
# via sphinx | ||
pytest==8.3.3 | ||
# via | ||
# language-tags (pyproject.toml) | ||
# pytest-cov | ||
pytest-cov==5.0.0 | ||
# via language-tags (pyproject.toml) | ||
requests==2.32.3 | ||
# via sphinx | ||
snowballstemmer==2.2.0 | ||
# via sphinx | ||
sphinx==6.1.2 | ||
# via language-tags (pyproject.toml) | ||
sphinxcontrib-applehelp==2.0.0 | ||
# via sphinx | ||
sphinxcontrib-devhelp==2.0.0 | ||
# via sphinx | ||
sphinxcontrib-htmlhelp==2.1.0 | ||
# via sphinx | ||
sphinxcontrib-jsmath==1.0.1 | ||
# via sphinx | ||
sphinxcontrib-qthelp==2.0.0 | ||
# via sphinx | ||
sphinxcontrib-serializinghtml==2.0.0 | ||
# via sphinx | ||
urllib3==2.2.3 | ||
# via requests | ||
uv==0.4.1 | ||
# via language-tags (pyproject.toml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
#!/usr/bin/env python | ||
try: | ||
from setuptools import setup | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
import unittest | ||
from language_tags.Subtag import Subtag | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
import unittest | ||
from language_tags.Tag import Tag | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
import unittest | ||
import re | ||
|
||
|