-
Notifications
You must be signed in to change notification settings - Fork 2
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
More linting. Ignore ESP file. Clean redundancy in CI. #78
Changes from all commits
b561ae7
91d774c
6a70c0c
7d7434a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
[MASTER] | ||
ignore=demo | ||
ignore=demo, prescriptors/esp | ||
|
||
recursive=y | ||
|
||
fail-under=9.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved flags from eluc.yml into here. Now we ignore the esp directory because it can't be installed in the Github environment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Next, we should raise the bar to 10 and fix the warnings. |
||
|
||
jobs=0 | ||
|
||
max-line-length=120 | ||
|
||
suggestion-mode=yes | ||
|
||
good-names=X_train, X_val, X_test, y_train, y_val, y_test, X, Y, y, X_test_scaled | ||
good-names=X_train, X_val, X_test, y_train, y_val, y_test, X, Y, y, X_test_scaled, df, da, ds, i, n |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ BLUE simulations with committed emissions could be used to estimate the long-ter | |
"Committed emissions" means all the emissions that are caused by a land-use change event are attributed to the year | ||
of the event. | ||
BLUE (bookkeeping of land use emissions) is a bookkeeping model that attributes carbon fluxes to land use activities. | ||
See [BLUE: Bookkeeping of land use emissions](https://doi.org/10.1002/2014GB004997) for more details. | ||
See [BLUE: Bookkeeping of Land Use Emissions](https://doi.org/10.1002/2014GB004997) for more details. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tried and failed to fix a weird error: README.md:26:74: E0001: Parsing failed: 'invalid decimal literal (, line 26)' (syntax-error) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure why pylint evaluating README.md. We can probably ignore these files with:
That can investigate when we fix the warnings |
||
|
||
### LUC | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ def __init__(self, in_size: int, hidden_size: int, out_size: int, | |
self.parents = parents | ||
|
||
@classmethod | ||
def from_crossover(cls, parent1, parent2, p_mutation: float, gen: int, cand_id: int): | ||
def from_crossover(cls, parent1, parent2, p_mutation: float, gen: int, cand_id: int) -> "Candidate": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. class method returns itself |
||
""" | ||
Crossover two parents to create a child. | ||
Take a random 50/50 choice of either parent's weights | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ def calculate_crowding_distance(front): | |
n_objectives = len(front[0].metrics) | ||
distances = [0 for _ in range(len(front))] | ||
for m in range(n_objectives): | ||
front.sort(key=lambda c: c.metrics[m]) | ||
front.sort(key=lambda candidate: candidate.metrics[m]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. c to candidate |
||
obj_min = front[0].metrics[m] | ||
obj_max = front[-1].metrics[m] | ||
distances[0] = float('inf') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need these flags because they're specified in pylintrc now