Skip to content
Snippets Groups Projects
Commit fac51bb6 authored by Hari's avatar Hari
Browse files

Updated project name

parent 7679d97f
No related branches found
No related tags found
No related merge requests found
......@@ -10,11 +10,15 @@ import sys
sys.path.insert(0, os.path.abspath(".."))
# read the version from version.txt
with open(os.path.join("../sample_project_ivi", "version.txt"), encoding="utf-8") as file_handler:
__version__ = file_handler.read().strip()
project = "sample_project"
project = "sample_project_ivi"
copyright = "2024, Harisankar Babu"
author = "Harisankar Babu"
release = "0.0.1"
release = __version__
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
......
.. sample_project documentation master file, created by
.. sample_project_ivi documentation master file, created by
sphinx-quickstart on Thu Mar 14 15:19:00 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to sample_project's documentation!
Welcome to sample_project_ivi's documentation!
==========================================
.. toctree::
......
sample_project
sample_project_ivi
==============
.. toctree::
:maxdepth: 4
sample_project
sample_project_ivi
sample\_project package
=======================
.. automodule:: sample_project
.. automodule:: sample_project_ivi
:members:
:undoc-members:
:show-inheritance:
......@@ -12,7 +12,7 @@ Submodules
sample\_project.src module
--------------------------
.. automodule:: sample_project.src
.. automodule:: sample_project_ivi.src
:members:
:undoc-members:
:show-inheritance:
import os
from .src import calculate_mean, print_mean
__all__ = ["calculate_mean", "print_mean"]
# read the version from version.txt
with open(os.path.join(os.path.dirname(__file__), "version.txt"), encoding="utf-8") as file_handler:
__version__ = file_handler.read().strip()
File moved
0.0.1
\ No newline at end of file
......@@ -12,10 +12,10 @@ filterwarnings =
[isort]
profile = black
line_length = 120
src_paths = sample_project, tests
src_paths = sample_project_ivi, tests
[coverage:run]
source = sample_project
source = sample_project_ivi
[coverage:report]
show_missing = True
......
import os
from setuptools import find_packages, setup
# read the version from version.txt
with open(os.path.join("sample_project_ivi", "version.txt"), encoding="utf-8") as file_handler:
__version__ = file_handler.read().strip()
setup(
name="sample_project",
version="0.0.1",
name="sample_project_ivi",
version=__version__,
description="A sample project to demonstrate packaging and testing.",
author="Harisankar Babu",
author_email="harisankar.babu@ivi.fraunhofer.de",
......@@ -17,7 +24,9 @@ setup(
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
],
packages=[package for package in find_packages() if package.startswith("sample_project")],
packages=[package for package in find_packages() if package.startswith("sample_project_ivi")],
# by default find packages will only include python files, so we need to manually add the version.txt file
package_data={"sample_project_ivi": ["version.txt"]},
install_requires=[
# tada! no external dependencies
],
......
import pytest
from sample_project import calculate_mean, print_mean
from sample_project_ivi import calculate_mean, print_mean
def test_calculate_mean_normal_operation():
......
......@@ -9,7 +9,7 @@ deps =
pytest
pytest-cov
coverage
commands = pytest --cov-report term-missing --cov-config=setup.cfg --cov=sample_project --cov-append tests/
commands = pytest --cov-report term-missing --cov-config=setup.cfg --cov=sample_project_ivi --cov-append tests/
[testenv:clean]
description = remove all build, test, coverage and Python artifacts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment