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

Transparent list of projects #493

Closed
bsekiewicz opened this issue Sep 19, 2023 · 7 comments
Closed

Transparent list of projects #493

bsekiewicz opened this issue Sep 19, 2023 · 7 comments

Comments

@bsekiewicz
Copy link
Contributor

bsekiewicz commented Sep 19, 2023

A small change increases om website.py the clarity of the available projects (especially when there are many). I'm just wondering if there is additionally an option to list the project version on the home page (or at least the latest version).

From

<p>Available projects: <b>%(projects)s</b></p>

To (more or less)

<p>Available projects:<p>
""" % vars
        if self.root.scheduler.list_projects():
            s += '<ul>'
            for x in sorted(self.root.scheduler.list_projects()):
                s += '<li>' + x + '</li>'
            s += '</ul>'
        else:
            s += '<b>no projects</b>'
        s += """

https://github.com/bsekiewicz/scrapyd/blob/e59ba9b318464c948f21ef7c1eece8c8de860a08/scrapyd/website.py#L93-L102

@jpmckinney
Copy link
Contributor

Sure, we can change it to a list. Can you prepare the pull request?

@bsekiewicz
Copy link
Contributor Author

It is a simple suggestion that I use because I have a problem with many projects. For discussion, a possible list of versions or the latest version.

<p>Available projects:<p>
""" % vars
        if self.root.scheduler.list_projects():
            s += '<ul>'
            for project in sorted(self.root.scheduler.list_projects()):
                s += '<li>' + project + '</li>'
                s += '<ul>'
                for version in sorted(self.root.eggstorage.list(project)):
                    s += '<li>' + version + '</li>'
                s += '</ul>'
            s += '</ul>'
        else:
            s += '<b>no projects</b>'
        s += """

or

<p>Available projects:<p>
""" % vars
        if self.root.scheduler.list_projects():
            s += '<ul>'
            for project in sorted(self.root.scheduler.list_projects()):
                s += '<li>' + project + ' (' + sorted(self.root.eggstorage.list(project))[-1] + ')</li>'
            s += '</ul>'
        else:
            s += '<b>no projects</b>'
        s += """

@bsekiewicz
Copy link
Contributor Author

bsekiewicz commented Sep 25, 2023

@jpmckinney Ahh. I didn't think about the tests.

jpmckinney added a commit that referenced this issue Sep 25, 2023
transparent list of projects #493
@jpmckinney
Copy link
Contributor

I think listing all versions might be too much. For example, I have 73 versions in my current project.

I'm not sure if the latest version is necessary, since all relevant API endpoints assume the latest version if not provided.

@bsekiewicz
Copy link
Contributor Author

@jpmckinney understanding.

In the case of continuous integration, I want to ensure that the latest version is uploaded to the service. On the other hand, the most important thing for me is for the script to run on a given version, so adding a column with the version to the table in the /jobs location would be more necessary. You may not have such problems, but such a feature is personally helpful to me on Zyte.

Unfortunately, here it's a bit more work, so for now, I won't delve :)

Thanks

@jpmckinney
Copy link
Contributor

jpmckinney commented Sep 26, 2023

In the case of continuous integration, I want to ensure that the latest version is uploaded to the service.

@bsekiewicz Do you need to do that check manually, or can it be automated to use the API?

@bsekiewicz
Copy link
Contributor Author

@jpmckinney True, I can check it with a simple curl in the pipeline. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants