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

Setup CI #1

Open
3 tasks
shardros opened this issue Jul 28, 2022 · 9 comments · May be fixed by #17
Open
3 tasks

Setup CI #1

shardros opened this issue Jul 28, 2022 · 9 comments · May be fixed by #17
Assignees
Labels

Comments

@shardros
Copy link
Member

shardros commented Jul 28, 2022

AS A shepherd developer
I WANT to not be allowed to commit broken code to master
SO THAT the user expierence is bug free
DONE IS:

  • CI is setup running all of the tests in /test
  • It is not possible to commit to master with failing tests
  • Linting etc should also be run, nothing too aggressive

NOTES:

  • @shardros's personal vote for Github Actions + PyTest + Pipenv
@Minion3665
Copy link
Member

Minion3665 commented Jul 28, 2022

Could we use something like black in leu of/in addition to a linter? That way we know the code will be entirely consistent while also not having to worry about many points of a stricter code style such as pycodestyle

@shardros
Copy link
Member Author

There are many benifit to linters which autoformaters cannot solve, such as checking for methods which are too long, too many args.

Not to mention all of the error checking they do.

Personally I dislike black. Its very opionated on things which do matter. Sometimes you want to format arrays in a particular way because it's clearer to read. I trust the judgement of the people working on this project enough to trust that they will be able to format a document clearer than black.

I would suggest autopep8 instead. It only enforces PEP8 which I think is a good set of rules which are always true for cleaner code.

Black makes decisions about things which are sometimes true and that's worse than useless when it chooses wrong.

I sometimes feel like it chooses the worst possible style on purpose as a test of loyalty.

I know about fmt: on/off but that is just more noise and even less clean code than there was to begin with.

These are just my opions and I can be convinced otherwise.

@Minion3665
Copy link
Member

There are many benifit to linters which autoformaters cannot solve, such as checking for methods which are too long, too many args.

Not to mention all of the error checking they do.

Personally I dislike black. Its very opionated on things which do matter. Sometimes you want to format arrays in a particular way because it's clearer to read. I trust the judgement of the people working on this project enough to trust that they will be able to format a document clearer than black.

I would suggest autopep8 instead. It only enforces PEP8 which I think is a good set of rules which are always true for cleaner code.

Black makes decisions about things which are sometimes true and that's worse than useless when it chooses wrong.

I sometimes feel like it chooses the worst possible style on purpose as a test of loyalty.

I know about fmt: on/off but that is just more noise and even less clean code than there was to begin with.

These are just my opions and I can be convinced otherwise.

That's fair enough; autopep8 looks reasonable. How about using autopep8 for formatting and then pycodestyle for stuff which autoformatters can't catch?

@shardros
Copy link
Member Author

Sounds good to me

@shardros
Copy link
Member Author

@Minion3665 would you like to do this?

@Minion3665 Minion3665 self-assigned this Jul 29, 2022
@Minion3665
Copy link
Member

@Minion3665 would you like to do this?

Sure thing; right now I'm at work so I'll do it when I'm on my break

@shardros
Copy link
Member Author

shardros commented Jul 29, 2022 via email

Minion3665 added a commit that referenced this issue Aug 15, 2022
- When a new PR is submitted, autoformat code with autopep8 and remove
  commented out code
- After reformatting, commit back to the pull request
- When reformatted code has been committed, lint it with pycodestyle

On github side we will
- Require all changes to be submitted as PRs
- Require all CI checks to pass before merging PRs

This change partially-fixes #1 and fixes #10
@Minion3665 Minion3665 linked a pull request Aug 15, 2022 that will close this issue
@Minion3665
Copy link
Member

image
Requiring status checks to pass is blocked by making this public (is this planned?) or paying for github

@shardros
Copy link
Member Author

shardros commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants