-
Notifications
You must be signed in to change notification settings - Fork 1
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
Addresses #28, #37 moved main files to src folder. Testing and sphinx… #49
Conversation
…ing and sphinx-docs via tox.
There might be changes necessary in the CI, since the package is now in a subfolder. This is somehow necessary? for setup.cfg |
@maltevogl it looks like the CI is failing because the path we were using for caching python deps has changed, I think you need to change it from the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing all of this! Great to see. I was able to install locally, run tests with tox, and generate docs with tox – very nice!
Thanks for updating the readme; do you think we need any more details? (e.g., any problems if we still run tests with pytest instead of tox? what do we lose?) I guess when you generate the docs it gives you the path to view them.
I don't typically use tox on my projects, can you briefly state the value? I didn't know you could use it to build docs or run other commands, that seems convenient. (I only knew of it for running matrix-style testing on different versions locally.)
Do we want support for a matrix build with tox, and if so can we synchronize the python versions we're testing on GitHub Actions? (I'm not sure if this is worth the effort/time, I'm fine with running one version locally).
I think this generally looks good and we can probably merge once the checks are passing.
src/undate/undate.py
Outdated
@@ -13,7 +13,7 @@ | |||
ONE_DAY = datetime.timedelta(days=1) | |||
|
|||
|
|||
class Undate: | |||
class Undate(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought ()
wasn't needed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just old school, I guess. We can remove them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am too, trying to train myself not to do this style class Undate(Object):
any more
Do we still need a minimal |
I do not know how to change the CI for a PR only. Can someone look at this? |
This is the syntax for making a step conditional so it only applies to pull requests:
Which step needs to be made conditional for PRs only? I think the caching step change applies to all events. Would be glad to help if you can provide more specifics about what you think is needed. |
@rlskoeser re
|
Thanks — I saw something like that somewhere in the docs but couldn't find it when I went back to look. That's what I thought — it's super minimal since it relies on the other config files, but still helpful to have it for some cases. |
@@ -31,4 +31,4 @@ jobs: | |||
run: pip install -e ".[dev]" | |||
if: steps.python-cache.outputs.cache-hit != 'true' | |||
- name: Run unit tests | |||
run: pytest | |||
run: tox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ColeDCrawford I don't know how to reconcile tox with the python version test matrix, do you ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like tox-gh-actions
worked!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now do we need to specify the python versions in more places? would be nice if we could avoid that duplication somehow (seems redundant to have it in the tox config and also the build matrix). We should put it on the readme at some point, too, but hoping we can use a badge to pull from pypi once we publish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, it would be nice to pull the build matrix from tox.ini tox.envlist
or setup.cfg
, but not sure how to set that up.
Good suggestion by @rlskoeser Co-authored-by: Rebecca Sutton Koeser <rlskoeser@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this looks great, looking forward to seeing docs. Tests are now passing with the updated tox and python matrix.
@ColeDCrawford I don't see the GitHub Actions listed on the PR and the checks tab says there were zero workflow runs — any ideas? |
That is weird. When the tests were failing they appeared at the bottom of the PR, but you're right that I don't see them now. There's also no green check on https://github.com/dh-tech/hackathon-2022/pulls. But if you go to https://github.com/dh-tech/hackathon-2022/actions, you can see all the Actions runs, and this PR passes for both |
Maybe related to the fact that the PR is from |
@ColeDCrawford yes, I see the actions passed — very weird. They were showing up before, not sure why they stopped. (Possible your path filter is excluding it on the push, but I would have thought the pull would still run....) Should we just merge it and then deal with it if there are any problems? |
What should work?
pip install -U .
tox
tox -e docs
In principle ready for readthedocs (see yaml)