Skip to content

Commit

Permalink
#92 gh actions pyproj
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Van Campenhout committed Sep 24, 2024
1 parent 8a37e90 commit f72e98c
Show file tree
Hide file tree
Showing 12 changed files with 156 additions and 71 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/language-tags.yaml
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
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# language_tags documentation build configuration file, created by
# sphinx-quickstart on Mon Sep 8 10:24:40 2014.
Expand Down
1 change: 0 additions & 1 deletion language_tags/Subtag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import json
from language_tags import data

Expand Down
1 change: 0 additions & 1 deletion language_tags/Tag.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import json


Expand Down
1 change: 0 additions & 1 deletion language_tags/tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
from language_tags.Subtag import Subtag
from language_tags.Tag import Tag
from language_tags import data
Expand Down
60 changes: 60 additions & 0 deletions pyproject.toml
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" },
]
67 changes: 58 additions & 9 deletions requirements-dev.txt
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)
42 changes: 0 additions & 42 deletions setup.py

This file was deleted.

1 change: 0 additions & 1 deletion tests/test_Subtag.py
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

Expand Down
1 change: 0 additions & 1 deletion tests/test_Tag.py
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

Expand Down
1 change: 0 additions & 1 deletion tests/test_tags.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
import unittest
import re

Expand Down

0 comments on commit f72e98c

Please sign in to comment.