Giter Club home page Giter Club logo

pyladies / pyladies Goto Github PK

View Code? Open in Web Editor NEW
421.0 65.0 400.0 48.38 MB

PyLadies is a global mentorship group focused on helping more marginalized genders become active participants & leads in the Python open-source community.

Home Page: http://www.pyladies.com

License: MIT License

CSS 10.14% HTML 23.41% Ruby 0.35% JavaScript 56.88% PHP 0.17% Shell 0.57% Python 0.04% Sass 3.71% SCSS 4.73%
python women pyladies-website diversity-in-tech marginalized-genders diversity-inclusion-in-tech

pyladies's Introduction

PyLadies

This website is managed by the PyLadies Tech and Infra team. If you would like to join as an official member, read more here! You can also join us in Slack, #project-tech-infra channel.

This website welcomes pull requests from anyone in the community.

Overview

Netlify Status

This is the source code for the http://pyladies.com/ website. It uses mynt, a static site generator, and is powered by 🐍 Python 3.10 🐍!

Contents

Understanding the repo's directory layout

Before adding a new location or contributing to the pyladies website, it's helpful to understand a bit about the repo and its contents.

This is a general overview of the repo's root directory structure. requirements.txt specifies the dependencies. .github/workflows contains the configuration for CI testing and deployment. The repo's root directory also contains the www folder. Most of the time, contributors will edit or add files in the www folder.

requirements.txt   # file with dependencies used by pip
netlify.toml       # file setting up netlify build commands
www                # directory which contains the content of the website
β”œβ”€β”€ CodeOfConduct
β”œβ”€β”€ _assets        # javascript, CSS stuff, and images go here
β”œβ”€β”€ _posts         # contains blog posts written in markdown
β”œβ”€β”€ _templates     # contains the base templates (html and Jinja2) used by the site
β”œβ”€β”€ about
β”œβ”€β”€ archives
β”œβ”€β”€ blog
β”œβ”€β”€ locations      # Use the config.yml file to add new locations or update location info
β”œβ”€β”€ resources
└── sponsor

Setting Up a Development System

If you wish to add a location, new chapter, or make code changes, please review the next few sections. There are a few tasks to set up a development system:

Set up Python and a project directory

Linux, macOS

  1. Check that Python 3.10 is installed with python --version. If it is not installed, it can be downloaded at https://python.org:

    $ python --version
    Python 3.10
  2. (Optional) Learn the directory which this Python version is installed which python:

    $ which python
    /usr/local/bin/python

    You may see a different directory name which is fine.

  3. Create a directory for development mkdir pyladies-dev:

    $ mkdir pyladies-dev
  4. Change into the directory cd pyladies-dev:

    $ cd pyladies-dev
    
    # To check your current directory (`<YOUR_PATH>` will be different on
    # your system.)
    $ pwd
    YOUR_PATH/pyladies-dev

Great!

Windows

The process will be similar though the commands will vary slightly. Reference: Table of basic Powershell commands.

Create and activate a virtual environment

  1. From the pyladies-dev directory, install the virtualenv package:

    $ pip install virtualenv
  2. Create a virtual environment named pyladyenv:

    $ virtualenv pyladyenv
  3. Activate the virtual environment:

    $ source pyladyenv/bin/activate
    
    (pyladyenv)
    $

    After activation, you should see (pyladyenv) above your command prompt.

Troubleshooting note (AttributeError: 'module' object has no attribute 'X509_up_ref'): The error comes from PyOpenSSL. Either your OpenSSL is too old or too new. Try upgrading or downgrading OpenSSL and PyOpenSSL.

Fork and clone your pyladies repo

  1. On GitHub, fork http://github.com/pyladies/pyladies to your own GitHub account <YOUR_GITHUB_USER_NAME> by pressing the green Fork button on the upper right of the screen.
  2. From the pyladies-dev directory, clone your fork to your machine using git clone:
(pyladyenv)
$ git clone https://github.com/<YOUR_GITHUB_USER_NAME>/pyladies.git
Cloning into 'pyladies'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 5877 (delta 22), reused 38 (delta 16), pack-reused 5830
Receiving objects: 100% (5877/5877), 39.73 MiB | 3.62 MiB/s, done.
Resolving deltas: 100% (2922/2922), done.

You have successfully cloned your pyladies fork. πŸ˜„

Run the site locally

Troubleshooting note for some operating systems: Make sure you have headers for Python and libevent installed (e.g., on Ubuntu, python-dev and libevent-dev). Packages in requirements.txt are required for the website to build successfully with mynt.

  1. Change to the root of the pyladies repo (your virual environment should still be activated):

    (pyladyenv)
    $ cd pyladies
  2. Install dependencies using pip:

    (pyladyenv)
    $ pip install -r requirements.txt
    
    # You will see files being installed and this message at completion
    # It's okay if the versions differ slightly
    Successfully built hoep MarkupSafe mynt pathtools pycparser PyYAML watchdog
    Installing collected packages: argh, asn1crypto, six, pycparser, cffi, bcrypt, idna, enum34, ipaddress, cryptography, docutils, pyasn1, PyNaCl, paramiko, Fabric, hoep, MarkupSafe, Jinja2, Pygments, PyYAML, pathtools, watchdog, mynt
    Successfully installed Fabric-1.13.1 Jinja2-2.9.6 MarkupSafe-1.0 PyNaCl-1.1.2 PyYAML-3.12 Pygments-2.2.0 argh-0.26.2 asn1crypto-0.22.0 bcrypt-3.1.3 cffi-1.10.0 cryptography-2.0.3 docutils-0.14 enum34-1.1.6 hoep-1.0.2 idna-2.6 ipaddress-1.0.18 mynt-0.3.1 paramiko-2.2.1 pathtools-0.1.2 pyasn1-0.3.2 pycparser-2.18 six-1.10.0 watchdog-0.8.3
  3. Navigate into the pyladies/www directory.

    (pyladyenv)
    $ cd www
  4. Use mynt to generate and serve the website locally with mynt gen -f _site && mynt serve _site:

    (pyladyenv)
    $ mynt gen -f _site && mynt serve _site
    >> Parsing
    >> Rendering
    >> Generating
    Completed in 1.114s
    >> Serving at 127.0.0.1:8080
    Press ctrl+c to stop.
  5. Copy the IP address provided once mynt has completed building the site. It will say something like >> Serving at 127.0.0.1:8080. Then paste the IP address into the URL bar of a browser window and load it to view the site.

Congrats on running the site on your machine πŸŽ‰ 🐍

  1. (Optional: After making changes to the source code) To view any changes you make to the site code, type ctrl+c in the terminal to stop the local webserver. Then run the command from Step 5 again and refresh the browser window.

Note: It is important that when you create your virtualenv, do not create it in the same folder as the code you downloaded. The reason is that mynt will search the current directory for files to build and it looks for all folders that don't start with an underscore (which means it will find your virtualenv folder and error out).

To add a new PyLadies location to the PyLadies Website

Follow the instructions for setting up a development environment.

To add or edit a location, you will make changes to the config.yaml file found in the pyladies\www\locations directory.

YAML files are often used for configuration information. They can be fussy about spacing, indentations, and punctuation. It can be helpful when troubleshooting to use an online YAML validator to see if the file is correctly formatted. An example is YAML Lint though there are many others and some editors provide similar functionality.

An example of a location:

- email: [email protected]
  external_website: true
  image: pyladies_berlin.png
  location:
    latitude: 52.52
    longitude: 13.38
  meetup: PyLadies-Berlin
  meetup_id: 4663512976
  meetup_image: https://secure.meetupstatic.com/photos/event/6/b/8/6/highres_454587526.jpeg
  name: Berlin, Germany
  organizer: Anett G.
  pro_network: Python Software Foundation Meetup Pro Network
  twitter: PyLadiesBer
  website: http://berlin.pyladies.com

Please note: if you wish to use the website field, you need to create an official website through the PyLadies Chapter Website repository. Otherwise you can skip that field.

For Unicode accents in some languages To use a Unicode accent in a YAML file, it's important to use the HTML entity character for the accent. The HTML entity can found be found in a table of characters.

For example, MΓ©xico will have the HTML entity M&eacute;xico.

To write a blog post

See CONTRIBUTING.md for instructions and guidelines.

To contribute to the repository

See CONTRIBUTING.md for instructions and guidelines.

To write a resource (more "sticky" than a blog post)

Collection of outside resources

If you want to add a bullet item to an existing subject matter, find the relevant post in www/_posts (file titled by its general category) and add to the .md file. Please also update the date in the .md file. For instance, if you want to add another suggestion to text editors, the original file is: www/_posts/2013-04-19-tools-resources.md, and once you're done editing, it would be renamed to www/_post/todays-date-tools-resources.md.

If there is a collection of resources that do not fit into our loosely-named categories, like "tools" or "tutorials", etc, then start your own in www/_posts/ and name the Markdown file with today's date, general category, plus the word "resources", like: 2013-04-21-developer-tips-resources.md. You will also need to have the following at the top:

---
layout: post.html
title: "Your title here"
tags: [list, of relevant, tags]
category: resources
---

Your own resource

If you want to write your own resources, like Barbara's beginner workshop notes or Juliana's Mac setup, in addition to CONTRIBUTING.md, you will need to add more items in the header portion, like so:

---
layout: post.html
title: "Your title here"
tags: [list, of relevant, tags]
author: Name, or blank/none
author_link: Twitter/Blog/etc or blank/none
category: resources, pyladies
---

Notice that pyladies and resources are required in for category.

Once done, save it in www/_posts/ with the date and title in the name of the file, like so: 2013-04-21-lynns-awesome-resource.md.

To find this resource online, you would navigate to http://pyladies.com/blog/[your_post_name]

For Organizers

Registering your PyLadies Chapter and onbtaining a website

Once you have obtained an official PyLadies Google account you should:

  1. Register your PyLadies Chapter to the Chapter Directory as active, we use this to populate the chapter options for members when registering as well as populate the PyLadies chapter map.
  2. Get started on building your PyLadies website, read the directions on the PyLadies Chapter Website repo.

Questions? Make sure to join us in Slack at slackin.pyladies.com and ask to join the #organizers channel!

LICENSE

License: MIT License

pyladies's People

Contributors

anjaniacatus avatar audreyfeldroy avatar azkarmoulana avatar bloodevil avatar brisbanepyladies avatar celeen avatar dependabot[bot] avatar econchick avatar ellisonleao avatar estherbester avatar florapdx avatar katychuang avatar kinitrupti avatar lorenanicole avatar maraujop avatar mariatta avatar marinadaniankova avatar mechanicalgirl avatar mei-li avatar mutterberg avatar neetuj avatar pyladiesdoboj avatar reshamas avatar sarasafavi avatar shrreya avatar thursdayb avatar uncamy avatar williln avatar willingc avatar xtine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyladies's Issues

Some of the social icons on are not rendering

I have no idea why :( - particularly, the Twitter and Google + (as far as I can see) are not rendering. However I don't think it's all social since the GitHub one shows up just fine in the footer.

Double check Location info

In www/config.yml, chapter info may not be correct. There are in fact a handful of incorrect Meetup IDs. I'd like to:

  1. Double check meetup IDs
  2. Add locations that are missing (cross reference a list that I have)
  3. Double check other links to other media, etc for correctness
  4. For "retired" or "inactive" locations, create a new item in the config.yml file named inactive_chapters with all the same info as chapters:
chapters:
    - foo
    - bar
inactive_chapters:
    - baz

Dropdown menu in navigation?

I think it might be a good idea to implement dropdown menus to clean up the Navigation. For instance, maybe under "About" we have "Locations", "CoC", etc.

End goal: I want to put up more pages like "Donations", "Sponsorships", etc, and I don't want to crowd the navigation.

Virtualenv instructions in README.md

I wanted to add a link to our Bangalore mailing list to the locations page, and came across this line in the Readme.md file "It is important that when you create your virtualenv, do not create it in the same folder as the code you downloaded."

That line was confusing as I already have a virtualenv where I create a separate directory/folder for each project (depending on 2.x or 3.x) and then clone the repo with git. So, the order gets reversed as: 3.Create a virtualenv called PyLadies, and then, 2.Clone to your machine.
However, the Readme instructions seem to suggest otherwise

new layout/design

Alright, this is what I came up with. Keep in mind that I am not a designer, and that for some reason my screenshot app doesn't want to pick up the footer or the meetup widget photos, plus a couple of other odds and ends. Anyway, you'll get the rough idea. Three representative pages.
homepage

locations

resources

Suggested CSS improvement for remote.pyladies.com

I saw the new remote site. Really cool idea!

I noticed the page content was a little wide on my widescreen laptop. You can use the container Bootstrap class to keep stuff inside it centered in an appropriately-sized grid for each browser resolution (automatically scales for mobile too). I think using the container CSS class in 3 places on the website will make it more readable on higher resolution monitors.

First two suggestions: change class="indented-text" to class="container" on the Resources and Events pages. The screenshots below show what that change would look like.

The third place you could make this change is on the homepage. If you put the div with id="organizers" inside a div with id="container" it'll fix the same issue on the homepage:

<div class="container">
  <div id="organizers" class="row">
    ...
  </div>
</div>

Before

selection_443
selection_445
selection_447

After

selection_444
selection_446
selection_448

😸

Remove hard-coding of meetup IDs

Currently, our meetup widget done by @florapdx picks up hard-coded Meetup IDs for each chapter that has a meetup page within www/_templates/site.html. This should be abstracted away to a config/JSON file that the Meetup script can pick up. This could potentially live in the project's www/config.yml file.

Vagrant setup for dev?

Hello! Since there are special requirements for setting up a devenv, would it make sense to have a Vagrantfile that people could use to bootstrap a developer environment? If so, I'm happy to make one.

Convert "locations" page to map w/ pins

I currently don't like the layout of the locations page. I think it'd be a nice representation to have a dynamic map (maybe like d3) with pins on the location. Once a user clicks on a pin, detail comes up that's similar to what is shown now, e.g. local logo, meetup link, twitter link, email, etc.

Upcoming events meetup widget and input request

Hi all! I wrote a javascript widget that pulls in the next month's worth of events from all chapters who have meetup.com pages, along with a little html wrapper that allows for scrolling of the list (in other words, so it can sit in a sidebar somewhere).

Looking for guidance on three things:
--where this little guy might go (home page?)
--what dimensions it should be (might need to create a sidebar layout for it's home page)
--whether anyone cares that it's running client-side in JSc (with api key) rather than server-side with OAuth. I'm willing to redo server-side if there's a strong opinion that way.

basic image of local test attached--not attached to design elements at all, btwmeetup_widget

Blog post!

I'm going to add a blog post about my GNOME OPW internship project.

Make site flex-width/mobile-friendly

Currently when you resize the page, the navigation bar awkwardly resizes:
2015-04-13 at 7 31 am

Maybe we also need to collapse the navbar into fewer items (and maybe replace the logo with the smal geek girl.

It also isn't mobile friendly - navbar should collapse into the "hamburger" icon.

Cleaning up website

Ideas:

  • carousel of photos from local groups above the fold
  • move down "signup for newsletter"
  • remove/retire "forum" which points to discuss.pyladies.com
  • replace "forum" with contact info landing page
  • for "Resources", have the "list view" actually show a landing page of links to resources (see: @cwilling's CPython groovy landing page)
  • new color scheme: light blue/navy (perhaps adapt with the bootstrap theme)
  • pyladies geek as a favicon instead of the python logo

What else? add comments!

Link Archives to Home Page

There is some good stuff in the PyLadies Archive http://www.pyladies.com/archives/
I stumbled across this when I was looking for old resources on CFPs and speaking at PyCon.

I would be great to make the archive more prominent even if it is a teaser box with a blast from the past link to old posts. A simple link or menu item works too ;)

Remove compiled files from git checkout.

Its terribly confusing to have multiple versions of a file in the repository.

I would suggest to change wsgi.py to first compile the code, then serve the static files. This could be done if someone sufficiently familiar with mynt (or motivated to learn) would figure out how to compile a directory of templates programmatically.

Thoughts?

Should we move away from mynt?

Mynt is causing issues because:

  1. Not complete documentation
  2. Unhelpful error messages
  3. Not as big of a community behind it for support

Look into (not a complete list)

  • pelican
  • nikola
  • frozen flask

excerpts not handling headers/images/italic well

post.excerpt gives you the first paragraph of a post, which can be an image or "None" if it's a header or italic ("*"). An upstream solution might take a while (discussion).

This issue breaks the style on the homepage and on /blog/

I suggest that posts are modified to have a text paragraph as the first item. The affected /www/_posts/ files and suggested edits are:

  • 2014-03-03-opw.md - move the image below the first paragraph
  • 2013-04-04-computer-science-outreach-magic.md - replace "*" with parenthesis or move the paragraph to the bottom of the post
  • 2014-03-27-pyladies-events-at-pycon2014.md - remove the first line (and the line full of "===" under it as well - this h1 line is not being rendered in the blog post anyway, not sure if bug or not)
  • 2014-09-14-community-workshop-resources.md - move the first #### header under the first text paragraph

I wanted to make a pull request but I already created one ( #129 ) and my git-fu is not strong enough to know how to, without conflict with my previous one.

new chapters

Hi guys,

I've grabbed all of the info on the new chapters--Vienna, Montreal, and Nashville--to add to the locations page and Twitter and Meetup widgets. Will submit pull request in a few minutes.

Switch Default font

Lots of complaints that Quicksilver renders poorly on Firefox and Chrome.

Issues generating site

In trying to check requirements.txt for any dependency orphans, I came across a bug where I wasn't able to generate the site.

Steps to Reproduce (all of these are on MacOSX Yosemite):

  1. Clone pyladies repo
  2. Create virtualenv
  3. pip install mynt==0.2.2
  4. cd www && mynt gen _site

Error:

>> Parsing
>> Processing
>> Rendering
!! Template not found.
..  post.html in post 'A PyLadies-packed PyCon 2015'

template not found

I get this:

$ mynt gen -f _site
>> Parsing
>> Processing
>> Rendering
!! Template not found.
..  post.html in post 'Donate to PyLadies @ PyCon 2015!'

Create usage policy for the logo/name

Per the PSF Board, we need to create/write/adopt a usage policy for the PyLadies name/logo. We can use the PSF's policy, or create our own (perhaps with inspiration or heavy influence from the PSF's policy).

Confusing repository setup

It is difficult to figure out which repository I want if I want to work on the pyladies website. Can we delete pyladies.github.com repo? At least change the description to not say "the actual pyladies.com website".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.