Skip to content

Commit

Permalink
Added more information to pyproject.toml and organized it better. Som…
Browse files Browse the repository at this point in the history
…e cleanup after rebase.
  • Loading branch information
Sigurd-Borge committed Sep 30, 2024
1 parent 07e1526 commit 00a9db6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 19 deletions.
47 changes: 35 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,62 @@ build-backend = "setuptools.build_meta"
[project]
name = "antares_craft"
version = "0.0.1"
description = """Antares Craft python library is currently under construction. When completed it will allow to \
create, update and read antares studies."""
readme = "README.md"
license = {file = "LICENSE"}
authors = [
{name="Sylvain Leclerc"},
{name="Tatiana Vargas"},
{name="Martin Behlthle"},
{name="Sigurd Borge"}
]
requires-python = ">=3.9"
dependencies = [

]
classifiers = [
# Classifiers here: https://pypi.org/classifiers/
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[tool.pytest.ini_options]
pythonpath = "src"
testpaths = "tests"
log_cli = true
junit_family= "xunit2"
[project.urls]
Repository = "https://github.com/AntaresSimulatorTeam/antares_craft"
"Bug Tracker" = "https://github.com/AntaresSimulatorTeam/antares_craft/issues"

# Coverage
[tool.coverage.run]
relative_files = true

# Mypy
[tool.mypy]
mypy_path = "src"
packages = "antares"
disallow_untyped_defs = true
disallow_untyped_calls = true

[tool.setuptools.packages.find]
# All the following settings are optional:
where = ["src"]
# Pytest
[tool.pytest.ini_options]
pythonpath = "src"
testpaths = "tests"
log_cli = true
junit_family= "xunit2"

# Ruff
[tool.ruff]
line-length = 120

[tool.ruff.lint]
# E4, E7, E9 and F are the default configuration of ruff, I is added to handle imports
## E4, E7, E9 and F are the default configuration of ruff, "I" is added to handle imports
select = ["E4", "E7", "E9", "F", "I"]

[tool.ruff.lint.isort]
# Use a single line between direct and from import.
## Use a single line between direct import and from import.
lines-between-types = 1
section-order = [
"testing",
Expand All @@ -53,5 +74,7 @@ section-order = [
[tool.ruff.lint.isort.sections]
testing = ["pytest*", "*mock*"]

[tool.coverage.run]
relative_files = true
# Setuptools
[tool.setuptools.packages.find]
## All the following settings are optional:
where = ["src"]
1 change: 0 additions & 1 deletion src/antares/model/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
from antares.model.settings import StudySettings
from antares.service.api_services.study_api import _returns_study_settings
from antares.service.base_services import BaseStudyService
from antares.service.local_services.study_local import StudyLocalService
from antares.service.service_factory import ServiceFactory
from antares.tools.ini_tool import IniFile, IniFileTypes

Expand Down
5 changes: 0 additions & 5 deletions src/antares/service/base_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,6 @@ def add_constraint_terms(self, constraint: BindingConstraint, terms: List[Constr
"""
pass

@property
@abstractmethod
def binding_constraints(self) -> dict[str, BindingConstraint]:
pass

@abstractmethod
def delete_binding_constraint_term(self, constraint_id: str, term_id: str) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/antares/services/local_services/test_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
BindingConstraintFrequency,
BindingConstraintOperator,
BindingConstraintProperties,
ConstraintTerm,
BindingConstraintPropertiesLocal,
ConstraintTerm,
)
from antares.model.commons import FilterOption
from antares.model.hydro import Hydro
Expand Down

0 comments on commit 00a9db6

Please sign in to comment.