-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from paulf81/feature/add_ruff_2
Add RUFF linting/formatting
- Loading branch information
Showing
104 changed files
with
7,060 additions
and
13,217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,4 +80,4 @@ body: | |
validations: | ||
required: false | ||
required: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,4 @@ | |
- [ ] docs/source/conf.py | ||
- [ ] flasc/VERSION | ||
- [ ] Create a tag in the NREL/FLASC repository | ||
--> | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ jobs: | |
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e ".[develop]" | ||
- uses: pre-commit/[email protected] | ||
- name: Run tests and collect coverage | ||
run: | | ||
# -rA displays the captured output for all tests after they're run | ||
|
@@ -35,11 +36,10 @@ jobs: | |
pip install pytest | ||
pip install pytest-cov | ||
pytest --cov=./ --cov-report=xml tests/ | ||
- name: Upload coverage to Codecov | ||
- name: Upload coverage to Codecov | ||
if: ${{ env.CODECOV_TOKEN }} # Don't attempt to upload if the codecov token is not configured | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./coverage.xml | ||
fail_ci_if_error: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
repos: | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-executables-have-shebangs | ||
- id: check-yaml | ||
args: [--unsafe] | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: mixed-line-ending | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.7 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
types_or: [ python, pyi, jupyter ] | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
types_or: [ python, pyi, jupyter ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,12 @@ | |
|
||
## Description | ||
|
||
FLASC provides a **rich suite of analysis tools** for SCADA data filtering, analysis, | ||
wind farm model validation, field experiment design, and field experiment monitoring. | ||
FLASC provides a **rich suite of analysis tools** for SCADA data filtering, analysis, | ||
wind farm model validation, field experiment design, and field experiment monitoring. | ||
|
||
The repository is centrally built around NRELs in-house ``FLORIS`` wind farm model, available at | ||
**https://github.com/nrel/floris**. FLASC also largely relies on the ``energy ratio``, among others, | ||
to quantify wake losses in synthetic and historical data, to perform turbine northing calibrations, | ||
**https://github.com/nrel/floris**. FLASC also largely relies on the ``energy ratio``, among others, | ||
to quantify wake losses in synthetic and historical data, to perform turbine northing calibrations, | ||
and model parameter estimation. | ||
|
||
For technical questions or concerns, please email [email protected]. | ||
|
@@ -27,7 +27,9 @@ For technical questions or concerns, please email [email protected]. | |
We recommend installing this repository in a separate virtual environment. | ||
After creating a new virtual environment, clone this repository to your local | ||
system and install it locally using ``pip``. The command for this is ``pip install -e flasc``. | ||
|
||
|
||
If installing for develop, follow the developer [install instructions](https://nrel.github.io/flasc/installation.html) | ||
|
||
## Documentation | ||
|
||
Documentation is provided via the included examples folders as well as [online documentation](https://nrel.github.io/flasc/). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Installation | ||
----------------- | ||
FLASC is currently not available as a package on any repository manager. | ||
Instead, it must be installed by the user by cloning the GitHub repository. | ||
|
||
To download the source code, use `git clone`. Then, add it to | ||
your Python path with the "local editable install" through `pip`. | ||
|
||
```bash | ||
# Download the source code. | ||
git clone https://github.com/NREL/flasc.git | ||
|
||
# Install into your Python environment | ||
pip install -e flasc | ||
|
||
``` | ||
|
||
If installing FLASC with the intention to develop, some additional configuration is helpful: | ||
|
||
|
||
Install FLASC in editable mode with the appropriate developer tools | ||
|
||
- ``".[develop]"`` is for the linting and code checking tools | ||
- ``".[docs]"`` is for the documentation building tools. Ideally, developers should also be | ||
contributing to the documentation, and therefore checking that the documentation builds locally. | ||
|
||
```bash | ||
pip install -e ".[develop, docs]" | ||
``` | ||
Turn on the linting and code checking tools | ||
|
||
```bash | ||
pre-commit install | ||
``` | ||
|
||
If everything is configured correctly, any changes made to the source | ||
code will be available directly through your local Python. Remember | ||
to re-import the FLASC module when changes are made if you are working | ||
in an interactive environment like Jupyter. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.