Skip to content

Commit

Permalink
First update to many of the base configuration files to better match …
Browse files Browse the repository at this point in the history
…DGL-PTM.
  • Loading branch information
thijsvl committed Oct 25, 2024
1 parent 9b09149 commit 0c6bb81
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 17 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -67,3 +69,6 @@ venv.bak/
*.swp
*.swo
*.orig

# testing
test_models/
13 changes: 8 additions & 5 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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: <insert DOI here>
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
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This product includes dgl_abm, software developed by
Meiert W. Grootes.
Netherlands eScience Center.
20 changes: 18 additions & 2 deletions README.dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]:SDCCA/dgl_abm.git
cd dgl_abm
python -m pip install .
```
\* - the project is currently under development and is not release-ready yet.

## Documentation

Expand Down
4 changes: 2 additions & 2 deletions project_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
28 changes: 22 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ build-backend = "setuptools.build_meta"

[project]
authors = [
{ name = "Meiert W. Grootes", email = "[email protected]" }
{name = "Meiert W. Grootes", email = "[email protected]"},
{name = "Debraj Roy"},
{name = "Fakhereh Sarah Alidoost"},
{name = "Pranav Chandramouli"},
{name = "Sonja Georgievska"},
{name = "Thijs van Lankveld"},
]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
Expand All @@ -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]
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions src/regen_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
git rev-parse HEAD > version.md

1 change: 1 addition & 0 deletions src/version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9b09149e38a6ae5c9889e0418d4520fa74b5c551

0 comments on commit 0c6bb81

Please sign in to comment.