Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision a71f4aa5dd65c9b8bf679213700c009a498c3ce7 authored by S M T Chua on 02 March 2022, 04:59:20 UTC, committed by GitHub on 02 March 2022, 04:59:20 UTC
Merge pull request #381 from GeoscienceAustralia/sc/ghpages
Update the documentation / github pages workflow
2 parent s 8a8fc15 + 39c81a0
  • Files
  • Changes
  • bda5d26
  • /
  • utils
  • /
  • pyrate_pycallgraph.py
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:a71f4aa5dd65c9b8bf679213700c009a498c3ce7
directory badge
swh:1:dir:c7a680498eef8588cab00ef884f2ebfc956b70f7
content badge
swh:1:cnt:359d64f9f946a910b59449fc23ee1db89f2ea328

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
pyrate_pycallgraph.py
# This Python module is part of the PyRate software package
#
# Copyright 2022 Geoscience Australia
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
"""
This script creates the pycallgraph file output_file='pyrate_with_roipac.png'.
This script can be run from the 'PyRate' directory.
Change the name of the config file as required.
"""

import sys
from pycallgraph import PyCallGraph
from pycallgraph import Config
from pycallgraph import GlobbingFilter
from pycallgraph.output import GraphvizOutput
from pyrate import correct

config = Config()
config.trace_filter = GlobbingFilter(exclude=[
    'pycallgraph.*',
    '*.secret_function',
])

graphviz = GraphvizOutput(output_file='pyrate_with_roipac.png')
config = Config(max_depth=6, groups=False, threaded=True)

# sys.argv[0]: name of this script
# sys.argv[1]: name of the config file
sys.argv = ['pyrate_profile.py', 'pyrate.conf']

with PyCallGraph(output=graphviz, config=config):
    correct.main()
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API