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

Adds first test for project and functionality allowing a phase to load and save its data #1

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

lisad
Copy link
Owner

@lisad lisad commented Dec 21, 2023

Tests should run as long as there's a tmp directory in the tests directory - TODO to create that automatically and then erase it

@lisad lisad requested a review from jeffkole December 21, 2023 06:42
# I took the "nuclear option" and am ignoring ID settings completely when pushing
# this library to source control. TBH I don't know why it's "not recommended"
# according to GH's template .gitignore but we could always get more nuanced later. -Lisa
.idea/
Copy link
Collaborator

Choose a reason for hiding this comment

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

As an ardent Vim user, I’m ok with nuclear options.

To setup and run tests:
* venv recommended
* pip install -r requirements
* pytest
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are venv and pip still state of the art for requirements management in Python? I thought something new and better had come along: Poetry (https://python-poetry.org/)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Poetry is new and allegedly better, but I think for a library simpler and older is better. we should also have much less need for poetry - it's not going to be a large project with complicated dependencies. (In fact I'm debating whether a dependency on pandas is OK, or if we should long-term work to remove it.)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Oh - also it would be possible to use poetry in the sample project, which will bring in more libraries to do network and database stuff.

import pandas as pd

class Phase:
# LMDTODO How to make Phase abstract base class
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this a question of “Is it possible to make an abstract base class in Python?,” to which, I certainly have no answer, or more along the lines of “Should Phase be an abstract base class?”

Copy link
Owner Author

Choose a reason for hiding this comment

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

I meant to comment that I need to make it an abstract base class, and will remind myself how maybe in the next bit of work.

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.

2 participants