Skip to content

Commit

Permalink
Merge pull request #3 from marcus-k:fix-dependencies
Browse files Browse the repository at this point in the history
Fix-dependencies
  • Loading branch information
marcus-k authored May 1, 2024
2 parents 2450413 + cca0661 commit 60ec917
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ dmypy.json

# Pyre type checker
.pyre/

dev/
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Random NWNs [![Tests](https://github.com/marcus-k/Random-NWNs/actions/workflows/python-package.yml/badge.svg)](https://github.com/marcus-k/Random-NWNs/actions/workflows/python-package.yml)

Python package for modelling and analyzing random nanowire networks. This package was a summer research project lasting from May 2021 to August 2021 under the supervision of Dr. Claudia Gomes da Rocha.
Python package for modelling and analyzing random nanowire networks. This package was a summer research project lasting from May 2021 to August 2021 under the supervision of Dr. Claudia Gomes da Rocha.

For future additions, feel free to fork the repository, but please give credit where it's due, either here or to Marcus Kasdorf.
**Update:** This project will now be continuing as of May 2024. If you are using this project, please note there will be **active development** on it and the functionality may change.

For future additions, feel free to fork the repository. Please cite Marcus Kasdorf if you wish to extend the project.

# Table of Contents
* [Installation](#installation)
Expand Down
17 changes: 9 additions & 8 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: randomnwn
name: nwn
channels:
- conda-forge
dependencies:
- python=3.8
- numpy=1.24.3
- networkx=3.1
- scipy=1.10.1
- Shapely=1.7.1
- matplotlib=3.7.1
- ipykernel
- line_profiler
- joblib
- line_profiler
- matplotlib=3.8.4
- networkx=3.1
- numpy=1.26.4
- pip
- pytest
- python=3.10
- scipy=1.13.0
- Shapely=2.0.4
6 changes: 3 additions & 3 deletions randomnwn/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ def plot_NWN(
# Defaults to blue and pink lines, else random colors are used.
if rnd_color:
for i in range(NWN.graph["wire_num"]):
ax.plot(*np.array(NWN.graph["lines"][i]).T)
ax.plot(*np.asarray(NWN.graph["lines"][i].coords).T)
else:
for i in range(NWN.graph["wire_num"]):
if (i,) in NWN.graph["electrode_list"]:
ax.plot(*np.array(NWN.graph["lines"][i]).T, c="xkcd:light blue")
ax.plot(*np.asarray(NWN.graph["lines"][i].coords).T, c="xkcd:light blue")
else:
ax.plot(*np.array(NWN.graph["lines"][i]).T, c="pink")
ax.plot(*np.asarray(NWN.graph["lines"][i].coords).T, c="pink")

# Scale axes according to the characteristic values
if scaled:
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy==1.24.3
matplotlib==3.8.4
networkx==3.1
scipy==1.10.1
Shapely==1.7.1
matplotlib==3.7.1
numpy==1.26.4
scipy==1.13.0
Shapely==2.0.4

0 comments on commit 60ec917

Please sign in to comment.