Git Product home page Git Product logo

py-package-template's Introduction

alexioannides

Python source code for generating my personal website - hosted by GitHub pages at alexioannides.github.io - using the Pelican framework for static websites, together with Flex theme.

The output of the build process is written to the output folder in the root directory, that is not version controlled using this repository. Instead, the output directory has its own repository at alexioannides, that is necessary for hosting with GitHub pages.

Development Setup

The package's 3rd party dependencies are described in requirements.txt. Create a new virtual environment and install these dependencies as follows,

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Building the Website

To build the website we need to call Pelican,

pelican

Testing the Site Locally

We recommend setting RELATIVE_URLS = True when testing (do not forget to revert this before deploying) and then executing the following,

pelican --listen output

A test version of the website will then be available at http://localhost:8000.

Deploying to GitHub Pages

After testing locally, first of all ensure that RELATIVE_URLS = False, rebuilding the website if necessary. Then, make sure that you are still in the output directory and remember that this is version controlled by a different repository, that now needs new changes to be committed and pushed to master as usual - e.g.,

git add -A
git commit -m "latest changes to alexioannides.github.io"
git push origin master

The updated website is usually available within a minute or two.

py-package-template's People

Contributors

alexioannides avatar endolith avatar gdacarv avatar jfthuong avatar ximeg 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

py-package-template's Issues

curves is not visible from py_pkg, np is visible from curves

Is this the intended behavior? I'm trying to learn the "Right" way to cleanly structure packages and imports.

If I do:

In [1]: import py_pkg

In [2]: py_pkg.

and then press Tab, there is no auto-completion for curves or anything else. I would expect to be able to see what is available.

On the other hand, if I do

In [3]: from py_pkg import curves

In [4]: curves.

and press Tab, it shows irrelevant things like np, abc, Dict, Tuple etc. that are imported into curves.py but are not part of this py_package_template package. Is that intentional? I would expect those sorts of imports to be hidden, and only things like DemandMonotonicityError and PriceRanges to show up.

pip install error

ERROR: Could not find a version that satisfies the requirement py-template-project (from versions: none)
ERROR: No matching distribution found for py-template-project

pip3 install error

myshell:~/SE/nico$ pip3 install py-template-project

Collecting py-template-project
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/py-template-project/

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.