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

Poetry Environment #159

Merged
merged 32 commits into from
Nov 29, 2023
Merged

Poetry Environment #159

merged 32 commits into from
Nov 29, 2023

Conversation

ntlhui
Copy link
Contributor

@ntlhui ntlhui commented Nov 14, 2023

Adds Poetry for package/environment management

@ccrutchf
Copy link

One thing to consider is how well does poetry.lock handle cross-architecutre. Did not used to be well, but looks like that may have changed since I've given it a try.

python-poetry/poetry#5205

@ntlhui
Copy link
Contributor Author

ntlhui commented Nov 14, 2023

Again, this is currently demonstrated across linux, windows, and macos on the github actions.

TQZhang04 and others added 3 commits November 16, 2023 17:11
* Replaced .append with pd.concat for pandas upgrade
* Added resampy to poetry to fix librosa dependencies
* Fixed return type mismatches for Microfaune and BirdNET
---------
Co-authored-by: TQ Zhang <tianqiz04@gmail.com>
@@ -83,13 +83,14 @@ def splitSignal(sig, rate, overlap, seconds=3.0, minlen=1.5):
def readAudioData(path, overlap, sample_rate=48000):

print('READING AUDIO DATA...', end=' ', flush=True)

# Open file with librosa (uses ffmpeg or libav)
print("Path: ", path)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +91 to +92
except Exception as e:
print(e)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

E4E pylint disallows e as a variable name. Use exp or exc.
E4E pylint discourages broad-except. Please reconsider catching builtins.Exception

@@ -124,7 +124,7 @@ def create_spec(data, fs, n_mels=32, n_fft=2048, hop_len=1024):
"""
# Calculate spectrogram
S = librosa.feature.melspectrogram(
data, sr=fs, n_fft=n_fft, hop_length=hop_len, n_mels=n_mels)
y=data, sr=fs, n_fft=n_fft, hop_length=hop_len, n_mels=n_mels)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Recommend each kwarg on a separate line

elif stats_type == "IoU":
IoU_Matrix = clip_IoU(clip_automated_df, clip_manual_df)
clip_stats_df = matrix_IoU_Scores(
IoU_Matrix, clip_manual_df, threshold)
if statistics_df.empty:
statistics_df = clip_stats_df
else:
statistics_df = statistics_df.append(clip_stats_df)
statistics_df = pd.concat([statistics_df, clip_stats_df])
except BaseException as e:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

E4E pylint discourages broad-except. Please consider not catching builtins.BaseException
E4E pylint does not allow e as a variable name. Please consider exc or exp

PyHa/tweetynet_package/tweetynet/Load_data_functions.py Outdated Show resolved Hide resolved
This was referenced Nov 18, 2023
Copy link
Contributor

@Sean1572 Sean1572 left a comment

Choose a reason for hiding this comment

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

Probably should put some of the raised concerns into github issues before submitting this PR. I do agree with changing the error handling but that I think can safely be its own PR.

Other than that code changes lgtm

@sprestrelski sprestrelski merged commit c991cda into main Nov 29, 2023
18 checks passed
@sprestrelski sprestrelski deleted the poetry branch November 29, 2023 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants