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 for package generation with uninstalled new packages #801

Merged
merged 1 commit into from
Jun 29, 2019

Conversation

alexcjohnson
Copy link
Collaborator

Small fix needed to get dash-component-boilerplate working for totally fresh new packages. Also simplified import_module syntax. This branch is linked to plotly/dash-component-boilerplate#75 - ideally we'll make a new release before we merge that.

Yet another reason to move js_dist and css_dist into the YAML file - then we can stop importing the package we're in the middle of creating 😅

Copy link
Contributor

@rpkyle rpkyle left a comment

Choose a reason for hiding this comment

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

💃

mod = sys.modules[project_shortname]
# make sure the module we're building is available to Python,
# even if it hasn't been installed yet
sys.path.insert(0, os.getcwd())
Copy link
Contributor

Choose a reason for hiding this comment

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

Learned something new today; hadn't used this method previously.

@rpkyle
Copy link
Contributor

rpkyle commented Jun 28, 2019

Yet another reason to move js_dist and css_dist into the YAML file - then we can stop importing the package we're in the middle of creating 😅

(on the 🚇, so have a little "extra" time)

I was chatting with @Marc-Andre-Rivet about this, and the YAML metadata migration project got me thinking about what would be (from my perspective) an ideal package generator:

  • building a new library for (current or future) backends should not require us to significantly refactor/rewrite package generating functions
  • component developers should not need to write code to build packages, just need to modify a second, backend-specific YAML file and insert elements corresponding to features to generate, based on templates
  • the system should be essentially modular and relatively easy for third-party developers to understand

Perhaps something like ...

backend: "R"
        requirements:
            DESCRIPTION: <path-to-description-file-template>
            NAMESPACE: <path-to-namespace-file-template>
            R: <path-to-component-file-template-directory>

@alexcjohnson alexcjohnson merged commit 2aca307 into master Jun 29, 2019
@alexcjohnson alexcjohnson deleted the boilerplate-1.0 branch June 29, 2019 00:31
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.

None yet

2 participants