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

WEB: Adding new pandas website #28014

Merged
merged 37 commits into from
Sep 18, 2019
Merged

WEB: Adding new pandas website #28014

merged 37 commits into from
Sep 18, 2019

Conversation

datapythonista
Copy link
Member

@datapythonista datapythonista commented Aug 19, 2019

The website can be seen here: https://datapythonista.github.io/pandas-web/

It's still pending that the designer polish the styles. And also the content can surely be improved with everybody's feedback. But I think will be useful to merge this once we iterate a bit on people's feedback, so we can start working on integrating the docs.

I'm coordinating with the devs of numpy/scipy, scikit-learn and matplotlib to see if we can reshare things implemented here. Ideally I'd like to have the pysuerga.py script in a separate repo (that's why it's not named pandas_web.py`), and also the layout and pages that can be shared (the code of conduct, the donate, the blog,...). For now I add everything here for simplicity, and will create a new project and have it as a dependency here if they are interested.

CC: @pandas-dev/pandas-core

@datapythonista datapythonista added the Web pandas website label Aug 19, 2019
@topper-123
Copy link
Contributor

Looks good. Very clean layout.

A few comments:
1: The links to the docs don't work. That's perhaps in the works?

2: Is TideShift a Sponsor of Pandas now? Then they should be on the "with the support of..." list?

3: The link to Wes McKinney's book is http://www.kqzyfj.com/click-7040302-11260198?url=http%3A%2F%2Fshop.oreilly.com%2Fproduct%2F0636920050896.do&cjsku=0636920023784. Is there a reason for going through that http://www.kqzyfj.com link and not directly to oreilly.com? Looks a bit fishy going through redirects for web shopping, IMO.

@datapythonista
Copy link
Member Author

Thanks for the review @topper-123, good feedback. I added Tidelift to the list of partners, and the docs links not working is intentional. I'm planning to add them after this is merged, and I make the docs use this same layout. Now they'd simply link to the current docs, and you'd leave the website.

Regarding Wes book, I guess that redirect was to keep track on the number of clicks. But besides looking fishy, clicking on it asks me to confirm that I accept some weird conditions, and after that it takes me to the home page of O'Reilly, not the book page (I guess that's because the 2nd edition has been released)_.

I updated the link to the direct link to the second edition, and also change the image to be the second edition front page. @wesm if you want to track clicks to the book, I think the best is to create a page in our own website that performs an automatic redirect, and track the visits with Google Analytics. Let me know if you want me to implement that.

</div>
<h4>Get the book</h4>
<p>
<a href="http://shop.oreilly.com/product/0636920050896.do">
Copy link
Member

Choose a reason for hiding this comment

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

If you want to change this to an affiliate link (so we receive ad fees), here is the one: https://amzn.to/2KI5JJw. I can donate annual proceeds from this link (probably not a lot in aggregate) to NumFOCUS

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense, thank you. Updated.

@mroeschke
Copy link
Member

From a mobile perspective, most everything rendered okay.

One consistent thing I noticed was that text was a little small for all pages:

Screenshot_20190819-181603

Also this page didn't render too well:

Screenshot_20190819-181430

Wouldn't say these are huge priorities, but keeping it on the radar.

@datapythonista
Copy link
Member Author

Thanks for the feedback @mroeschke. I'll let the designer from Indeed take care of that. The website uses bootstrap, and should be very easy to make it responsive and look perfect in mobile. But I don't know exactly how it works, so I'll let her do it.

@datapythonista datapythonista changed the title Adding new pandas website WEB: Adding new pandas website Aug 27, 2019
@datapythonista
Copy link
Member Author

Removed the carousel, and made couple of changes to reduce the size of the website files. There are couple of things I want to change to reduce the size further. After that, if there is no particular change requested, I think we should merge and continue with follow ups. This way we can work in parallel with the integration with the docs and the CI to display the dev version of the web.

The pending changes are:

  • Change Anaconda logo to a svg version (there are eps files that can be converted in https://www.anaconda.com/media-kit/)
  • Convert to jpeg and increase the compression of the files in the installation page. If anyone wants to propose changes to that page, now it's a good time, before we increase the size of the repo with unnecessary files.

@datapythonista
Copy link
Member Author

I made the web responsive (couple of things still need to be changed to look perfect in mobile, but almost there).

Also removed the "try pandas" page for now and the blog (will focus on the core here, and add those as a follow up).

The version in https://datapythonista.github.io/pandas-web/ is almost the one I'd like to get merged here, and then work from there in other PRs. Any feedback welcome.

@TomAugspurger
Copy link
Contributor

Glad to hear it.

Roughly speaking, what's the total size of the new files / assets here?

@WillAyd
Copy link
Member

WillAyd commented Sep 12, 2019 via email

Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

Is the new web/pandas/static/img/pandas.svg the same as doc/logo/pandas_logo.svg?

- [Setting up a development environment](setup.html)
- [Working with git](git.md)
- [Contributing to the documentation](docs.html)
- [Docstring guidelines](docstring_guidelines.html)
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like nested lists aren't handled properly? https://datapythonista.github.io/pandas-web/community/contributing/

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like markdown requires 4 spaces not 2, fixed

to use 4 spaces for tabs.

---
The steps below will download around 900Mb for the pandas
Copy link
Contributor

Choose a reason for hiding this comment

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

Is 900Mb accurate?

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like it's 150 Mb for the repo, and 74 for conda dependencies. Not sure why those were wrong (that part is from the worldwide sprint). Fixed

- ``vaex.from_pandas``
- ``vaex.to_pandas_df``

## Data validation
Copy link
Contributor

Choose a reason for hiding this comment

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

I think pyjanitor was recently added. May want to check for recent commits to these pages.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated, just couple of changes in the copied files.

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Sep 12, 2019 via email

@datapythonista
Copy link
Member Author

Regarding size, I think it's around 500kb, but I still want to optimize the images in the Install page (the rest is almost nothing).

The 404 for the docs are expected. The plan is to merge this and then start integrating both, so there is no perception from the user that they are built separately. There are some challenges there, but spoke with Joris at EuroSciPy, and seems doable.

@WillAyd
Copy link
Member

WillAyd commented Sep 12, 2019

There is also an issue with sizing of content on the Contributors page due to long user names. Maybe OK to just have names and link to GH site if people wanted

image

We'll need to reconcile the styles by using a single CSS file for both, but that can be done afterwards I think.

Sounds good, though I'm wondering if we should commit to one style as part of this change then. Seems like it will be more hassle in the long run if the docs and rest of the site are built with two different style templates in mind and then we try merging later

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

In addition to the inline comments, the pandas_fibonnaci image can be removed I think?

<!DOCTYPE html>
<html>
<head>
<title>pandas</title>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<title>pandas</title>
<title>pandas - Python Data Analysis Library</title>

$('[data-toggle="popover"]').popover()
})
$(function () {
// temporary functionality to test different logos
Copy link
Member

Choose a reason for hiding this comment

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

Remove this before merging?

crossorigin="anonymous"></script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
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 add a comment for what those functions are needed?

$(".navbar-brand img").attr("src", img);
$(".navbar-brand img").height(30);
});
</script>
Copy link
Member

Choose a reason for hiding this comment

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

To add to a todo list: add google analytics

year={2011}
}

## Brand and logo
Copy link
Member

Choose a reason for hiding this comment

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

Once we have a new logo, this probably deserves it's own apge

@@ -0,0 +1,31 @@
# License

Copy link
Member

Choose a reason for hiding this comment

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

For me, this doesn't add much value as separate page on the website, I would say

@jorisvandenbossche
Copy link
Member

I am trying it out locally, but the images are not working for me. Changing /static/... to static/.. in the paths (eg on the main page) seems to fix this, but not sure it is because I am doing something wrong.

Also the links in the navbar don't work locally.
Is this maybe because I am just opening the html files in the browser (as I am used to with sphinx), and I rather need to serve them on a localhost?

--

Can you add a README in the web/ directory shortly stating the purpose of that directory?

@datapythonista
Copy link
Member Author

Addressed comments.

You need to run cd build && python -m http.server to navigate the website, links and image paths are absolute, not relative. If you want to build the website to live in a directory, you need the --base-url=/directory-for-the-web.

@jorisvandenbossche
Copy link
Member

You need to run cd build && python -m http.server to navigate the website ...

Thanks! Can you add that note to the readme / command help?

<span class="navbar-toggler-icon"></span>
</button>

<a class="navbar-brand" href="{{ base_url }}/"><img alt="" src="{{ base_url }}{{ static.logo }}"/></a>
Copy link
Member

Choose a reason for hiding this comment

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

this is not working at the moment (I think static.logo is not defined right now?)

@jorisvandenbossche
Copy link
Member

Another thing: the salsalabs donate container is not working (not locally, but also not on your hosted version)

@datapythonista
Copy link
Member Author

The iframe works for me, not sure if it was a temporary problem in their side, or you've got an adblocker or something preventing it to render.

@datapythonista
Copy link
Member Author

I didn't want to include the logo, to avoid increasing the size of the repo with something will be replaced soon. I'm removing the logo from the html for now, so it doesn't show broken.

@jorisvandenbossche
Copy link
Member

I didn't want to include the logo, to avoid increasing the size of the repo with something will be replaced soon. I'm removing the logo from the html for now, so it doesn't show broken.

Linking to the logo file in the docs does not work? (and I suppose on build copying that to the build directory)

@datapythonista
Copy link
Member Author

That logo has the font in black, I could link it, but I'd have to change the header to white to look ok.

I think we still need several iterations with the website until we want to publish it to production, so I would focus on having a starting point so we can open PRs to it, and not in trying to have something final (it's far from it anyway, starting by the home page).

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
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 the same one as for the docs?

<!-- Google Analytics -->
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-27880019-2', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<!-- End Google Analytics -->

(or is there a reason the above is better? then we can update the docs ones)

Also, can this go at the bottom scripts? Or is there a good reason to load this first?

Copy link
Member Author

Choose a reason for hiding this comment

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

I copied the one from the website, didn't know the docs had a different one.

I followed Google instructions on where to place it, they say immediately after the <head> tag.

Copy link
Member

Choose a reason for hiding this comment

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

I recently update the docs one, it was on my to do list to also update the website but didn't get to that yet ... (kind of proving your point here :-))

@jorisvandenbossche
Copy link
Member

Yeah, no problem for the logo.

Sorry for more comments, but some final things on duplicated content: the new website also duplicates now the roadmap and the ecosystem pages from the docs. For those I would do the same as for the governance / contributing docs: leave that for separate PRs, as I don't think we should duplicate content here.
As you said, better to merge this quickly and iterate, so focusing on the infrastructure and not too much on those content details that might need some more discussion makes that easier.

@datapythonista
Copy link
Member Author

I think there is agreement to move the roadmap and the ecosystem here, so I'll get rid of the versions in the docs if this is now ready to be merged.

@jorisvandenbossche
Copy link
Member

I think there is agreement to move the roadmap and the ecosystem here,

Where has that been discussed? (I maybe missed some issues .. that's a problem with our huge number of issues)

@datapythonista
Copy link
Member Author

There are few issues with discussions about the website, but the most important one was in this PR.

If I also remove these pages, this PR contains literally a home page that is incomplete, and not much more. So, I start to miss the point on whether this is a step forward, or we're just wasting time implementing something there is no minimum agreement on.

I'll leave this on hold until those decisions are made, working on this for weeks, and reverting everything again doesn't seem to be a great investment of my time, and it's quite frustrating.

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Sep 17, 2019

Sorry, Marc, I didn't want to demean your efforts, and I understand your frustration as I have been very slow with feedback. Sorry for your that.

For me, there is still a clear added value of this PR: it is providing the base for working on a better home page (which is great work, as this is highly needed!). The exact items in the community dropdown are IMO not essential in the idea of a better website (although I have a strong opinion on it). It was in that light that I thought it would be easier to leave that for later. But I am also happy with merging this as is. It's just some text files that we can also further discuss after they are merged.

@WillAyd
Copy link
Member

WillAyd commented Sep 17, 2019 via email

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Sep 17, 2019 via email

@jorisvandenbossche
Copy link
Member

Yes, fine with merging as is and iterate.


To try to explain a bit more the potential reason for some of the disagreements we are having (what I also tried to say at EuroScipy regarding the doc theme / integration with the website):

I have been working on a new documentation theme, and for me, the main driver for that is because I find the navigation functionality of the current theme lacking.
But the current proposal of the website here (and the same for the current homepage) has even less navigation structure compared to the current doc theme. But to be clear, I think this is good for the main website. Because fancy overview landing pages like the home page or an about or donation page don't need much navigational structure. I see the main website mainly as this: attractive overview pages that give a good intro and overview and then further link to more detailed content (docs, github, mailing list, ...). But that also means that I personally prefer that all pages which are more heavily text-content based (like the contributing pages) stay in the documentation (sphinx) section, as there we are have the layout for handling such content.
Of course, nothing prevents us (technically) to use the same navigation structure (eg the sidebar(s)) also in the website pages. But I think this will give some duplicated content for the html layouts (the doc theme still is tailored towards sphinx), and to me it also seems a potential benefit to keep all the pages that uses this navigation in the same place (the sphinx content) while having the other content in the markdown (web) content. But for sure, this is only one option. We can also discuss and experiment with how to re-use some of the navigation structures from the doc theme also on the website.

@datapythonista
Copy link
Member Author

Thanks for clarifying your point, I didn't understand the reasoning.

The division that I used was what needs to be served from master, and what from the latest release. I think it simplifies significantly how things are built and deployed.

In any case, I think we all agree we need to build the new website in iterations. I think after merging this (I'll do it tomorrow if there are no objections), and making a first integration with the docs, will be easier to see the advantages and disadvantages of every option.

@jorisvandenbossche do you think you can have a first version (possibly minimal) of the new docs layout merged soon? So we can experiment using the same templates in both the website and the docs (I think it shouldn't be difficult, and very useful).

@datapythonista datapythonista merged commit ae71459 into pandas-dev:master Sep 18, 2019
@TomAugspurger
Copy link
Contributor

TomAugspurger commented Sep 18, 2019 via email

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

Successfully merging this pull request may close these issues.

7 participants