diff --git a/.gitignore b/.gitignore index dd8a4fa..903818d 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,8 @@ docs/_build # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +.eclipse +.vscode .spyderproject .spyproject @@ -67,3 +69,6 @@ venv.bak/ *.swp *.swo *.orig + +# testing +test_models/ diff --git a/CITATION.cff b/CITATION.cff index a626d9c..fa78c56 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -3,14 +3,17 @@ cff-version: "1.2.0" title: "dgl_abm" authors: - - family-names: Grootes - given-names: Meiert + - family-names: Atlas + given-names: Team orcid: "https://orcid.org/0000-0000-0000-0000" -date-released: 2024-10-25 +date-released: 20??-MM-DD +doi: version: "0.1.0" repository-code: "https://github.com/SDCCA/dgl_abm" keywords: - "ABM" - - " Tensor" - - " PyTorch" + - "Graph" + - "PyTorch" + - "Tensor" message: "If you use this software, please cite it using these metadata." +license: Apache-2.0 diff --git a/NOTICE b/NOTICE index 7869a80..6dc24ab 100644 --- a/NOTICE +++ b/NOTICE @@ -1,2 +1,2 @@ This product includes dgl_abm, software developed by -Meiert W. Grootes. +Netherlands eScience Center. diff --git a/README.dev.md b/README.dev.md index 87d2b76..7d2943f 100644 --- a/README.dev.md +++ b/README.dev.md @@ -60,7 +60,9 @@ To see the results on the command line, run coverage report ``` -`coverage` can also generate output in HTML and other formats; see `coverage help` for more information.## Running linters locally +`coverage` can also generate output in HTML and other formats; see `coverage help` for more information. + +## Running linters locally For linting and sorting imports we will use [ruff](https://beta.ruff.rs/docs/). Running the linters requires an activated virtual environment with the development tools installed. @@ -71,9 +73,14 @@ ruff check . # linter with automatic fixing ruff check . --fix + +# linter with reformatting enabled +ruff format . ``` -To fix readability of your code style you can use [yapf](https://github.com/google/yapf).## Generating the API docs +To fix readability of your code style you can use [yapf](https://github.com/google/yapf). + +## Generating the API docs ```shell cd docs @@ -113,6 +120,15 @@ bump-my-version bump minor # bumps from e.g. 0.3.2 to 0.4.0 bump-my-version bump patch # bumps from e.g. 0.3.2 to 0.3.3 ``` +The code also compares stored model versions to the current code version when loading existing models. + +Updating the current code version, stored in `src/version.md` is done with a script: + +```shell +cd src +regen_version.sh +``` + ## Making a release This section describes how to make a release in 3 parts: diff --git a/README.md b/README.md index 40dcf7e..f00ba03 100644 --- a/README.md +++ b/README.md @@ -22,13 +22,14 @@ The project setup is documented in [project_setup.md](project_setup.md). Feel fr ## Installation -To install dgl_abm from GitHub repository, do: +To install dgl_abm from GitHub repository*, do: ```console git clone git@github.com:SDCCA/dgl_abm.git cd dgl_abm python -m pip install . ``` +\* - the project is currently under development and is not release-ready yet. ## Documentation diff --git a/project_setup.md b/project_setup.md index bc35912..a832213 100644 --- a/project_setup.md +++ b/project_setup.md @@ -11,7 +11,6 @@ checklist](https://guide.esciencecenter.nl/#/best_practices/checklist). This repository is set up with Python versions: -- 3.10 - 3.11 - 3.12 @@ -57,7 +56,8 @@ help you decide which tool to use for packaging. - The documentation is set up with the ReadTheDocs Sphinx theme. - Check out its [configuration options](https://sphinx-rtd-theme.readthedocs.io/en/latest/). - [AutoAPI](https://sphinx-autoapi.readthedocs.io/) is used to generate documentation for the package Python objects. -- `.readthedocs.yaml` is the ReadTheDocs configuration file. When ReadTheDocs is building the documentation this package and its development dependencies are installed so the API reference can be rendered.- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=writingdocumentation) +- `.readthedocs.yaml` is the ReadTheDocs configuration file. When ReadTheDocs is building the documentation this package and its development dependencies are installed so the API reference can be rendered. +- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=writingdocumentation) ## Coding style conventions and code quality diff --git a/pyproject.toml b/pyproject.toml index 1c80caa..b35dcd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,12 @@ build-backend = "setuptools.build_meta" [project] authors = [ - { name = "Meiert W. Grootes", email = "m.grootes@esciencecenter.nl" } + {name = "Meiert W. Grootes", email = "m.grootes@esciencecenter.nl"}, + {name = "Debraj Roy"}, + {name = "Fakhereh Sarah Alidoost"}, + {name = "Pranav Chandramouli"}, + {name = "Sonja Georgievska"}, + {name = "Thijs van Lankveld"}, ] classifiers = [ "Development Status :: 2 - Pre-Alpha", @@ -18,17 +23,28 @@ classifiers = [ "", "Natural Language :: English", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] -dependencies = [] +dependencies = [ + "dask", + "dgl", + "numpy", + "pydantic>=2", + "scipy==1.10.1", + "torch==2.1.1", + "torchdata==0.7.1", + "torchvision", + "torchaudio", + "xarray", + "zarr", +] description = "ABM modelling framework using networks and tensor algebra supported by the DGL library" -keywords = ["ABM"," Tensor"," PyTorch"] +keywords = ["ABM", "Graph", "PyTorch", "Tensor"] license = {file = "LICENSE"} name = "dgl_abm" readme = {file = "README.md", content-type = "text/markdown"} -requires-python = ">=3.8" +requires-python = ">=3.11, <3.12" version = "0.1.0" [project.optional-dependencies] @@ -85,7 +101,7 @@ extras = dev [tool.ruff] line-length = 120 output-format = "concise" -extend-exclude = ["docs"] +extend-exclude = ["docs", "build"] [tool.ruff.lint] # Allow unused variables when underscore-prefixed. diff --git a/src/regen_version.sh b/src/regen_version.sh new file mode 100644 index 0000000..2f22831 --- /dev/null +++ b/src/regen_version.sh @@ -0,0 +1,3 @@ +#!/bin/bash +git rev-parse HEAD > version.md + diff --git a/src/version.md b/src/version.md new file mode 100644 index 0000000..47ed90b --- /dev/null +++ b/src/version.md @@ -0,0 +1 @@ +9b09149e38a6ae5c9889e0418d4520fa74b5c551