Skip to content

Commit

Permalink
Merge pull request #21 from fenfisdi/issue/19/pyproject
Browse files Browse the repository at this point in the history
chore: migrated to pyproject.toml
  • Loading branch information
jearistiz authored May 23, 2021
2 parents f6be724 + dbba2fd commit df3f791
Show file tree
Hide file tree
Showing 21 changed files with 79 additions and 27 deletions.
8 changes: 4 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ dinjo = {editable = true, path = "."}

[scripts]
tests = "python -m pytest tests"
tests-cov = "python -m pytest tests --cov dinjo"
tests-cov-html = "python -m pytest tests --cov-report html --cov dinjo"
linter = "flake8 dinjo tests examples --max-line-length=99"
tests-cov = "python -m pytest tests --cov src/dinjo"
tests-cov-html = "python -m pytest tests --cov-report html --cov src/dinjo"
linter = "flake8 src/dinjo tests examples --max-line-length=99"
docs = "make -C docs html"
docs-latex = "make -C docs latexpdf"
docs-latex = "make -C docs latexpdf LATEXMKOPTS='-silent'"
docs-clean = "make -C docs clean"

[requires]
Expand Down
26 changes: 25 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file removed dinjo/predefined/__init__.py
Empty file.
9 changes: 6 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@

import sphinx_rtd_theme # noqa

sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../../src'))

from dinjo import VERSION

# -- Project information -----------------------------------------------------

project = 'DINJO'
copyright = '2021, Juan Esteban Aristizabal-Zuluaga and FEnFiSDi'
author = 'Juan Esteban Aristizabal-Zuluaga and FEnFiSDi'

version = '0.0'
release = '0.0.dev1'
dinjo_version = VERSION.split('.')

version = '.'.join(dinjo_version[:2])
release = '.'.join(dinjo_version[:3])

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion examples/col_vars_params.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from dinjo.model import Parameter, StateVariable
from examples.cmodel_examples_utilities import param_sample_range
from cmodel_examples_utilities import param_sample_range

# Instantiation of state variables and parameters

Expand Down
2 changes: 1 addition & 1 deletion examples/seirv_model_colombia.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dinjo import model
from dinjo.predefined.epidemiology import ModelSEIRV
# State variables and parameters are setup in col_vars_params.py module
from examples.col_vars_params import (
from col_vars_params import (
seirv_state_variables_colombia,
seirv_parameters_colombia
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta:__legacy__"
build-backend = "setuptools.build_meta"
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ sphinxcontrib-htmlhelp==2.0.0; python_version >= '3.6'
sphinxcontrib-jsmath==1.0.1; python_version >= '3.5'
sphinxcontrib-qthelp==1.0.3; python_version >= '3.5'
sphinxcontrib-serializinghtml==1.1.5; python_version >= '3.5'
toml==0.10.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
toml==0.10.2
urllib3==1.26.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'
38 changes: 38 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[metadata]
name = DINJO
version = attr:dinjo.VERSION
author = Juan Esteban Aristizabal-Zuluaga
author_email = [email protected]
description = DINJO lets you find optimal values of initial value problems´ parameters
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/fenfisdi/dinjo
project_urls =
Documentation = https://dinjo.readthedocs.io/
license = gplv3
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Intended Audience :: Science/Research
License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Mathematics
Development Status :: 3 - Alpha
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Software Development :: Libraries
Topic :: Software Development

[options]
package_dir =
= src
packages = find:
install_requires =
numpy==1.20.3
scipy==1.6.3
python_requires = >=3.8
zip_safe = False

[options.packages.find]
where = src
16 changes: 1 addition & 15 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
import setuptools

with open("README.md", "r") as f:
long_description = f.read()

setuptools.setup(
name='DINJO',
version='0.0.dev1',
description='DINJO lets you find optimal values of initial value problems\' parameters',
long_description=long_description,
long_description_content_type="text/markdown",
author='Juan Esteban Aristizabal-Zuluaga',
author_email='[email protected]',
license='gplv3',
packages=['dinjo'],
zip_safe=False
)
setuptools.setup()
1 change: 1 addition & 0 deletions src/dinjo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION = '0.0.dev1'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit df3f791

Please sign in to comment.