Lucas commited on
Commit
0833dfc
Β·
unverified Β·
2 Parent(s): 7b5bec6 9e355ac

Merge pull request #1 from lucas066001/feat/sample_pipeline

Browse files
.github/workflows/build.yml ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: CI
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - "**"
10
+ - "!gh-pages"
11
+ pull_request:
12
+ branches:
13
+ - "**"
14
+ - "!gh-pages"
15
+
16
+ jobs:
17
+ build:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ python-version: ["3.12"]
24
+
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ uses: actions/setup-python@v3
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+
32
+ - name: Install dependencies
33
+ run: |
34
+ python -m pip install --upgrade pip
35
+ python -m pip install flake8 pytest
36
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
37
+
38
+ - name: Lint with flake8
39
+ run: |
40
+ # stop the build if there are Python syntax errors or undefined names
41
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
42
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
43
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
44
+
45
+ - name: Test libs
46
+ run: |
47
+ cd ./App && python -m unittest travel_resolver.tests.sample_test
.github/workflows/doc.yml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: Documentation production
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - "**"
10
+ # Will need to be restricted to main branch in the future
11
+ pull_request:
12
+ branches:
13
+ - "**"
14
+
15
+ jobs:
16
+ build:
17
+
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ python-version: ["3.12"]
23
+
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - name: Set up Python ${{ matrix.python-version }}
27
+ uses: actions/setup-python@v3
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+
31
+ - name: Install dependencies
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ python -m pip install flake8 pytest sphinx sphinxawesome-theme
35
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
36
+
37
+ - name: Build html documentation
38
+ run: |
39
+ cd ./docs && make html
40
+
41
+ - name: Deploy documentation
42
+ uses: peaceiris/actions-gh-pages@v3
43
+ with:
44
+ github_token: ${{ secrets.GITHUB_TOKEN }}
45
+ publish_dir: docs/_build/html
App/{travel.resolver.libs β†’ travel_resolver}/__init__.py RENAMED
File without changes
App/{travel.resolver.libs/ner β†’ travel_resolver/libs}/__init__.py RENAMED
File without changes
App/{travel.resolver.libs/pathfinder β†’ travel_resolver/libs/ner}/__init__.py RENAMED
File without changes
App/{travel.resolver.libs/speech2text β†’ travel_resolver/libs/pathfinder}/__init__.py RENAMED
File without changes
App/{travel.resolver.tests β†’ travel_resolver/libs/sample}/__init__.py RENAMED
File without changes
App/travel_resolver/libs/sample/greeter.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class GreeterHelper():
2
+ def __init__(self):
3
+ """
4
+ Initialize base private attributes with sample values.
5
+ """
6
+ self._base_message = "Hello ! "
7
+
8
+ def Greet(self, message: str):
9
+ """
10
+ Print greeting message in the terminal.
11
+
12
+ Args:
13
+ message (str): Message that will be included in greeting.
14
+
15
+ Returns:
16
+ (str): The full printed message.
17
+ """
18
+ print(self._base_message + message)
19
+ return "Hello ! " + message
App/travel_resolver/libs/speech2text/__init__.py ADDED
File without changes
App/travel_resolver/tests/__init__.py ADDED
File without changes
App/travel_resolver/tests/sample_test.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import unittest
2
+ from travel_resolver.libs.sample.greeter import GreeterHelper
3
+
4
+
5
+ class TestGreeter(unittest.TestCase):
6
+
7
+ def setUp(self):
8
+ self._greeter = GreeterHelper()
9
+
10
+ def test_correct_greeting(self):
11
+ msg = "FranΓ§ois"
12
+ self.assertEqual(self._greeter.Greet(msg), "Hello ! " + msg)
README.md CHANGED
@@ -1,2 +1,6 @@
1
  # TravelOrderResolver
2
  Study project to get into NLP world within travel application context
 
 
 
 
 
1
  # TravelOrderResolver
2
  Study project to get into NLP world within travel application context
3
+
4
+
5
+ # Copy content to epitech repo
6
+ git push --mirror https://github.com/EpitechMscProPromo2025/T-AIA-901-MPL_11.git
docs/Makefile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
docs/conf.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ from pathlib import Path
10
+ import sys
11
+ html_theme = 'sphinxawesome_theme'
12
+
13
+ project = 'TravelOrderResolver'
14
+ copyright = '2024, Azar, Chapuis, Thanh, Goupil, Duquesnoy'
15
+ author = 'Azar, Chapuis, Thanh, Goupil, Duquesnoy'
16
+
17
+ sys.path.insert(0, (Path(__file__).parents[1].resolve() / 'App').as_posix())
18
+
19
+ # -- General configuration ---------------------------------------------------
20
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
21
+
22
+ extensions = [
23
+ 'sphinx.ext.duration',
24
+ 'sphinx.ext.doctest',
25
+ 'sphinx.ext.autodoc',
26
+ 'sphinx.ext.autosummary'
27
+ ]
28
+
29
+ templates_path = ['_templates']
30
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
31
+
32
+
33
+ # -- Options for HTML output -------------------------------------------------
34
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
docs/index.rst ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. TravelOrderResolver documentation master file, created by
2
+ sphinx-quickstart on Tue Sep 3 14:51:06 2024.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ TravelOrderResolver documentation
7
+ =================================
8
+
9
+ Add your content using ``reStructuredText`` syntax. See the
10
+ `reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
11
+ documentation for details.
12
+
13
+
14
+ .. toctree::
15
+ :maxdepth: 5
16
+ :caption: Contents:
17
+
18
+ .. toctree::
19
+ travel_resolver
docs/make.bat ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
docs/travel_resolver.libs.ner.rst ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ travel\_resolver.libs.ner package
2
+ =================================
3
+
4
+ .. automodule:: travel_resolver.libs.ner
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
docs/travel_resolver.libs.pathfinder.rst ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ travel\_resolver.libs.pathfinder package
2
+ ========================================
3
+
4
+ .. automodule:: travel_resolver.libs.pathfinder
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
docs/travel_resolver.libs.rst ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ travel\_resolver.libs package
2
+ =============================
3
+
4
+ .. toctree::
5
+ :maxdepth: 4
6
+
7
+ travel_resolver.libs.ner
8
+ travel_resolver.libs.pathfinder
9
+ travel_resolver.libs.sample
10
+ travel_resolver.libs.speech2text
11
+
12
+ .. automodule:: travel_resolver.libs
13
+ :members:
14
+ :undoc-members:
15
+ :show-inheritance:
docs/travel_resolver.libs.sample.greeter.rst ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ travel\_resolver.libs.sample.greeter module
2
+ ===========================================
3
+
4
+ .. automodule:: travel_resolver.libs.sample.greeter
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
docs/travel_resolver.libs.sample.rst ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ travel\_resolver.libs.sample package
2
+ ====================================
3
+
4
+ .. toctree::
5
+ :maxdepth: 4
6
+
7
+ travel_resolver.libs.sample.greeter
8
+
9
+ .. automodule:: travel_resolver.libs.sample
10
+ :members:
11
+ :undoc-members:
12
+ :show-inheritance:
docs/travel_resolver.libs.speech2text.rst ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ travel\_resolver.libs.speech2text package
2
+ =========================================
3
+
4
+ .. automodule:: travel_resolver.libs.speech2text
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
docs/travel_resolver.rst ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ travel\_resolver package
2
+ ========================
3
+
4
+ .. toctree::
5
+ :maxdepth: 4
6
+
7
+ travel_resolver.libs
8
+ travel_resolver.tests
9
+
10
+ .. automodule:: travel_resolver
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
docs/travel_resolver.tests.rst ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ travel\_resolver.tests package
2
+ ==============================
3
+
4
+ .. toctree::
5
+ :maxdepth: 4
6
+
7
+ travel_resolver.tests.sample_test
8
+
9
+ .. automodule:: travel_resolver.tests
10
+ :members:
11
+ :undoc-members:
12
+ :show-inheritance:
docs/travel_resolver.tests.sample_test.rst ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ travel\_resolver.tests.sample\_test module
2
+ ==========================================
3
+
4
+ .. automodule:: travel_resolver.tests.sample_test
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance: