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 python validation workflows #1

Merged
merged 17 commits into from
Nov 8, 2023
Merged

Adds python validation workflows #1

merged 17 commits into from
Nov 8, 2023

Conversation

mouse-reeve
Copy link
Member

@mouse-reeve mouse-reeve commented Nov 4, 2023

I'm thinking that it would be helpful to get this in place early, but I'm happy to chill if it's more of a hassle right now than it's worth. And I don't want to have Black create a bunch of conflicts with existing work

Things to fix before this is ready because I need to go to work right now:

  • Make it clear how to actually run black
  • Make the pylint one actually work
  • Add tests workflow
  • Update code formatting

@mouse-reeve mouse-reeve marked this pull request as draft November 4, 2023 15:39
@hughrun
Copy link
Collaborator

hughrun commented Nov 5, 2023

Sounds good. FYI the original repo came with tox and once I worked out what that is, it seems to be useful. So I've reconfigured it to add options for black, pylint, and pytest.

I'm currently finalising linting of the tests, then tentatively this may be almost ready - so yes please don't pull this before checking with me, but I'm linting and testing everything so it should be relatively plain sailing once this first bunch of stuff is complete.

@mouse-reeve
Copy link
Member Author

Thank you, I just realized tox is there and I haven't figured out how to get it to work with pylint but it made getting the workflow for the tests so much easier

@mouse-reeve
Copy link
Member Author

Okay it looks like the workflows work! I'll just leave this until you're ready for it.

@mouse-reeve mouse-reeve marked this pull request as ready for review November 5, 2023 03:27
@hughrun
Copy link
Collaborator

hughrun commented Nov 5, 2023

Sorry just pushed up a bunch of stuff that probably has broken your model!

I moved the main code into a src directory to make it easier to package with build.

So tox commands should be:

  • tox - will run pytest
  • tox - will run black on everything
  • tox -e pylint -- src will run pylint on the actual code
  • tox -e pylint -- tests will run pylint on the tests

I'll add a CONTRIBUTING page soon to clarify.

@mouse-reeve
Copy link
Member Author

No worries! I'll check back in tomorrow morning and update this to reflect where it's at.

@mouse-reeve
Copy link
Member Author

Pylint isn't working for me locally so I'm trying to get it to pass here. I can revert the changes to the tests if it's easier to not have them in this branch

@mouse-reeve
Copy link
Member Author

@hughrun ready to merge?

@hughrun hughrun merged commit 0655eb2 into main Nov 8, 2023
3 checks passed
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