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

53 hypermodern template #56

Merged
merged 15 commits into from
May 4, 2022
Merged

53 hypermodern template #56

merged 15 commits into from
May 4, 2022

Conversation

Vlek
Copy link
Owner

@Vlek Vlek commented May 4, 2022

No description provided.

vlek and others added 15 commits April 5, 2022 15:29
moves that will need to happen to get there.

Unfortunately I am running into a lot of issues with the pytests not
finding the source files. Will have to look into that. Also, the shell
isn't finding the command.
I have fixed the issue for imports, but I do not know that I did it
correctly. Currently I'm importing from src.roll_cli, but that's not
what is shown in the example code. I shouldn't need the `src.` beginning
portion and I am unsure why pytest is failing to recognize this. I am
wondering if I'm missing some sort of configuration.

Right now I am running into an issue with nox not being able to set up
virtual environments to be able to run the code. If I list sessions, I
have ones for 3.10 and below till 3.7. 3.10 for some reason is causing
me some grief, but I can run 3.9's manually using `nox -s mypy-3.9`.
There is some good info in the logs, but I may want to turn off the type
checking for tests potentially because that's extremely annoying.
One of the big things that nox hated was that I didn't add `-> None` at
the end of my test functions. I went through and added them.
I got all of the type issues fixed. I also was able to get the import
problem addressed as well. There's an explicit way that mypy wants
things exported within the __init__ files that I had to do.

At this point, the last thing that needs to be taken care of is the
precommit hook's issues. It found some whitespace it doesn't like and
black also came back on a few files. Will need to see how that works and
whether I can have it automatically change the code instead of simply
complaining about it.
I also figured out how to get it to automatically do the pre-commit as
well. This is awesome after I got over the initial hump of getting the
project up to the standards that they set out.

The next TODO items are going to be creating some documentation and also
redoing the README file to the new standard.
I forgot that Python ranges are upper bound exclusive.
The problem with pre-commit hooks is they only analyze the pieces of
code that are in the commit, not the entirety of the project. This makes
initial setup difficult because there may be files (or in my case, many
files) that are't touched that the pre-commit hooks would have issue
with if they were to run against them.
With the error message we're getting, it's hard to pinpoint what it is
that it's complaining about. We're getting a message about too many
positional arguments but where it's erroring out gives no detail about
what function is being supplied too many. I can't tell if it's in my
tests, my package's code, or in pyparser.

The one thing that could help me narrow it down is not all of my tests
are failing the typeguard check. It may be that typeguard just does not
like parameterized testing as things like exceptions checks are passing.
I just gave up. It's nearly midnight and the coverage report is still
showing a wrong total. My actual coverage is near or at 100%, but for
some reason it's stating it's just north of 50%. Adding additional tests
to the files that state that they're woefully under-tested also does not
seem to help either, so I really believe that there's something else at
play.

I am going to see if I can get a coverage report in html format or
something so I can run down exactly what it's saying later when I have
more time and sleep. The only thing I can think of at this point is
maybe branch coverage instead of line coverage but even that doesn't
make sense for the evaluationresults object which it has down at
something like 38% coverage since there isn't any branching there.
I keep getting the error message: `No source for code:
'/Users/runner/work/roll-cli/roll-cli/src/roll_cli/__init__.py'.`

No idea why, no real direction given as to why or which report doesn't
have this because this is a collection of all of the reports that have
been generated put together so I am guestimating that one of the
versions that is doing testing is not including it in its report. I have
tried to research it but we're not given the source files that it's
considering for the report, only the tests run from what I can tell. It
might be in the artifact file that's being transmitted after the run.
I really don't have time to deal with the issue for now, but it has to
do with how the template is gathering all of the reports and I believe
  that it might not be clearing out pyc files or something on one of the
  builds which is causing it to believe that files are present or not
  present that actually are.
@Vlek Vlek merged commit f7560b9 into main May 4, 2022
@Vlek Vlek deleted the 53_hypermodern_template branch May 4, 2022 07:14
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.

1 participant