Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
"pull_request_strategy": "update-or-create",
"post_actions": [],
"draft": false,
<<<<<<< HEAD
"baked_commit_ref": "67d15ddeb638efb7c39ab746e97e7b9c96c16801",
=======
"baked_commit_ref": "5e993bc834a6e47f91ba8b03446af56ab741e0fb",
>>>>>>> 9cf5def (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
"drift_managed_branch": "develop"
}
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
with:
poetry-version: "2.1.3"
- name: "Get image version"
run: "echo INVOKE_DIFFSYNC_IMAGE_VER=`poetry version -s`-py$${{ matrix.python-version }} >> $GITHUB_ENV"
run: "echo INVOKE_DIFFSYNC_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "Release"
on: # yamllint disable-line rule:truthy rule:comments
on: # yamllint disable-line rule:truthy rule:comments
release:
types: ["published"]

Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
- name: "Upload binaries to release"
run: "gh release upload ${{ github.ref_name }} dist/*.{tar.gz,whl}"
env:
GH_TOKEN: "${{ secrets.NTC_GITHUB_TOKEN }}"
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

publish-pypi:
name: "Push Package to PyPI"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Apache Software License 2.0

Copyright (c) 2025, Network to Code, LLC
Copyright (c) 2020-2026, Network to Code, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ A.sync_to(B)

Full documentation for this library can be found over on the [Diffsync Docs](https://diffsync.readthedocs.io/) website:

- [User Guide](https://diffsync.readthedocs.io/user/app_overview/) - Overview, Using the Library, Getting Started.
- [Administrator Guide](https://diffsync.readthedocs.io/admin/install/) - How to Install, Configure, Upgrade, or Uninstall the Library.
- [Developer Guide](https://diffsync.readthedocs.io/dev/contributing/) - Extending the Library, Code Reference, Contribution Guide.
- [Release Notes / Changelog](https://diffsync.readthedocs.io/admin/release_notes/).
- [Frequently Asked Questions](https://diffsync.readthedocs.io/user/faq/).
- [User Guide](https://diffsync.readthedocs.io/en/latest/user/app_overview/) - Overview, Using the Library, Getting Started.
- [Administrator Guide](https://diffsync.readthedocs.io/en/latest/admin/install/) - How to Install, Configure, Upgrade, or Uninstall the Library.
- [Developer Guide](https://diffsync.readthedocs.io/en/latest/dev/contributing/) - Extending the Library, Code Reference, Contribution Guide.
- [Release Notes / Changelog](https://diffsync.readthedocs.io/en/latest/admin/release_notes/).
- [Frequently Asked Questions](https://diffsync.readthedocs.io/en/latest/user/faq/).

## Installation

Expand Down
1 change: 1 addition & 0 deletions changes/+main.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebaked from the cookie `main`.
4 changes: 4 additions & 0 deletions docs/admin/release_notes/version_1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This document describes all new features and changes in the release. The format

Initial release of DiffSync.

<<<<<<< HEAD
## [v1.0.0] - 2020-10-23
=======
## [v1.0.0] - 2026-03-24
>>>>>>> 9cf5def (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)

Initial release
29 changes: 23 additions & 6 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def is_truthy(arg):
"python_ver": "3.10",
"local": is_truthy(os.getenv("INVOKE_DIFFSYNC_LOCAL", "false")),
"image_name": "diffsync",
"image_ver": os.getenv("INVOKE_PARSER_IMAGE_VER", "latest"),
"image_ver": os.getenv("INVOKE_DIFFSYNC_IMAGE_VER", "latest"),
"pwd": Path(__file__).parent,
}
}
Expand All @@ -66,13 +66,14 @@ def task_wrapper(function=None):
return task_wrapper


def run_command(context, exec_cmd, port=None):
def run_command(context, exec_cmd, port=None, rm=True):
"""Wrapper to run the invoke task commands.

Args:
context ([invoke.task]): Invoke task object.
exec_cmd ([str]): Command to run.
port (int): Used to serve local docs.
rm (bool): Whether to remove the container after running the command.

Returns:
result (obj): Contains Invoke result from running task.
Expand All @@ -86,12 +87,12 @@ def run_command(context, exec_cmd, port=None):
)
if port:
result = context.run(
f"docker run -it -p {port} -v {context.diffsync.pwd}:/local {context.diffsync.image_name}:{context.diffsync.image_ver} sh -c '{exec_cmd}'",
f"docker run -it {'--rm' if rm else ''} -p {port} -v {context.diffsync.pwd}:/local {context.diffsync.image_name}:{context.diffsync.image_ver} sh -c '{exec_cmd}'",
pty=True,
)
else:
result = context.run(
f"docker run -it -v {context.diffsync.pwd}:/local {context.diffsync.image_name}:{context.diffsync.image_ver} sh -c '{exec_cmd}'",
f"docker run -it {'--rm' if rm else ''} -v {context.diffsync.pwd}:/local {context.diffsync.image_name}:{context.diffsync.image_ver} sh -c '{exec_cmd}'",
pty=True,
)

Expand Down Expand Up @@ -169,12 +170,28 @@ def coverage(context):
run_command(context, "coverage html")


@task
def pytest(context):
@task(
help={
"pattern": "Only run tests which match the given substring. Can be used multiple times.",
"label": "Module path to run (e.g., tests/unit/test_foo.py). Can be used multiple times.",
},
iterable=["pattern", "label"],
)
def pytest(context, pattern=None, label=None):
"""Run pytest test cases."""
exec_cmd = "pytest -vv --doctest-modules diffsync/ && coverage run --source=diffsync -m pytest && coverage report"
run_command(context, exec_cmd)

doc_test_cmd = "pytest -vv --doctest-modules diffsync/"
pytest_cmd = "coverage run --source=diffsync -m pytest"
if pattern:
pytest_cmd += "".join([f" -k {_pattern}" for _pattern in pattern])
if label:
pytest_cmd += "".join([f" {_label}" for _label in label])
coverage_cmd = "coverage report"
exec_cmd = " && ".join([doc_test_cmd, pytest_cmd, coverage_cmd])
run_command(context, exec_cmd)


@task(aliases=("a",))
def autoformat(context):
Expand Down
Loading