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

Add ability to generate graphs based on correlations of sequences #25933 #35009

Merged
merged 19 commits into from
May 22, 2023

Conversation

Bruno-TT
Copy link
Contributor

@Bruno-TT Bruno-TT commented Feb 7, 2023

fixes #25933

adjacency_matrix = Matrix(boolean_adjacency_matrix.astype(int))

# call graph constructor
return Graph(adjacency_matrix, format="adjacency_matrix", name="Correlation Graph")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the linter error (trailing space) in this line

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codecov-commenter
Copy link

Codecov Report

Base: 88.59% // Head: 88.58% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (63572b6) compared to base (66b319b).
Patch coverage: 40.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #35009      +/-   ##
===========================================
- Coverage    88.59%   88.58%   -0.01%     
===========================================
  Files         2136     2136              
  Lines       396141   396151      +10     
===========================================
+ Hits        350948   350950       +2     
- Misses       45193    45201       +8     
Impacted Files Coverage Δ
src/sage/graphs/generators/basic.py 95.70% <33.33%> (-2.51%) ⬇️
src/sage/graphs/graph_generators.py 76.12% <100.00%> (+0.02%) ⬆️
src/sage/modular/local_comp/liftings.py 98.33% <0.00%> (-1.67%) ⬇️
src/sage/schemes/elliptic_curves/hom_frobenius.py 96.34% <0.00%> (-1.22%) ⬇️
...e/combinat/cluster_algebra_quiver/mutation_type.py 50.00% <0.00%> (-0.96%) ⬇️
src/sage/cpython/_py2_random.py 75.20% <0.00%> (-0.83%) ⬇️
src/sage/schemes/elliptic_curves/hom_velusqrt.py 94.48% <0.00%> (-0.79%) ⬇️
src/sage/coding/channel.py 97.10% <0.00%> (-0.73%) ⬇️
src/sage/graphs/generators/random.py 92.12% <0.00%> (-0.52%) ⬇️
src/sage/sets/integer_range.py 91.41% <0.00%> (-0.51%) ⬇️
... and 26 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yyyyx4
Copy link
Member

yyyyx4 commented Feb 8, 2023

You can use one of a few select keywords to link a pull request to an issue. For example, editing the description to include "fixes #25933" will instruct GitHub to automatically close #25933 when this pull request gets merged.

@dimpase dimpase changed the title pr for ticket 25933 Add ability to generate graphs based on correlations of sequences #25933 Feb 8, 2023
@dimpase
Copy link
Member

dimpase commented Feb 8, 2023

fixes #25933

@dimpase
Copy link
Member

dimpase commented May 2, 2023

that's why tests fail:

sage -t --random-seed=258796353776112123915659578485470282204 sage/graphs/generators/basic.py
**********************************************************************
File "sage/graphs/generators/basic.py", line 408, in sage.graphs.generators.basic.CorrelationGraph
Failed example:
    from sage.graphs.correlation_graph import CorrelationGraph
Exception raised:
    Traceback (most recent call last):
      File "/__w/sage/sage/src/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/__w/sage/sage/src/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.graphs.generators.basic.CorrelationGraph[0]>", line 1, in <module>
        from sage.graphs.correlation_graph import CorrelationGraph
    ModuleNotFoundError: No module named 'sage.graphs.correlation_graph'

@dimpase
Copy link
Member

dimpase commented May 2, 2023

and linting fails due to

pycodestyle-minimal: commands[0] /home/runner/work/sage/sage/src> pycodestyle --select E111,E211,E271,E306,E401,E502,E701,E702,E703,W291,W391,W605,E711,E712,E713,E721,E722
./sage/graphs/generators/basic.py:427:88: W291 trailing whitespace
1       W291 trailing whitespace

dimpase and others added 9 commits May 2, 2023 09:26
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes sagemath#12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

Fixing the linter workflow

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
@dimpase dimpase force-pushed the u/gh-Bruno-TT/correlation-graph branch from 72f1e46 to 2e17704 Compare May 3, 2023 12:46
@github-actions
Copy link

github-actions bot commented May 3, 2023

Documentation preview for this PR is ready! 🎉
Built with commit: 270ff60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to generate graphs based on correlations of sequences
7 participants