Skip to content

Commit

Permalink
Merge pull request #21 from mikejgray/CHORE_ChangeImport
Browse files Browse the repository at this point in the history
chore: change import to support OVOS 0.1.0 libraries
  • Loading branch information
mikejgray authored Mar 1, 2024
2 parents 024d18f + 0350080 commit 20b8515
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
13 changes: 9 additions & 4 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/files/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ovos_utils import classproperty
from ovos_utils.intents import IntentBuilder
from ovos_utils.process_utils import RuntimeRequirements
from ovos_workshop.intents import IntentBuilder
from ovos_workshop.decorators import intent_handler
# from ovos_workshop.intents import IntentHandler # Uncomment to use Adapt intents
from ovos_workshop.skills import OVOSSkill
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ export class OVOSSkillProject extends GitHubProject {
let existingSkillFileContents = readFileSync(file).toString();
let ovosImports = `# TODO: Remove unused OVOS imports
from ovos_workshop.decorators import intent_handler
from ovos_workshop.intents import IntentBuilder
from ovos_workshop.skills import OVOSSkill
from ovos_utils.intents import IntentBuilder
from ovos_bus_client.message import Message`;
// Replacements
if (existingSkillFileContents.includes('AdaptIntent')) {
ovosImports += '\nfrom ovos_utils.intents import AdaptIntent';
ovosImports += '\nfrom ovos_workshop.intents import AdaptIntent';
}
let skillFileArray = existingSkillFileContents.split('\n');
skillFileArray.forEach((line, index) => {
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/OVOSSkillProject.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 20b8515

Please sign in to comment.