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

R Support [WIP] #349

Closed
wants to merge 26 commits into from
Closed

Conversation

ForgottenProgramme
Copy link
Contributor

@ForgottenProgramme ForgottenProgramme commented Jul 5, 2022

Fixes #306

Add CRAN origin to Grayskull.
These changes only aim to handle simple R recipes.
The functionality to extract compiler information from R metadata and therefore handle complex packages will be added in consequent iterations.

ToDo

  • Write unit tests
  • Extract and add License
  • cran metadata in commented form at the bottom [I am able to add it at the top. not at the bottom]
  • r prefix in package name at top
  • source: section of the recipe (urls and sha256)
  • requirements: host and requirements: build
  • Hardcode rpaths:
  • set posix and set native at top
  • Add r-base to host and run requirements everytime
  • reorder the requirements to be sorted. NOTE:
    (It is not a requirement to have the packages listed in a sorted order. But it's a nice to have, as it improves readability for users trying to look for a specific package in the list)
  • build:
  • requirements: build:
  • in source: section, the 'url' needs fixing

@ForgottenProgramme
Copy link
Contributor Author

image

@ForgottenProgramme
Copy link
Contributor Author

@marcelotrevisani

Comment on lines +146 to +148
# Due to how the metadata is rendered there can be
# significant areas of repeated newlines.
# This collapses them and also strips any trailing spaces.
Copy link
Member

Choose a reason for hiding this comment

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

All those comments that you put before the function, can you move them to be the function docstring please?


def get_cran_archive_versions(cran_url, session, package, verbose=True):
if verbose:
print(f"Fetching archived versions for package {package} from {cran_url}")
Copy link
Member

Choose a reason for hiding this comment

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

Can you use log, or can you use print_msg from grayskull.cli.stdout please?


cran_url = "https://cran.r-project.org"


Copy link
Member

Choose a reason for hiding this comment

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

can you create unit tests for those free functions in this file please?

recipe = GrayskullFactory.create_recipe(
"pypi", Configuration(name="pytest", version="5.3.2")
)
# The CRAN test is not passing. I don't understand why!
Copy link
Member

@marcelotrevisani marcelotrevisani Jul 20, 2022

Choose a reason for hiding this comment

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

you also need to change line 124 to

cli.main([index, str(recipe_path), "--sections", "requirements"])

ForgottenProgramme and others added 2 commits July 20, 2022 18:25
Co-authored-by: Marcelo Duarte Trevisani <marcelotrevisani@users.noreply.github.com>
Co-authored-by: Marcelo Duarte Trevisani <marcelotrevisani@users.noreply.github.com>
@marcelotrevisani
Copy link
Member

Closing this in favor of #423

Thank you very much for your hard work and all effort that you put into this!

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.

Initial R Support in Grayskull
3 participants