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 dashboard #116

Merged
merged 3 commits into from
Aug 21, 2024
Merged

Fix dashboard #116

merged 3 commits into from
Aug 21, 2024

Conversation

javierggt
Copy link
Collaborator

@javierggt javierggt commented Aug 20, 2024

Description

The package dashboard generation currently fails. The error in the logs is:

jinja2.exceptions.UndefinedError: 'environ' is undefined

I traced that to the sherpa conda recipe, which includes the following:

  version: {{ environ.get('SHERPA_TAG') }}

and

  run:
    - {{ pin_compatible('numpy') }}

This PR includes changes to handle these, and also a try/except clause to skip the package if there is another jinja error.

Interface impacts

Testing

Unit tests

  • No unit tests

Functional tests

I used this branch to manually generate the dashboard.

I also commented out line 247 to verify that the following code does not crash and produces the error message for sherpa:

In [1]: from skare3_tools import packages
   ...: pkgs = packages.get_package_list()
Failed to parse recipe for sherpa: 'pin_compatible' is undefined

@jeanconn
Copy link
Contributor

This seems reasonable to have the dashboard continue - though I wonder two things:

  1. If we should extract lines from the package meta.yaml instead of parsing the whole thing for each package
  2. How SHERPA_TAG is getting set in our current build

@javierggt
Copy link
Collaborator Author

javierggt commented Aug 21, 2024

I just took a few minutes to look into the sherpa build again. I'm not very inclined to fix it, but indeed I must have built it using a SHERPA_TAG environment variable defined.

The sherpa recipe has at least a few other issues (other than the use of the environment):

  • ska_builder.py can't be used with this recipe (as noted in its add build recipe for sherpa skare3#1349) and the reason is that it fails the same way as skare3_tools.packages before this PR.
  • the target platform is set to osx-arm64 in pkg_defs/sherpa/conda_build_config.yaml
  • the path to MacOS SDK is set to /opt/MacOSX11.0.sdk in pkg_defs/sherpa/conda_build_config.yaml. This was OK in the specific case, but in general that will change.

@jeanconn
Copy link
Contributor

OK, I copied your last comments to a new skare3 general issue just to not lose them.

@javierggt javierggt merged commit 9adfdbc into master Aug 21, 2024
2 checks passed
@javierggt javierggt deleted the fix-dashboard branch August 21, 2024 19:26
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.

2 participants