Skip to content
Snippets Groups Projects
Commit 4ba45920 authored by Mayr, Hannes's avatar Mayr, Hannes
Browse files

Resolve merge conflicts.

parents 85575d33 ec28e72e
Branches
No related tags found
2 merge requests!53Resolve "Unit tests fail if called from command line",!41Include latest changes in main branch
Pipeline #840014 passed
image: python:latest image: python:3.10
stages: stages:
- linting - linting
- testing - testing
...@@ -14,16 +14,19 @@ before_script: ...@@ -14,16 +14,19 @@ before_script:
- python --version # For debugging - python --version # For debugging
- pip install --upgrade pip - pip install --upgrade pip
- pip install --user -r requirements.txt # install dependencies from file - pip install --user -r requirements.txt # install dependencies from file
PEP8: PEP8:
stage: linting stage: linting
script: script:
- pip install flake8 - pip install flake8
- flake8 --count . - flake8 --count .
Pylint: Pylint:
stage: linting stage: linting
script: script:
- pip install pylint - pip install pylint
- find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc' # Find all python files and check the code with pylint - find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc' # Find all python files and check the code with pylint
test: test:
stage: testing stage: testing
tags: tags:
...@@ -31,6 +34,7 @@ test: ...@@ -31,6 +34,7 @@ test:
script: script:
- python tests/runner_tests.py - python tests/runner_tests.py
coverage: "/TOTAL.*\\s+(\\d+\\.\\d+%)$/" coverage: "/TOTAL.*\\s+(\\d+\\.\\d+%)$/"
pages: pages:
stage: docs stage: docs
script: script:
...@@ -44,7 +48,10 @@ pages: ...@@ -44,7 +48,10 @@ pages:
rules: rules:
- if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" - if: "$CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
- when: manual - when: manual
sast: sast:
before_script:
- echo "No before script pls"
variables: variables:
SAST_EXCLUDED_PATHS: spec, test, tmp SAST_EXCLUDED_PATHS: spec, test, tmp
stage: security stage: security
...@@ -52,6 +59,8 @@ sast: ...@@ -52,6 +59,8 @@ sast:
- docker - docker
dependency_scanning: dependency_scanning:
before_script:
- echo "No before script pls"
stage: security stage: security
include: include:
......
# plotID for Python # plotID for Python
![The plotID logo](docs/source/_static/plotID_logo_small.png)
This is the python plotID project. This is the python plotID project.
plotID is a program connected to Research Data Management (RDM). It has two main functionalities: plotID is a program connected to Research Data Management (RDM). It has two main functionalities:
1. Tag your plot with an identifier. 1. Tag your plot with an identifier.
......
docs/source/_static/plotID.png

28.5 KiB | W: | H:

docs/source/_static/plotID.png

15.3 KiB | W: | H:

docs/source/_static/plotID.png
docs/source/_static/plotID.png
docs/source/_static/plotID.png
docs/source/_static/plotID.png
  • 2-up
  • Swipe
  • Onion skin
docs/source/_static/plotID_logo_small.png

17.5 KiB

docs/source/_static/publish.png

98.3 KiB | W: | H:

docs/source/_static/publish.png

58.4 KiB | W: | H:

docs/source/_static/publish.png
docs/source/_static/publish.png
docs/source/_static/publish.png
docs/source/_static/publish.png
  • 2-up
  • Swipe
  • Onion skin
docs/source/_static/tagplot.png

79.5 KiB | W: | H:

docs/source/_static/tagplot.png

47.4 KiB | W: | H:

docs/source/_static/tagplot.png
docs/source/_static/tagplot.png
docs/source/_static/tagplot.png
docs/source/_static/tagplot.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -57,6 +57,7 @@ exclude_patterns = [] ...@@ -57,6 +57,7 @@ exclude_patterns = []
# a list of builtin themes. # a list of builtin themes.
# #
html_theme = 'sphinx_rtd_theme' html_theme = 'sphinx_rtd_theme'
html_logo = '_static/plotID.jpg'
# Add any paths that contain custom static files (such as style sheets) here, # Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files, # relative to this directory. They are copied after the builtin static files,
......
Dependencies of plotID
==================================
The plotID package depends on other software for its full funcionality. Since plotID is a Python program, Python ≥ 3.10 is needed. A list of all dependencies and their connection to plotID is provided here.
- `matplotlib <https://matplotlib.org/stable/index.html>`_: Famous plotting engine. matplotlib plots and figures can be tagged and published with plotID.
- `Pillow <https://pillow.readthedocs.io/en/stable/>`_: Library for image processing. If no plotting engine was used that is supported by plotID, image files can be tagged as well. This is done with Pillow. Additionally, Pillow is used to print the QR codes on the plots.
- `qrcode <https://github.com/lincolnloop/python-qrcode>`_: Creates QR codes from input data. qrcode is used to create the QR code which is printed on the plot in the end.
- `numpy <https://numpy.org/doc/stable/>`_: Package for scientific computing. Right now it is only used to generate sample data in the examples. Since it is a dependency of matplotlib, it has to be installed anyway.
Optional depedencies that are not necessary to run plotID but more to contribute to the code are the following:
- `coverage <https://coverage.readthedocs.io/en/6.5.0/#>`_: Program to measure the code coverage. It is used in the development of plotID to monitor the coverage of the code when the unit tests are run.
- `sphinx <https://www.sphinx-doc.org/en/master/>`_: Program to build documentation. For example, this documentatio is generated with the help of sphinx.
- `sphinx-autoapi <https://sphinx-autoapi.readthedocs.io/en/latest/>`_: Generates documentation files automatically from documentation inside the code. This has the advantage that code can be documented inside the code but can also be read in the documentation without having two places with the same content.
- `sphinx-rtd-theme <https://sphinx-rtd-theme.readthedocs.io/en/stable/>`_: Readthedocs theme for nicer documentation style.
- `myst-parser <https://myst-parser.readthedocs.io/en/latest/>`_: Extenstion for sphinx, e.g. to include markdown files in the documentation. That allows to include plotID's README.md in the documentation without storing it at two different places.
\ No newline at end of file
...@@ -12,6 +12,8 @@ Welcome to plotID's documentation! ...@@ -12,6 +12,8 @@ Welcome to plotID's documentation!
README <readme_link.rst> README <readme_link.rst>
Structure and architecture <structure.rst> Structure and architecture <structure.rst>
Dependencies <dependencies.rst>
Indices and tables Indices and tables
......
...@@ -10,5 +10,5 @@ research data, the plot is based on. Additionally, the script that created the ...@@ -10,5 +10,5 @@ research data, the plot is based on. Additionally, the script that created the
plot will also be copied to the directory. plot will also be copied to the directory.
""" """
__version__ = '0.2.1' __version__ = '0.2.2'
__author__ = 'Institut Fluidsystemtechnik within nfdi4ing at TU Darmstadt' __author__ = 'Institut Fluidsystemtechnik within nfdi4ing at TU Darmstadt'
...@@ -132,7 +132,7 @@ class PublishOptions: ...@@ -132,7 +132,7 @@ class PublishOptions:
overwrite_dir = input('Do you want to overwrite ' overwrite_dir = input('Do you want to overwrite '
'the existing folder? ' 'the existing folder? '
'(yes/no[default])\n') '(yes/no[default])\n')
if overwrite_dir in ('yes', 'y'): if overwrite_dir in ('yes', 'y', 'Yes', 'YES'):
shutil.rmtree(dst_path) shutil.rmtree(dst_path)
else: else:
raise RuntimeError('publish has finished ' raise RuntimeError('publish has finished '
...@@ -150,7 +150,7 @@ class PublishOptions: ...@@ -150,7 +150,7 @@ class PublishOptions:
'partially copied data at ' 'partially copied data at '
f'{dst_path_invisible} be' f'{dst_path_invisible} be'
' removed? (yes/no[default])\n') ' removed? (yes/no[default])\n')
if delete_dir in ('yes', 'y'): if delete_dir in ('yes', 'y', 'Yes', 'YES'):
shutil.rmtree(dst_path_invisible) shutil.rmtree(dst_path_invisible)
raise RuntimeError('Publishing was unsuccessful. ' raise RuntimeError('Publishing was unsuccessful. '
'Try re-running publish.') from exc 'Try re-running publish.') from exc
......
[build-system] [build-system]
requires = ["setuptools>=43", "wheel"] requires = ["setuptools>=43", "wheel"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project]
name = "plotID"
description = "The plotID toolkit supports researchers in tracking and storing relevant data in plots. Plots are labelled with an ID and the corresponding data is stored."
readme = "README.md"
license = {text = "Apache License, Version 2.0"}
authors = [
{name = "Institut für Fluidsystemtechnik - TU Darmstadt", email = "nfdi4ing@fst.tu-darmstadt.de"},
{name = "Hannes Mayr", email = "hannes.mayr@stud.tu-darmstadt.de"},
{name = "Martin Hock", email = "Martin.Hock@fst.tu-darmstadt.de"},
{name = "Manuela Richter", email = "Manuela.Richter@fst.tu-darmstadt.de"},
]
dynamic = ["version"]
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
"Pillow",
"matplotlib",
"numpy",
"qrcode",
]
[project.urls]
Repository = "https://git.rwth-aachen.de/plotid/plotid_python"
Documentation = "https://plotid.pages.rwth-aachen.de/plotid_python"
"Bug Tracker" = "https://git.rwth-aachen.de/plotid/plotid_python/-/issues"
[project.optional-dependencies]
test = ["coverage"]
docs = [
"sphinx",
"sphinx-autoapi",
"sphinx-rtd-theme",
"myst-parser",
]
[tool.setuptools]
packages = ["plotid"]
[tool.setuptools.dynamic]
version = {attr = "plotid.__version__"}
...@@ -6,7 +6,7 @@ matplotlib==3.5.2 ...@@ -6,7 +6,7 @@ matplotlib==3.5.2
myst-parser==0.18.0 myst-parser==0.18.0
numpy==1.22.3 numpy==1.22.3
packaging==21.3 packaging==21.3
Pillow==9.1.0 Pillow==9.1.1
pyparsing==3.0.8 pyparsing==3.0.8
python-dateutil==2.8.2 python-dateutil==2.8.2
qrcode==7.3.1 qrcode==7.3.1
......
[metadata]
name = plotID
version = attr: plotid.__version__
author = attr: plotid.__author__
author_email = nfdi4ing@fst.tu-darmstadt.de
description = The plotID toolkit supports researchers in tracking and storing relevant data in plots. Plots are labelled with an ID and the corresponding data is stored.
license = Apache License, Version 2.0
license_files = file: LICENSE
long_description = file: README.md
long_description_content_type = text/markdown
url = https://git.rwth-aachen.de/plotid/plotid_python
project_urls =
Bug Tracker = https://git.rwth-aachen.de/plotid/plotid_python/-/issues
classifiers =
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.10
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Development Status :: 2 - Pre-Alpha
Intended Audience :: Science/Research
Topic :: Scientific/Engineering :: Visualization
[options]
packages = plotid
python_requires = >=3.10
install_requires =
Pillow
matplotlib
numpy
qrcode
[options.extras_require]
test =
coverage
docs =
sphinx
sphinx-autoapi
sphinx-rtd-theme
myst-parser
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment