Skip to content

Commit

Permalink
build: remove coveralls (#1283)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello authored Oct 18, 2024
2 parents 5a131cf + 5793488 commit 2bd629b
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 35 deletions.
1 change: 0 additions & 1 deletion .github/workflows/_test-pip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
run: |
${{ inputs.activate_command }}
make test-core
python -m coveralls --service=github
- name: Run Country Template tests
if: ${{ startsWith(inputs.os, 'ubuntu') }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
*.mo
*.pyc
*~
.coverage
.mypy_cache
.mypy_cache*
.noseids
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### 43.2.1 [#1283](https://github.com/openfisca/openfisca-core/pull/1283)

#### Technical changes

- Remove `coveralls`

## 43.2.0 [#1279](https://github.com/openfisca/openfisca-core/pull/1279)

#### New features
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/openfisca-core.svg?label=conda%2Fversion&style=for-the-badge)](https://anaconda.org/conda-forge/openfisca-core)

[![Python](https://img.shields.io/pypi/pyversions/openfisca-core.svg?label=python&style=for-the-badge)](https://pypi.python.org/pypi/openfisca-core)
[![Coveralls](https://img.shields.io/coveralls/github/openfisca/openfisca-core/master.svg?label=code%20coverage&style=for-the-badge)](https://coveralls.io/github/openfisca/openfisca-core?branch=master)
[![Contributors](https://img.shields.io/github/contributors/openfisca/openfisca-core.svg?style=for-the-badge)](https://github.com/openfisca/openfisca-core/graphs/contributors)

[![Newsletter](https://img.shields.io/badge/newsletter-subscribe!-informational.svg?style=for-the-badge)](mailto:contact%40openfisca.org?subject=Subscribe%20to%20your%20newsletter%20%7C%20S'inscrire%20%C3%A0%20votre%20newsletter&body=%5BEnglish%20version%20below%5D%0A%0ABonjour%2C%0A%0AVotre%C2%A0pr%C3%A9sence%C2%A0ici%C2%A0nous%C2%A0ravit%C2%A0!%20%F0%9F%98%83%0A%0AEnvoyez-nous%20cet%20email%20pour%20que%20l'on%20puisse%20vous%20inscrire%20%C3%A0%20la%20newsletter.%20%0A%0AAh%C2%A0!%20Et%20si%20vous%20pouviez%20remplir%20ce%20petit%20questionnaire%2C%20%C3%A7a%20serait%20encore%20mieux%C2%A0!%0Ahttps%3A%2F%2Fgoo.gl%2Fforms%2F45M0VR1TYKD1RGzX2%0A%0AAmiti%C3%A9%2C%0AL%E2%80%99%C3%A9quipe%20OpenFisca%0A%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%20ENGLISH%20VERSION%20%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0AHi%2C%20%0A%0AWe're%20glad%20to%20see%20you%20here!%20%F0%9F%98%83%0A%0APlease%20send%20us%20this%20email%2C%20so%20we%20can%20subscribe%20you%20to%20the%20newsletter.%0A%0AAlso%2C%20if%20you%20can%20fill%20out%20this%20short%20survey%2C%20even%20better!%0Ahttps%3A%2F%2Fgoo.gl%2Fforms%2FsOg8K1abhhm441LG2%0A%0ACheers%2C%0AThe%20OpenFisca%20Team)
Expand Down
2 changes: 1 addition & 1 deletion openfisca_core/data_storage/in_memory_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def put(self, value: t.Array[t.DTypeGeneric], period: None | t.Period) -> None:
>>> storage.put(value, period)
>>> storage.get(period)
array(['1', '2', 'salary'], dtype='<U21')
array(['1', '2', 'salary'], ...)
"""
if self.is_eternal:
Expand Down
6 changes: 3 additions & 3 deletions openfisca_core/data_storage/on_disk_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def put(self, value: t.Array[t.DTypeGeneric], period: None | t.Period) -> None:
... storage = data_storage.OnDiskStorage(directory)
... storage.put(value, period)
... storage.get(period)
array(['1', '2', 'salary'], dtype='<U21')
array(['1', '2', 'salary'], ...)
"""
if self.is_eternal:
Expand Down Expand Up @@ -273,15 +273,15 @@ def restore(self) -> None:
>>> storage1 = data_storage.OnDiskStorage(directory.name)
>>> storage1.put(value, period)
>>> storage1._files
{Period(('year', Instant((2017, 1, 1)), 1)): '.../2017.npy'}
{Period(('year', Instant((2017, 1, 1)), 1)): '...2017.npy'}
>>> storage2 = data_storage.OnDiskStorage(directory.name)
>>> storage2._files
{}
>>> storage2.restore()
>>> storage2._files
{Period((<DateUnit.YEAR: 'year'>, Instant((2017, 1, 1.../2017.npy'}
{Period((<DateUnit.YEAR: 'year'>, Instant((2017, 1, 1...2017.npy'}
>>> directory.cleanup()
Expand Down
6 changes: 3 additions & 3 deletions openfisca_core/holders/holder.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def set_input(
>>> class MyVariable(variables.Variable):
... definition_period = periods.DateUnit.YEAR
... entity = entity
... value_type = int
... value_type = float
>>> variable = MyVariable()
Expand All @@ -201,11 +201,11 @@ def set_input(
>>> holder = Holder(variable, population)
>>> holder.set_input("2018", numpy.array([12.5, 14]))
>>> holder.get_array("2018")
array([12, 14], dtype=int32)
array([12.5, 14. ], dtype=float32)
>>> holder.set_input("2018", [12.5, 14])
>>> holder.get_array("2018")
array([12, 14], dtype=int32)
array([12.5, 14. ], dtype=float32)
.. _documentation:
https://openfisca.org/doc/coding-the-legislation/35_periods.html#set-input-automatically-process-variable-inputs-defined-for-periods-not-matching-the-definition-period
Expand Down
10 changes: 1 addition & 9 deletions openfisca_tasks/test_code.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ test-core: $(shell git ls-files "*test_*.py")
openfisca_core/periods \
openfisca_core/projectors
@PYTEST_ADDOPTS="$${PYTEST_ADDOPTS} ${pytest_args}" \
python -m coverage run -m ${openfisca} test \
$? \
${openfisca_args}
python -m ${openfisca} test $? ${openfisca_args}
@$(call print_pass,$@:)

## Run country-template tests.
Expand All @@ -70,9 +68,3 @@ test-extension:
--extensions openfisca_extension_template \
${openfisca_args}
@$(call print_pass,$@:)

## Print the coverage report.
test-cov:
@$(call print_help,$@:)
@python -m coverage report
@$(call print_pass,$@:)
13 changes: 0 additions & 13 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,6 @@ profile = black
py_version = 39
sections = FUTURE, TYPING, TYPES, STDLIB, THIRDPARTY, OPENFISCA, FIRSTPARTY, LOCALFOLDER

[coverage:paths]
source = . */site-packages

[coverage:run]
branch = true
source = openfisca_core, openfisca_web_api

[coverage:report]
fail_under = 75
show_missing = true
skip_covered = true
skip_empty = true

[tool:pytest]
addopts = --disable-pytest-warnings --doctest-modules --showlocals
doctest_optionflags = ELLIPSIS IGNORE_EXCEPTION_DETAIL NUMBER NORMALIZE_WHITESPACE
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
dev_requirements = [
"black >=24.8.0, <25.0",
"codespell >=2.3.0, <3.0",
"coverage >=7.6.1, <8.0",
"colorama >=0.4.4, <0.5",
"darglint >=1.8.1, <2.0",
"flake8 >=7.1.1, <8.0.0",
"flake8-bugbear >=24.8.19, <25.0",
Expand All @@ -70,7 +70,7 @@

setup(
name="OpenFisca-Core",
version="43.2.0",
version="43.2.1",
author="OpenFisca Team",
author_email="[email protected]",
classifiers=[
Expand Down Expand Up @@ -107,7 +107,6 @@
"dev": dev_requirements,
"ci": [
"build >=0.10.0, <0.11.0",
"coveralls >=4.0.1, <5.0",
"twine >=5.1.1, <6.0",
"wheel >=0.40.0, <0.41.0",
],
Expand Down
4 changes: 4 additions & 0 deletions tests/core/test_yaml.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import subprocess
import sys

import pytest

Expand Down Expand Up @@ -118,6 +119,9 @@ def test_shell_script_with_reform() -> None:
subprocess.check_call(command, stdout=devnull, stderr=devnull)


# TODO(Mauko Quiroga-Alvarado): Fix this test
# https://github.com/openfisca/openfisca-core/issues/962
@pytest.mark.skipif(sys.platform == "win32", reason="Does not work on Windows.")
def test_shell_script_with_extension() -> None:
tests_dir = os.path.join(openfisca_extension_template.__path__[0], "tests")
command = [
Expand Down
4 changes: 4 additions & 0 deletions tests/web_api/test_parameters.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import re
import sys
from http import client

import pytest
Expand Down Expand Up @@ -44,6 +45,9 @@ def test_legacy_parameter_route(test_client) -> None:
assert response.status_code == client.OK


# TODO(Mauko Quiroga-Alvarado): Fix this test
# https://github.com/openfisca/openfisca-core/issues/962
@pytest.mark.skipif(sys.platform == "win32", reason="Does not work on Windows.")
def test_parameter_values(test_client) -> None:
response = test_client.get("/parameter/taxes/income_tax_rate")
parameter = json.loads(response.data)
Expand Down
7 changes: 7 additions & 0 deletions tests/web_api/test_variables.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import re
import sys
from http import client

import pytest
Expand Down Expand Up @@ -70,6 +71,9 @@ def test_input_variable_value(expected_values, input_variable_response) -> None:
check_input_variable_value(*expected_values, input_variable=input_variable)


# TODO(Mauko Quiroga-Alvarado): Fix this test
# https://github.com/openfisca/openfisca-core/issues/962
@pytest.mark.skipif(sys.platform == "win32", reason="Does not work on Windows.")
def test_input_variable_github_url(test_client) -> None:
input_variable_response = test_client.get("/variable/income_tax")
input_variable = json.loads(input_variable_response.data.decode("utf-8"))
Expand Down Expand Up @@ -102,6 +106,9 @@ def test_variable_value(expected_values, test_client) -> None:
check_variable_value(*expected_values, variable=variable)


# TODO(Mauko Quiroga-Alvarado): Fix this test
# https://github.com/openfisca/openfisca-core/issues/962
@pytest.mark.skipif(sys.platform == "win32", reason="Does not work on Windows.")
def test_variable_formula_github_link(test_client) -> None:
variable_response = test_client.get("/variable/income_tax")
variable = json.loads(variable_response.data.decode("utf-8"))
Expand Down

0 comments on commit 2bd629b

Please sign in to comment.