Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs deployment #384

Closed
wants to merge 11 commits into from
Closed

Fix docs deployment #384

wants to merge 11 commits into from

Conversation

loonghao
Copy link
Owner

No description provided.

Signed-off-by: longhao <hal.long@outlook.com>
Signed-off-by: longhao <hal.long@outlook.com>
Signed-off-by: longhao <hal.long@outlook.com>
@loonghao loonghao force-pushed the fix-docs-deployment branch 2 times, most recently from baa862b to d80cc14 Compare December 29, 2024 04:04
…nd testing

Signed-off-by: longhao <hal.long@outlook.com>
@loonghao loonghao force-pushed the fix-docs-deployment branch from d80cc14 to ef9c832 Compare December 29, 2024 04:09
Signed-off-by: longhao <hal.long@outlook.com>
…stency

Update type hints and docstrings across various modules to improve code readability and maintainability.

Signed-off-by: longhao <hal.long@outlook.com>
…n, and testing

Added new workflows for code quality check, documentation build and deployment, and removed redundant workflows for import test, publish docs, python package, test docs, and tests.

Signed-off-by: longhao <hal.long@outlook.com>
… and CI/CD

Update pre-commit hooks to use ruff for code linting and add new nox sessions for ruff, build, and release.

Signed-off-by: longhao <hal.long@outlook.com>
Signed-off-by: longhao <hal.long@outlook.com>
@nox.session(name="docs-build")
def docs_build(session: Session) -> None:
"""Build the documentation."""
args = session.posargs or ["docs", "build"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local variable 'args' is assigned to but never used

@@ -297,6 +300,15 @@ def active_document(self):
except errors.PhotoshopPythonAPICOMError:
raise errors.PhotoshopPythonAPIError("No active document available.")

def set_active_document(self, doc):
"""Set active document.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

Update .gitignore to include new example files directories and update dependencies with Poetry 1.8.5.

Signed-off-by: longhao <hal.long@outlook.com>
@loonghao loonghao force-pushed the fix-docs-deployment branch from 4c34988 to 3dd89ae Compare December 29, 2024 08:02
# Create a reference for the Crystallize filter
ref1 = ref()
ref1.putClass(eventCrystallizeID)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

def applyCrystallize(cellSize):
def applyCrystallize(cellSize: int) -> None:
"""Apply the Crystallize filter to the active layer.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

… classes

Signed-off-by: longhao <hal.long@outlook.com>
new_layer = docRef.artLayers.add()
ps.echo(new_layer.name)
new_layer.name = "test"
if __name__ == "__main__":
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected 2 blank lines after class or function definition, found 1


# Import local modules
from photoshop import Session

def main():
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected 2 blank lines, found 1

// Create a descriptor for the Crystallize filter
var desc = new ActionDescriptor();
desc.putReference(charIDToTypeID("null"), ref);

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

var ref = new ActionReference();
ref.putProperty(charIDToTypeID("Prpr"), charIDToTypeID("Lefx"));
ref.putEnumerated(charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

// Get the active document and layer
var doc = app.activeDocument;
var layer = doc.activeLayer;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

doc_ref.selection.select(sel_area2, SelectionType.ReplaceSelection, 0, False)
target_art_layer.applyAddNoise(15.0, NoiseDistribution.GaussianNoise, True)
ps.echo("Applied Add Noise")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

doc_ref.selection.select(sel_area1, SelectionType.ReplaceSelection, 0, False)
target_art_layer.applyGaussianBlur(2.5)
ps.echo("Applied Gaussian Blur")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

sel_area2 = ((120, 20), (210, 20), (210, 110), (120, 110))
sel_area3 = ((220, 20), (310, 20), (310, 110), (220, 110))
sel_area4 = ((0, 120), (100, 120), (100, 210), (0, 210))

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

# Set the active layer
doc_ref.activeLayer = target_art_layer
ps.echo(f"Current active layer: {target_art_layer.name}")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace


if target_art_layer is None:
raise Exception("No art layers found in any layer set")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

@loonghao loonghao closed this Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant