forked from SDCCA/PovertyTrapModel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into 53_save_model_state_customization
- Loading branch information
Showing
5 changed files
with
68 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Linting with ruff # settings are in pyproject.toml | ||
|
||
on: | ||
pull_request: # only run on pull requests for now | ||
branches: [ "master", "development" ] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./dgl_ptm | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.11" | ||
- name: Get changed python files in dgl_ptm # for now, we only lint the changed files | ||
id: files | ||
run: | | ||
echo "files=$(git diff --name-only --relative --diff-filter=d origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF -- "*.py" | tr '\n' ' ')" >> $GITHUB_ENV | ||
- name: Install dependencies # ruff tools are installed in the dev dependencies | ||
if: env.files != '' | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[dev] | ||
- name: Check code style against standards | ||
if: env.files != '' | ||
run: | | ||
ruff check $(echo ${{ env.files }} | tr ' ' '\n') | ||
- name: Print message when files is empty | ||
if: env.files == '' | ||
run: echo "No python files were changed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
"""Documentation about dgl_ptm""" | ||
"""Documentation about dgl_ptm.""" | ||
import logging | ||
|
||
#from dgl_ptm.model import initialize_model, step | ||
from dgl_ptm.model.initialize_model import PovertyTrapModel | ||
# from dgl_ptm.agent import agent_update | ||
# from dgl_ptm.agentInteraction import trade_money | ||
# from dgl_ptm.network import global_attachment, link_deletion | ||
# from dgl_ptm.model import initialize_model, data_collection, step | ||
# from dgl_ptm.util import * | ||
from dgl_ptm import config | ||
|
||
#from dgl_ptm.model import initialize_model, step | ||
from dgl_ptm.model.initialize_model import PovertyTrapModel | ||
|
||
__all__ = ['config', 'PovertyTrapModel'] | ||
|
||
logging.getLogger(__name__).addHandler(logging.NullHandler()) | ||
|
||
__author__ = "Team Atlas" | ||
__email__ = "p.chandramouli@esciencecenter.nl" | ||
__email__ = "m.grootes@esciencecenter.nl" | ||
__version__ = "0.1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters