Skip to content

Commit

Permalink
feat(Improve the underlying business directory): Improve the underlyi…
Browse files Browse the repository at this point in the history
…ng business directory

Add { doc | feat | perf | dev } mods
  • Loading branch information
HsiangNianian committed Jul 15, 2024
1 parent 0381211 commit fae8d22
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"restructuredtext.preview.name": "sphinx",
"iis.configDir": "",
"livePreview.defaultPreviewPath": "/docs/_build/html/index.html"
"livePreview.defaultPreviewPath": "/docs/_build/html/index.html",
"Lua.diagnostics.disable": [
"doc-field-no-class"
]
}
4 changes: 4 additions & 0 deletions docs/_static/.$Structures.svg.dtmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file with editors other than draw.io -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1px" height="1px" viewBox="-0.5 -0.5 1 1" content="&lt;mxfile host=&quot;Electron&quot; modified=&quot;2024-07-09T00:44:12.773Z&quot; agent=&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.6.1 Chrome/124.0.6367.207 Electron/30.0.6 Safari/537.36&quot; etag=&quot;tdeie8-FcdftL1S-8IuH&quot; version=&quot;24.6.1&quot; type=&quot;device&quot; pages=&quot;2&quot;&gt;&#10; &lt;diagram id=&quot;prtHgNgQTEPvFCAcTncT&quot; name=&quot;Page-1&quot;&gt;&#10; &lt;mxGraphModel dx=&quot;1036&quot; dy=&quot;635&quot; grid=&quot;1&quot; gridSize=&quot;10&quot; guides=&quot;1&quot; tooltips=&quot;1&quot; connect=&quot;1&quot; arrows=&quot;1&quot; fold=&quot;1&quot; page=&quot;1&quot; pageScale=&quot;1&quot; pageWidth=&quot;827&quot; pageHeight=&quot;1169&quot; math=&quot;0&quot; shadow=&quot;0&quot;&gt;&#10; &lt;root&gt;&#10; &lt;mxCell id=&quot;0&quot; /&gt;&#10; &lt;mxCell id=&quot;1&quot; parent=&quot;0&quot; /&gt;&#10; &lt;/root&gt;&#10; &lt;/mxGraphModel&gt;&#10; &lt;/diagram&gt;&#10; &lt;diagram name=&quot;Page-1 的副本&quot; id=&quot;QUBPRxTMLXw4AuhHwJvm&quot;&gt;&#10; &lt;mxGraphModel dx=&quot;840&quot; dy=&quot;519&quot; grid=&quot;1&quot; gridSize=&quot;10&quot; guides=&quot;1&quot; tooltips=&quot;1&quot; connect=&quot;1&quot; arrows=&quot;1&quot; fold=&quot;1&quot; page=&quot;1&quot; pageScale=&quot;1&quot; pageWidth=&quot;827&quot; pageHeight=&quot;1169&quot; math=&quot;0&quot; shadow=&quot;0&quot;&gt;&#10; &lt;root&gt;&#10; &lt;mxCell id=&quot;tazqR-jlQMPDV_MZ-rYC-0&quot; /&gt;&#10; &lt;mxCell id=&quot;tazqR-jlQMPDV_MZ-rYC-1&quot; parent=&quot;tazqR-jlQMPDV_MZ-rYC-0&quot; /&gt;&#10; &lt;mxCell id=&quot;VPFQTBCB0J-yRa51enEa-0&quot; value=&quot;&quot; style=&quot;rounded=0;whiteSpace=wrap;html=1;&quot; vertex=&quot;1&quot; parent=&quot;tazqR-jlQMPDV_MZ-rYC-1&quot;&gt;&#10; &lt;mxGeometry x=&quot;60&quot; y=&quot;560&quot; width=&quot;650&quot; height=&quot;400&quot; as=&quot;geometry&quot; /&gt;&#10; &lt;/mxCell&gt;&#10; &lt;mxCell id=&quot;VPFQTBCB0J-yRa51enEa-3&quot; value=&quot;&quot; style=&quot;shape=internalStorage;whiteSpace=wrap;html=1;backgroundOutline=1;&quot; vertex=&quot;1&quot; parent=&quot;tazqR-jlQMPDV_MZ-rYC-1&quot;&gt;&#10; &lt;mxGeometry x=&quot;80&quot; y=&quot;580&quot; width=&quot;80&quot; height=&quot;80&quot; as=&quot;geometry&quot; /&gt;&#10; &lt;/mxCell&gt;&#10; &lt;/root&gt;&#10; &lt;/mxGraphModel&gt;&#10; &lt;/diagram&gt;&#10;&lt;/mxfile&gt;&#10;"><defs/><g><g data-cell-id="0"><g data-cell-id="1"/></g></g></svg>
Binary file added docs/_static/hrc_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions examples/rules/BRP/__init__.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions examples/rules/COC7/__init__.py → examples/rules/COC/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class COC7(Rule):
attr: Attributes = Depends() # CharacterCard.Attribute
wiki: Wiki = Depends() # Wiki
cmd: Command = Depends() # Command # noqa: F821

async def handle(self): ...

async def rule(self): ...

@core.event_postprocessor_hook
async def auto_card(self):
Expand Down Expand Up @@ -50,3 +54,9 @@ async def overview_card(self):
+ " DEX"
+ str(self.pc.get("DEX", "?"))
)


class COC6(Rule):
async def handle(self): ...

async def rule(self): ...
6 changes: 6 additions & 0 deletions hrc/rule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ async def rule(self) -> bool:
It is not recommended to implement event processing directly in this method. Please leave the specific processing of events to the ``handle()`` method.
"""
raise NotImplementedError

@staticmethod
async def enable(): ...

@staticmethod
async def disable(): ...

@staticmethod
def aliases(names, ignore_case=False):
Expand Down
Empty file added src/dev/mod.rs
Empty file.
Empty file added src/doc/mod.rs
Empty file.
Empty file added src/feat/mod.rs
Empty file.
13 changes: 12 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
use pyo3::prelude::*;
use pyo3::wrap_pyfunction;

use dev::*;
use doc::*;
use feat::*;
use perf::*;

pub mod dev;
pub mod doc;
pub mod feat;
pub mod perf;

#[pyfunction]
fn process_rule_pack(rule_pack: &str) -> PyResult<String> {
// 处理规则包的逻辑
Expand All @@ -12,5 +22,6 @@ fn process_rule_pack(rule_pack: &str) -> PyResult<String> {
#[pyo3(name = "LibCore")]
fn libcore(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(process_rule_pack, m)?)?;
perf::Asparagus;
Ok(())
}
}
1 change: 1 addition & 0 deletions src/perf/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub struct Asparagus {}

0 comments on commit fae8d22

Please sign in to comment.