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

Add django_coverage_plugin #828

Merged
merged 5 commits into from
Aug 3, 2023
Merged

Conversation

sim-codes
Copy link
Contributor

@sim-codes sim-codes commented Jul 30, 2023

Add django_coverage_plugin #663

I have configure the django_coverage_plugin as stated by brylie.

I could not run the make compile-deps, the MAKE on my PC is throwing an error which I'm find it hard to fix.

@brylie
Copy link
Member

brylie commented Aug 1, 2023

I could not run the make compile-deps, the MAKE on my PC is throwing an error which I'm find it hard to fix.

Try merging the latest changes from the main branch into your branch. In main, I have switched from using Makefile to a simple Python script called develop.py. You can call python develop.py compile-deps to lock the latest dependency changes. 😄

Copy link
Member

@brylie brylie left a comment

Choose a reason for hiding this comment

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

As you can see from the following traceback, our tests are now failing. Since getting tests to pass in continuous integration is an essential part of working in software teams, it is good practice to ensure open-source pull requests also pass CI.

Traceback (most recent call last):
  File "/home/runner/work/WF-website/WF-website/.venv/bin/coverage", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/runner/work/WF-website/WF-website/.venv/lib/python3.11/site-packages/coverage/cmdline.py", line 973, in main
    status = CoverageScript().command_line(argv)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/WF-website/WF-website/.venv/lib/python3.11/site-packages/coverage/cmdline.py", line 684, in command_line
    return self.do_run(options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/WF-website/WF-website/.venv/lib/python3.11/site-packages/coverage/cmdline.py", line 858, in do_run
    self.coverage.start()
  File "/home/runner/work/WF-website/WF-website/.venv/lib/python3.11/site-packages/coverage/control.py", line 6[18](https://github.com/WesternFriend/WF-website/actions/runs/5708714684/job/15526774011?pr=828#step:7:19), in start
    self._init()
  File "/home/runner/work/WF-website/WF-website/.venv/lib/python3.11/site-packages/coverage/control.py", line 332, in _init
    self._plugins = Plugins.load_plugins(self.config.plugins, self.config, self._debug)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/WF-website/WF-website/.venv/lib/python3.11/site-packages/coverage/plugin_support.py", line 55, in load_plugins
    __import__(module)
ModuleNotFoundError: No module named 'django_coverage_plugin'

Please follow the previous instructions to make sure our requirements.txt is updated so CI will pass. Otherwise, check out the contents of the update-deps command in the develop.py in our main branch and run those commands manually. Then, check in the resulting requirements files.

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (b355614) 81.00% compared to head (67a6b82) 81.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #828   +/-   ##
=======================================
  Coverage   81.00%   81.00%           
=======================================
  Files         110      110           
  Lines        3333     3333           
=======================================
  Hits         2700     2700           
  Misses        633      633           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sim-codes
Copy link
Contributor Author

I used the previous command python develop.py compile-deps as stated already.
Here is screenshot of the update on the requirements files and pyproject.toml
image

@sonarcloud
Copy link

sonarcloud bot commented Aug 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codeclimate
Copy link

codeclimate bot commented Aug 3, 2023

Code Climate has analyzed commit 67a6b82 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 81.0% (0.0% change).

View more on Code Climate.

@brylie brylie merged commit 499db43 into WesternFriend:main Aug 3, 2023
5 checks passed
@brylie brylie mentioned this pull request Aug 3, 2023
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