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

Fix long lines #47

Merged
merged 7 commits into from
Jan 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
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dev = [
"black",
"ruff",
"pip-tools",
"pytest-cov",
"pytest-cov"
]

demos = [
Expand Down Expand Up @@ -62,8 +62,5 @@ addopts = "-v -p no:warnings --cov=wsimod --cov-report=html"
select = ["E", "F", "I"] # pycodestyle, Pyflakes, isort. Ignoring pydocstyle (D), for now
exclude = ["docs", "tests"] # Let's ignore tests and docs folders, for now

[tool.ruff.per-file-ignores]
"wsimod/*" = ["E501"] # 176 lines (all comments) are too long (>88). Ignoring, for now

[tool.ruff.pydocstyle]
convention = "google"
6 changes: 0 additions & 6 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ click==8.1.7
# via
# black
# pip-tools
colorama==0.4.6
# via
# build
# click
# pytest
# tqdm
coverage[toml]==7.3.2
# via pytest-cov
dill==0.3.7
Expand Down
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements.txt
# pip-compile
#
colorama==0.4.6
Copy link
Member

Choose a reason for hiding this comment

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

Curious why colorama is now deleted when none of the dependencies have changed. Is this to do with running pip-compile on windows vs mac? In which case maybe we should have separate requirements files for windows/mac/linux?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't know, to be honest. All tests are passing in all the platforms so if this were something that needs to be different for each of them, I would expect for some of the tests to fail if a platform requires something that has not been installed.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it's needed to create coloured terminal text in Windows, but everything seems fine without it on my machine

# via tqdm
dill==0.3.7
# via wsimod (pyproject.toml)
numpy==1.26.2
Expand Down
287 changes: 129 additions & 158 deletions wsimod/arcs/arcs.py

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions wsimod/core/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
"""Created on Fri Dec 6 15:17:07 2019.

@author: bdobson

"""
from wsimod.core import constants

M3_S_TO_ML_D = 86.4
MM_KM2_TO_ML = 1e-3 * 1e6 * 1e3 * 1e-6 # mm->m, km2->m2, m3->l, l->Ml
MM_M2_TO_ML = 1e-3 * 1e3 * 1e-6 # mm->m, m3->l, l->Ml
MM_M2_TO_SIM_VOLUME = MM_M2_TO_ML # SIM volume is by default ML, but can be changed by changing MM_TO_SIM_VOLUME
MM_M2_TO_SIM_VOLUME = MM_M2_TO_ML # SIM volume is by default ML, but can be changed by
# changing MM_TO_SIM_VOLUME
MM_M2_TO_M3 = 1e-3 # mm->m
ML_TO_M3 = 1000
PCT_TO_PROP = 1 / 100
Expand Down Expand Up @@ -117,7 +117,8 @@ def set_default_pollutants():
"do",
"temperature",
"ph",
] # e.g. pollutants whose concentration should not increase if volume is distilled out
] # e.g. pollutants whose concentration should not increase if volume is distilled
# out
constants.ADDITIVE_POLLUTANTS = [
"org-phosphorus",
"phosphate",
Expand Down
Loading
Loading