Skip to content

Commit

Permalink
Long workload name layout fix (#269)
Browse files Browse the repository at this point in the history
* changed layout to fit experiment names

- added span to show full name
- shortened name to fit dropwdown
- changed layout for added consistency

* layout Fixes

- refresh button is to the right
- header is more consistent across different width screens

* header layout update

- center div makes turns into multiple lines if not all items fit

* slight improvement for header/graph spacing

* Fixed refresh button shape and function

- moved find_causal_files to parser so that main and gui can access
- resized refresh width to allow for same shape across different screens

* all graphs now have the same width

- graphs now have same width

- chart headers start well below the header with filters

---------

Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com>
  • Loading branch information
JoseSantosAMD and jrmadsen committed Apr 3, 2023
1 parent b39a683 commit 0427d2a
Show file tree
Hide file tree
Showing 122 changed files with 35,923 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@ run-name: formatting
on:
push:
branches: [ main, develop ]
paths-ignore:
- '*.md'
- 'source/docs/**'
pull_request:
branches: [ main, develop ]
paths-ignore:
- '*.md'
- 'source/docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/opensuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ on:
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'
pull_request:
branches: [ main, develop ]
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'
pull_request:
branches: [ main, develop ]
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu-bionic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ on:
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'
pull_request:
branches: [ main, develop ]
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu-focal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ on:
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'
pull_request:
branches: [ main, develop ]
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu-jammy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ on:
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'
pull_request:
branches: [ main, develop ]
paths-ignore:
- '*.md'
- 'source/docs/**'
- 'source/python/gui/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
*.out
*.app

# Python cache files
*.pyc

/build*
/.vscode
/.cache
Expand Down
4 changes: 4 additions & 0 deletions source/python/gui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# build files
/build*
/*.egg-info
/source/VERSION
21 changes: 21 additions & 0 deletions source/python/gui/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# direct include

include README.md
include requirements.txt

# recursive includes

recursive-include source *

# global exclude

global-exclude *.pyc
global-exclude *.git*
global-exclude *__pycache__*

# recursive excludes

recursive-exclude omnitrace_causal_viewer.egg-info *
recursive-exclude build *
recursive-exclude dist *
29 changes: 29 additions & 0 deletions source/python/gui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Omnitrace Causal Viewer

## Installation

```console
python -m pip install .
```

## Execution

### From installation

#### Console Script

```console
omnitrace-causal-plot <args...>
```

#### Module

```console
python -m omnitrace_causal_viewer <args...>
```

### From source tree

```console
python -m source <args...>
```
12 changes: 12 additions & 0 deletions source/python/gui/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[build-system]
requires = [
"setuptools >= 40.0.4",
"setuptools_scm >= 2.0.0",
"wheel >= 0.29.0",
]
build-backend = 'setuptools.build_meta'

[tool.black]
line-length = 90
target-version = ['py38']
include = '\.py$'
12 changes: 12 additions & 0 deletions source/python/gui/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
numpy
matplotlib
pandas
dash
dash_daq
dash_svg
dash_bootstrap_components
pyparsing
tabulate
jsondiff
plotly
pyyaml
3 changes: 3 additions & 0 deletions source/python/gui/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cli": false
}
27 changes: 27 additions & 0 deletions source/python/gui/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[metadata]
name = omnitrace-causal-viewer
url = https://github.com/AMDResearch/omnitrace
download_url = https://github.com/AMDResearch/omnitrace.git
maintainer = AMD Research
license = MIT
description = GUI for viewing Omnitrace causal profiles
keywords =
gui
causal profiling
performance
profiling
sampling
classifiers =
Development Status :: 4 - Beta
Intended Audience :: Developers
Intended Audience :: Science/Research
Natural Language :: English
License :: OSI Approved :: MIT License
Operating System :: POSIX :: Linux
Programming Language :: C++
Programming Language :: Python :: 3

[options]
packages = omnitrace_causal_viewer
zip_safe = true
include_package_data = true
72 changes: 72 additions & 0 deletions source/python/gui/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env python3

import os
import glob
import shutil

from setuptools import setup


def get_project_version():
# open "VERSION"
_cwd = os.path.dirname(__file__)
with open(os.path.join(_cwd, "source", "VERSION"), "r") as f:
data = f.read().replace("\n", "")
# make sure is string
if isinstance(data, list) or isinstance(data, tuple):
return data[0]
else:
return data


def get_long_description():
long_descript = ""
try:
long_descript = open("README.md").read()
except Exception:
long_descript = ""
return long_descript


def parse_requirements(fname="requirements.txt"):
_req = []
requirements = []
# read in the initial set of requirements
with open(fname, "r") as fp:
_req = list(filter(bool, (line.strip() for line in fp)))
# look for entries which read other files
for itr in _req:
if itr.startswith("-r "):
# read another file
for fitr in itr.split(" "):
if os.path.exists(fitr):
requirements.extend(parse_requirements(fitr))
else:
# append package
requirements.append(itr)
# return the requirements
return requirements


setup(
name="omnitrace-causal-viewer",
version=get_project_version(),
description="GUI for viewing causal profilers",
long_description=get_long_description(),
long_description_content_type="text/markdown",
author="AMD Research",
packages=["omnitrace_causal_viewer"],
package_dir={"omnitrace_causal_viewer": "source"},
package_data={
"omnitrace_causal_viewer": [
"source/assets/*",
"source/workloads/*",
"source/VERSION",
]
},
install_requires=parse_requirements(),
python_requires=">=3.6",
entry_points={
"console_scripts": ["omnitrace-causal-plot=omnitrace_causal_viewer.__main__:main"]
},
)
1 change: 1 addition & 0 deletions source/python/gui/source/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
45 changes: 45 additions & 0 deletions source/python/gui/source/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from __future__ import absolute_import

__author__ = "AMD Research"
__copyright__ = "Copyright 2023, Advanced Micro Devices, Inc."
__license__ = "MIT"
__maintainer__ = "AMD Research"
__status__ = "Development"


def _get_version():
import os
from pathlib import Path

this_dir = Path(__file__).resolve().parent
ver_path = os.path.join(f"{this_dir}", "VERSION")
if os.path.exists(ver_path):
with open(ver_path, "r") as f:
return f.read().strip("\n")
return "???"


__version__ = _get_version()
Loading

0 comments on commit 0427d2a

Please sign in to comment.