Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the package from p3 to p3analysis #67

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
push:
branches: [ "main" ]
paths:
- 'p3/**'
- 'p3analysis/**'
- 'tests/**'
- 'pyproject.toml'
- 'MANIFEST.in'
pull_request:
branches: [ "main" ]
paths:
- 'p3/**'
- 'p3analysis/**'
- 'tests/**'
- 'pyproject.toml'
- 'MANIFEST.in'
Expand All @@ -31,7 +31,7 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install p3 and its dependencies
- name: Install p3analysis and its dependencies
run: pip install --no-cache-dir './[dev]'
- name: Run unittest
run: python -m unittest discover -s tests --verbose
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-gallery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:
push:
branches: [ "main" ]
paths:
- 'p3/**'
- 'p3analysis/**'
- 'examples/**'
- 'case-studies/**'
- 'pyproject.toml'
- 'MANIFEST.in'
pull_request:
branches: [ "main" ]
paths:
- 'p3/**'
- 'p3analysis/**'
- 'examples/**'
- 'case-studies/**'
- 'pyproject.toml'
Expand All @@ -35,7 +35,7 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install p3 and its dependencies
- name: Install p3analysis and its dependencies
run: pip install --no-cache-dir './[dev]'
- name: Run examples
run: |
Expand Down
10 changes: 5 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include p3/data/coverage-0.1.0.schema
include p3/data/coverage-0.2.0.schema
include p3/data/coverage-0.3.0.schema
include p3/plot/backend/templates/cascade.tex
include p3/plot/backend/templates/navchart.tex
include p3analysis/data/coverage-0.1.0.schema
include p3analysis/data/coverage-0.2.0.schema
include p3analysis/data/coverage-0.3.0.schema
include p3analysis/plot/backend/templates/cascade.tex
include p3analysis/plot/backend/templates/navchart.tex
18 changes: 10 additions & 8 deletions case-studies/babelstream/plot_babelstream_cascade.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
# Load Data into Pandas
# ---------------------

#sphinx_gallery_start_ignore
import os

# import libraries
import pandas as pd
import p3

#sphinx_gallery_start_ignore
import os
import p3analysis

dpath = os.path.realpath(os.getcwd())
performance_csv = os.path.join(dpath, "performance.csv")
#sphinx_gallery_end_ignore
Expand All @@ -36,11 +38,11 @@
# %%
# Project Labels into Expected Forms
# ----------------------------------
# The :py:func:`p3.data.projection` method can be used to project column names
# The :py:func:`p3analysis.data.projection` method can be used to project column names
# from the original data into names required by the P3 Analysis Library.

df = p3.data.projection(
df, problem=["name"], platform=["arch"], application=["language"]
df = p3analysis.data.projection(
df, problem=["name"], platform=["arch"], application=["language"],
)

# %%
Expand All @@ -67,14 +69,14 @@
# (problem, platform) combination; any row with an `app eff` of 1 represents
# an application achieving the best-known performance.

effs = p3.metrics.application_efficiency(df)
effs = p3analysis.metrics.application_efficiency(df)
print(effs)

# %%
# Generate a Cascade Plot
# -----------------------

cascade = p3.plot.cascade(effs)
cascade = p3analysis.plot.cascade(effs)
cascade.save("cascade.png")

# %%
Expand Down
22 changes: 12 additions & 10 deletions case-studies/babelstream/plot_babelstream_navchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
# Load Data into Pandas
# ---------------------

#sphinx_gallery_start_ignore
import os

# import libraries
import pandas as pd
import p3

#sphinx_gallery_start_ignore
import os
import p3analysis

dpath = os.path.realpath(os.getcwd())
performance_csv = os.path.join(dpath, "performance.csv")
coverage_csv = os.path.join(dpath, "coverage.csv")
Expand All @@ -40,11 +42,11 @@
# %%
# Project Labels into Expected Forms
# ----------------------------------
# The :py:func:`p3.data.projection` method can be used to project column names
# The :py:func:`p3analysis.data.projection` method can be used to project column names
# from the original data into names required by the P3 Analysis Library.

df = p3.data.projection(
df, problem=["name"], platform=["arch"], application=["language"]
df = p3analysis.data.projection(
df, problem=["name"], platform=["arch"], application=["language"],
)

# %%
Expand Down Expand Up @@ -74,7 +76,7 @@
# (problem, platform) combination; any row with an `app eff` of 1 represents
# an application achieving the best-known performance.

effs = p3.metrics.application_efficiency(df)
effs = p3analysis.metrics.application_efficiency(df)
print(effs)

# %%
Expand All @@ -85,7 +87,7 @@
# has a non-zero divergence, as it is the only implementation containing
# different code paths for different platforms.

div = p3.metrics.divergence(df, df_cov)
div = p3analysis.metrics.divergence(df, df_cov)
print(div)

# %%
Expand All @@ -96,14 +98,14 @@
# to achieve a non-zero performance portability score. For BabelStream,
# Language 0 is the only programming model that runs across all 11 platforms.

pp = p3.metrics.pp(effs)
pp = p3analysis.metrics.pp(effs)
print(pp)

# %%
# Generate a Navigation Chart
# ---------------------------

navchart = p3.plot.navchart(pp, div)
navchart = p3analysis.plot.navchart(pp, div)
navchart.save("navchart.png")

# %%
Expand Down
2 changes: 1 addition & 1 deletion docs/source/analysis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ The terminology used by the P3 Analysis Library was first introduced in
Some of these definitions are flexible, allowing the same performance data
to be used for multiple case studies with different interpretations of these
terms. The library is designed with this flexibility in mind (see
:py:func:`p3.data.projection`); concrete definitions are not required when
:py:func:`p3analysis.data.projection`); concrete definitions are not required when
collecting data.
2 changes: 1 addition & 1 deletion docs/source/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The following fields have special meaning:

It is recommended not to store *application*, *problem* and *platform* fields
when results are initially collected, and to instead construct them using the
:py:func:`p3.data.projection` function. This makes it simpler to re-use the
:py:func:`p3analysis.data.projection` function. This makes it simpler to re-use the
same data across multiple analyses using different meanings of *application*,
*problem*, and *platform*.

Expand Down
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Performance, Portability, and Productivity Analysis Library
:hidden:
:caption: Reference

p3
p3analysis

.. toctree::
:maxdepth: 1
Expand All @@ -38,11 +38,11 @@ The Performance, Portability, and Productivity Analysis Library (P3 Analysis
Library) enables a simpler workflow for the collection and interpretation of P3
data.

- Compute :doc:`metrics <p3.metrics>` like "performance portability" and
- Compute :doc:`metrics <p3analysis.metrics>` like "performance portability" and
"code divergence" to quantify the trade-offs between performance, portability
and productivity made by applications targeting multiple platforms.

- :doc:`Plot <p3.plot>` cascades and navigation charts to visualize and gain
- :doc:`Plot <p3analysis.plot>` cascades and navigation charts to visualize and gain
deeper insight into the "performance portability" and "code divergence"
scores achieved by different applications.

Expand Down
6 changes: 3 additions & 3 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
p3
==
p3analysis
==========

.. toctree::
:maxdepth: 4

p3
p3analysis
29 changes: 0 additions & 29 deletions docs/source/p3.plot.backend.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/source/p3.plot.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/source/p3.report.rst

This file was deleted.

6 changes: 3 additions & 3 deletions docs/source/p3.data.rst → docs/source/p3analysis.data.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
p3.data package
===============
p3analysis.data package
=======================

Module contents
---------------

.. automodule:: p3.data
.. automodule:: p3analysis.data
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/source/p3analysis.metrics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
p3analysis.metrics package
==========================

Module contents
---------------

.. automodule:: p3analysis.metrics
:members:
:undoc-members:
:show-inheritance:
29 changes: 29 additions & 0 deletions docs/source/p3analysis.plot.backend.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
p3analysis.plot.backend package
===============================

Submodules
----------

p3analysis.plot.backend.matplotlib module
-----------------------------------------

.. automodule:: p3analysis.plot.backend.matplotlib
:members:
:undoc-members:
:show-inheritance:

p3analysis.plot.backend.pgfplots module
---------------------------------------

.. automodule:: p3analysis.plot.backend.pgfplots
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: p3analysis.plot.backend
:members:
:undoc-members:
:show-inheritance:
11 changes: 4 additions & 7 deletions docs/source/p3.rst → docs/source/p3analysis.plot.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
p3 package
==========
p3analysis.plot package
=======================

Subpackages
-----------

.. toctree::
:maxdepth: 4

p3.data
p3.metrics
p3.plot
p3.report
p3analysis.plot.backend

Module contents
---------------

.. automodule:: p3
.. automodule:: p3analysis.plot
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
p3.metrics package
==================
p3analysis.report package
=========================

Module contents
---------------

.. automodule:: p3.metrics
.. automodule:: p3analysis.report
:members:
:undoc-members:
:show-inheritance:
Loading
Loading