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

add automated tests for main methods, add domain dataset(s) #326

Open
PetrKorab opened this issue Sep 18, 2024 · 4 comments
Open

add automated tests for main methods, add domain dataset(s) #326

PetrKorab opened this issue Sep 18, 2024 · 4 comments

Comments

@PetrKorab
Copy link

Add automated tests covering the main Metasyn's methods, in line with JOSS guidelines. Also, please add tests for at least one domain dataset where you show the benefits of the programme. Make the data available to the reviewers, if possible. Thanks!

@qubixes
Copy link
Member

qubixes commented Sep 19, 2024

@PetrKorab Thanks for your comments. Could you elaborate in more detail which automated tests you are missing? We currently have >90% coverage and they are tested automatically with GitHub actions. Which main methods do you find untested?

@PetrKorab
Copy link
Author

PetrKorab commented Sep 19, 2024

@qubixes Please add here a link to a folder with automated tests (JOSS submission) showing Metasyn's functionality on at least one other domain dataset (except the Titanic one). Thanks.

@qubixes
Copy link
Member

qubixes commented Oct 4, 2024

The link to our test folder is https://github.com/sodascience/metasyn/tree/develop/tests for our development branch. I have added a medical dataset in #330, would that suffice as another domain dataset to you?

@vankesteren
Copy link
Member

@PetrKorab we have extensive automated tests in our tests folder, and we have now additionally documented them with docstrings based on your feedback.

Our tests include:

In addition, our continuous integration includes linting, type checking, formatting, documentation building, and running the example jupyter notebook from our examples folder. See core-ci.yml

Data is available to everyone in this way:

from metasyn import demo_dataframe
df = demo_dataframe("hospital")
print(df)
┌────────────┬───────────────┬───────────────┬──────┬──────┬───────────────┐
│ patient_id ┆ date_admitted ┆ time_admitted ┆ type ┆ age  ┆ hours_in_room │
│ ---        ┆ ---           ┆ ---           ┆ ---  ┆ ---  ┆ ---           │
│ str        ┆ date          ┆ time          ┆ cat  ┆ i64  ┆ f64           │
╞════════════╪═══════════════╪═══════════════╪══════╪══════╪═══════════════╡
│ A5909X0    ┆ 2024-01-01    ┆ 10:30:00      ┆ IVT  ┆ null ┆ 3.633531      │
│ B4025X2    ┆ 2024-01-01    ┆ 11:23:00      ┆ IVT  ┆ 59   ┆ 6.932891      │
│ B6999X2    ┆ 2024-01-01    ┆ 11:58:00      ┆ IVT  ┆ 77   ┆ 1.970654      │
│ B9525X2    ┆ 2024-01-01    ┆ 16:56:00      ┆ MYE  ┆ null ┆ 1.620047      │
│ B0453X1    ┆ 2024-01-02    ┆ 11:50:00      ┆ IVT  ┆ null ┆ 3.344935      │
│ …          ┆ …             ┆ …             ┆ …    ┆ …    ┆ …             │
│ B3830X7    ┆ 2024-01-04    ┆ 16:03:00      ┆ CAT  ┆ 87   ┆ 3.87092       │
│ A7952X3    ┆ 2024-01-04    ┆ 18:00:00      ┆ IVT  ┆ 60   ┆ 4.332882      │
│ A0013X2    ┆ 2024-01-05    ┆ 10:06:00      ┆ CAT  ┆ null ┆ 2.133339      │
│ B2077X8    ┆ 2024-01-05    ┆ 10:43:00      ┆ IVT  ┆ null ┆ 6.026763      │
│ A4700X7    ┆ 2024-01-05    ┆ 14:53:00      ┆ MYE  ┆ 84   ┆ 6.193777      │
└────────────┴───────────────┴───────────────┴──────┴──────┴───────────────┘

I hope this answers your comment in a satisfactory way!

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

No branches or pull requests

3 participants