Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

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

License

NotificationsYou must be signed in to change notification settings

BethanyG/pyladies

 
 

Repository files navigation

This website is managed by thePyLadies 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 thehttp://pyladies.com/ website. It usesmynt, 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'shelpful 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 containsthe configuration for CI testing and deployment. The repo's root directory also containsthewww folder. Most of the time, contributors will edit or add files inthewww folder.

requirements.txt# file with dependencies used by pipnetlify.toml# file setting up netlify build commandswww# 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, pleasereview the next few sections. There are a few tasks to set up a developmentsystem:

Set up Python and a project directory

Linux, macOS

  1. Check that Python 3.10 is installed withpython --version. If it is notinstalled, it can be downloaded athttps://python.org:

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

    $ which python/usr/local/bin/python

    You may see a different directory name which is fine.

  3. Create a directory for developmentmkdir pyladies-dev:

    $ mkdir pyladies-dev
  4. Change into the directorycd pyladies-dev:

    $cd pyladies-dev# To check your current directory (`<YOUR_PATH>` will be different on# your system.)$pwdYOUR_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 thepyladies-dev directory, install thevirtualenv package:

    $ pip install virtualenv
  2. Create a virtual environment namedpyladyenv:

    $ 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, forkhttp://github.com/pyladies/pyladies to your own GitHub account<YOUR_GITHUB_USER_NAME> by pressing the green Fork button on the upper right ofthe screen.
  2. From thepyladies-dev directory, clone your fork to your machine usinggit clone:
(pyladyenv)$ git clone https://github.com/<YOUR_GITHUB_USER_NAME>/pyladies.gitCloning 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 5830Receiving 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 libeventinstalled (e.g., on Ubuntu,python-dev andlibevent-dev). Packages inrequirements.txt are required for the website to build successfully with mynt.

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

    (pyladyenv)$cd pyladies
  2. Install dependencies usingpip:

    (pyladyenv)$ pip install -r requirements.txt# You will see files being installed and this message at completion# It's okay if the versions differ slightlySuccessfully built hoep MarkupSafe mynt pathtools pycparser PyYAML watchdogInstalling collected packages: argh, asn1crypto, six, pycparser, cffi, bcrypt, idna, enum34, ipaddress, cryptography, docutils, pyasn1, PyNaCl, paramiko, Fabric, hoep, MarkupSafe, Jinja2, Pygments, PyYAML, pathtools, watchdog, myntSuccessfully 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 thepyladies/www directory.

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

    (pyladyenv)$ mynt gen -f _site&& mynt serve _site>> Parsing>> Rendering>> GeneratingCompletedin 1.114s>> Serving at 127.0.0.1:8080Press 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 changesyou make to the site code, type ctrl+c in the terminal to stop the localwebserver. Then run the command from Step 5 again and refresh the browserwindow.

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

To add a new PyLadies location to the PyLadies Website

Follow the instructions forsetting up a development environment.

To add or edit a location, you will make changes to theconfig.yamlfile found in thepyladies\www\locations directory.

YAML files are often used for configuration information. They can befussy about spacing, indentations, and punctuation. It can be helpfulwhen troubleshooting to use an online YAML validator to see if the fileis correctly formatted. An example isYAML Lintthough there are many others and some editors provide similar functionality.

An example of a location:

-email:berlin@pyladies.comexternal_website:trueimage:pyladies_berlin.pnglocation:latitude:52.52longitude:13.38meetup:PyLadies-Berlinmeetup_id:4663512976meetup_image:https://secure.meetupstatic.com/photos/event/6/b/8/6/highres_454587526.jpegname:Berlin, Germanyorganizer:Anett G.pro_network:Python Software Foundation Meetup Pro Networktwitter:PyLadiesBerwebsite:http://berlin.pyladies.com

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

For Unicode accents in some languagesTo use a Unicode accent in a YAML file, it's important to use theHTML entity character for the accent. TheHTML entitycan found be found ina table of characters.

For example, México will have the HTML entityM&eacute;xico.

To write a blog post

SeeCONTRIBUTING.md for instructions and guidelines.

To contribute to the repository

SeeCONTRIBUTING.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 inwww/_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 towww/_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 inwww/_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.htmltitle:"Your title here"tags:[list, of relevant, tags]category:resources---

Your own resource

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

---layout:post.htmltitle:"Your title here"tags:[list, of relevant, tags]author:Name, or blank/noneauthor_link:Twitter/Blog/etc or blank/nonecategory:resources, pyladies---

Notice thatpyladies andresources are required in forcategory.

Once done, save it inwww/_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 tohttp://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 yourPyLadies Chapter to the Chapter Directory as active, we use this to populate the chapter options formembers when registering as well as populate the PyLadies chapter map.
  2. Get started on building your PyLadies website, read the directions on thePyLadies 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

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript56.8%
  • HTML23.5%
  • CSS10.1%
  • SCSS4.7%
  • Sass3.7%
  • Shell0.6%
  • Other0.6%

[8]ページ先頭

©2009-2025 Movatter.jp